emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] Feature request: Add group checks for manual tag setting (not


From: Ihor Radchenko
Subject: Re: [BUG] Feature request: Add group checks for manual tag setting (not just fast tags) [9.6.6 (release_9.6.6 @ /usr/share/emacs/29.1/lisp/org/)]
Date: Tue, 19 Sep 2023 09:50:50 +0000

sreenivas sumadithya <sumadithya@gmail.com> writes:

> Currently, tag groups/ mutually exclusive tags can be set when tags are set
> manually (without shortcuts being assigned to the tags / fast tags). Need
> the behavior seen in fast tags in manual tagging for tag groups.
>
> Reproduction:
> - Create an org file
> - "#+tags: {dog cat} mat"
> - Save the file after setting this.
> - Close buffer
> - Open file
> - Make a heading
> - C-c C-q dog
> - C-c C-q cat
>
> Result:
> - Both 'cat' and 'dog' are assigned to the heading.
>
> Desired behavior:
> - One of the tags should be replaced by the other.

I can only follow the described recipe when setting
org-use-fast-tag-selection to non-standard value of t.

For such scenario, I just pushed a fix onto main - entering group tags
from exclusive groups will now clear already applied tags from the same
group.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=edcb8eca5

In case of the default settings (org-use-fast-tag-selection = auto), the
interface is different - prompt will list all the tags already present
in the heading:

- C-c C-q dog from the recipe will look like

  TAGS: <point>
  TAGS: dog
  * heading :dog:

- Another C-c C-q will, however, yield
  TAGS: :dog:<point>
  entering "cat" manually
  TAGS: :dog:cat
  will still force setting both the tags:
  * heading :dog:cat:

In the above scenario, there is no non-ambiguous way to know which
exclusive tag is implied by the user. So, I am inclined to keep the
current behavior. Unless there are better ideas.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]