- The first patch fixes the problem of TODO keywords and tags sharing keys when they are automatically generated and when `org-fast-tag-selection-include-todo' is set. - The problem solved by the second patch is the following: when invoking the fast selection interface, and pressing the key of a tag, the tag is highlighted to indicate it has been selected, but pressing the key again doesn't unhighlight it.
From ec433003b77c17ae150c7c399142d9fad6bc5cab Mon Sep 17 00:00:00 2001 From: alexgiorev <alex.gio...@gmail.com> Date: Thu, 10 Feb 2022 22:14:51 +0200 Subject: [PATCH 2/2] listp/org.el: unhighlight org-fast-tag-selection tag
* lisp/org.el (org-fast-tag-selection): When the key of a tag is pressed in the fast selection tag interface, the tag is highlighted, but when it is pressed again it is not unhighlighted. This patch fixes this issue. TINYCHANGE --- lisp/org.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 6fb79f180..c43ac672d 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -12408,7 +12408,7 @@ Returns the new tags string, or nil to not change the current settings." (ncol (/ (- (window-width) 4) fwidth)) (i-face 'org-done) (c-face 'org-todo) - tg cnt e c char c1 c2 ntable tbl rtn + tg cnt e c char c1 c2 ntable tbl rtn todo-marker ov-start ov-end ov-prefix (exit-after-next org-fast-tag-selection-single-key) (done-keywords org-done-keywords) @@ -12450,6 +12450,9 @@ Returns the new tags string, or nil to not change the current settings." (unless (zerop cnt) (setq cnt 0) (insert "\n")) + (when (eq tbl (cdr todo-table)) + (setq todo-marker (point-marker)) + (set-marker-insertion-type todo-marker nil)) (insert (if (cdr e) (format "%s: " (cdr e)) "") "{ ")) ((eq (car e) :endgroup) (setq ingroup nil cnt 0) @@ -12505,6 +12508,8 @@ Returns the new tags string, or nil to not change the current settings." (setq cnt 0))))) (setq ntable (nreverse ntable)) (insert "\n") + (unless todo-marker + (setq todo-marker (point-marker))) (goto-char (point-min)) (unless expert (org-fit-window-to-buffer)) (setq rtn -- 2.25.1
From 120c4fd7d9038fdf22dfcfda7f021b0486813464 Mon Sep 17 00:00:00 2001 From: alexgiorev <alex.gio...@gmail.com> Date: Thu, 10 Feb 2022 17:24:36 +0200 Subject: [PATCH 1/2] lisp/org.el: org-tag-fast-selection fix tag/TODO key overlap * lisp/org.el (org-tag-fast-selection): Avoid key duplication for tags and TODO keywords when the keys are automatically generated. TINYCHANGE --- lisp/org.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index ef8d460e1..6fb79f180 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -12480,8 +12480,8 @@ Returns the new tags string, or nil to not change the current settings." (setq c1 (string-to-char (downcase (substring tg (if (= (string-to-char tg) ?@) 1 0))))) - (if (or (rassoc c1 ntable) (rassoc c1 table)) - (while (or (rassoc char ntable) (rassoc char table)) + (if (or (rassoc c1 ntable) (rassoc c1 fulltable)) + (while (or (rassoc char ntable) (rassoc char fulltable)) (setq char (1+ char))) (setq c2 c1)) (setq c (or c2 char))) -- 2.25.1