[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] org-global-tags-completion-table does not include tags f
From: |
Matt Lundin |
Subject: |
Re: [O] [PATCH] org-global-tags-completion-table does not include tags from buffers |
Date: |
Mon, 19 Mar 2018 10:02:01 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Attached is a patch that fixes the issue.
Best,
Matt
Matt Lundin <address@hidden> writes:
> If org-tags-alist is customized by the user, the value returned by
> org-global-tags-completion-table does not include any tags from agenda
> buffers and files.
>
> This behavior contradicts the docstring of
> org-global-tags-completion-table, which claims to return the list of all
> tags in all agenda buffer/files.
>
> I believe this bug was introduced with commit
> 4743d43dd8e448b6c440b1e4988bcd353de60cc7 in April 2016. Before that
> commit, Org mode appended tags in org-tags-alist to tags gathered from
> the buffer. After the commit, Org mode no longer gathers buffer tags if
> org-tags-alist is defined.
>
> Line 13731 is the key line:
>
> (or org-current-tag-alist (org-get-buffer-tags)))
>
> AFAICT, org-current-tag-alist only includes tags defined in
> org-tag-alist and org-tag-persistent-alist. So if these are defined, the
> function will never gather the buffer tags.
>
> As an aside, this bug makes filtering the agenda by filetags or tags in
> org buffers impossible due to commit
> 404ac42ee51f0ac0d9cfb8fbefaefbbe96c61017, which requires a match for tag
> completion when hitting "/ [TAB]" in the agenda. Since
> org-global-tags-completion-table does not actually return the tags in
> buffers, it is impossible to filter by them.
>
> I can reproduce this with emacs -Q (emacs 25.3 and Org mode from git).
>
> Best,
> Matt
0001-Include-buffer-tags-in-global-tags-completion.patch
Description: Text Data