diff --git a/doc/org.texi b/doc/org.texi index 156490f81..31996e0f0 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -3474,8 +3474,8 @@ After a colon, @kbd{M-@key{TAB}} offers completion on tags. There is also a special command for inserting tags: @table @kbd -@kindex C-c C-c -@item C-c C-c +@kindex C-c C-q +@item C-c C-q @cindex completion, of tags Enter new tags for the current headline. Org mode will either offer completion or a special single-key interface for setting tags, see @@ -3484,6 +3484,9 @@ to @code{org-tags-column}. When called with a @kbd{C-u} prefix, all tags in the current buffer will be aligned to that column, just to make things look nice. TAGS are automatically realigned after promotion, demotion, and TODO state changes (@pxref{TODO basics}). +@kindex C-c C-c +@item C-c C-c +When the cursor is in a headline, this does the same as @kbd{C-c C-q}. @end table Org will support tag insertion based on a @emph{list of tags}. By diff --git a/doc/orgcard.tex b/doc/orgcard.tex index 4b1f2b38c..4e2279edc 100644 --- a/doc/orgcard.tex +++ b/doc/orgcard.tex @@ -539,8 +539,8 @@ after ``{\tt :}'', and dictionary words elsewhere. \section{Tags} -\key{set tags for current heading}{C-c C-c} -\key{realign tags in all headings}{C-u C-c C-c} +\key{set tags for current heading}{C-c C-q} +\key{realign tags in all headings}{C-u C-c C-q} \key{create sparse tree with matching tags}{C-c \\} \key{globally (agenda) match tags at cursor}{C-c C-o} diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 51a0146c4..e65d80bb6 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -1093,6 +1093,7 @@ The following commands are available: (org-defkey org-agenda-mode-map "t" 'org-agenda-todo) (org-defkey org-agenda-mode-map "a" 'org-agenda-toggle-archive-tag) (org-defkey org-agenda-mode-map ":" 'org-agenda-set-tags) +(org-defkey org-agenda-mode-map "\C-c\C-q" 'org-agenda-set-tags) (org-defkey org-agenda-mode-map "." 'org-agenda-goto-today) (org-defkey org-agenda-mode-map "j" 'org-agenda-goto-date) (org-defkey org-agenda-mode-map "d" 'org-agenda-day-view) diff --git a/lisp/org.el b/lisp/org.el index a4928bffe..2eb70dd63 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9175,6 +9175,15 @@ If ONOFF is `on' or `off', don't toggle but set to this state." (org-move-to-column (min ncol col) t)) (goto-char pos)))) +(defun org-set-tags-command (&optional arg just-align) + "Call the set-tags command for the current entry." + (interactive "P") + (if (org-on-heading-p) + (org-set-tags arg just-align) + (save-excursion + (org-back-to-heading t) + (org-set-tags arg just-align)))) + (defun org-set-tags (&optional arg just-align) "Set the tags for the current headline. With prefix ARG, realign all tags in headings in the current buffer." @@ -12090,6 +12099,7 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." (org-defkey org-mode-map "\C-c\C-xb" 'org-tree-to-indirect-buffer) (org-defkey org-mode-map "\C-c\C-j" 'org-goto) (org-defkey org-mode-map "\C-c\C-t" 'org-todo) +(org-defkey org-mode-map "\C-c\C-q" 'org-set-tags-command) (org-defkey org-mode-map "\C-c\C-s" 'org-schedule) (org-defkey org-mode-map "\C-c\C-d" 'org-deadline) (org-defkey org-mode-map "\C-c;" 'org-toggle-comment) @@ -12898,7 +12908,7 @@ See the individual commands for more information." ["Priority Up" org-shiftup t] ["Priority Down" org-shiftdown t]) ("TAGS and Properties" - ["Set Tags" 'org-ctrl-c-ctrl-c (org-at-heading-p)] + ["Set Tags" 'org-set-tags-command t] ["Change tag in region" 'org-change-tag-in-region (org-region-active-p)] "--" ["Set property" 'org-set-property t]