For those users of an ivy
/counsel
persuasion, the command counsel-org-tag
(added in v0.6 AFAICT) enables ivy
-backed completion (including multiple selection and deselection) of org-mode
tags:
counsel-org-tag
is an interactive autoloaded compiled Lisp function in
counsel.el
.
(counsel-org-tag)
Add or remove tags in org-mode
.
In my configuration I like to remap the default keybindings of org-set-tags-command
(C-c C-q
) to counsel-org-tag
like so:
(global-set-key [remap org-set-tags-command] #'counsel-org-tag)
or, equivalently without the remapping:
(with-eval-after-load 'org
(define-key org-mode-map (kbd "C-c C-q") #'counsel-org-tag))
Irrespective of how counsel-org-tag
is invoked, during completion you can type C-m
(ivy-done
) to exit with the currently selected candidate, or C-M-m
(ivy-call
) to select the current candidate and remain in the completion session. Typing C-M-m
(ivy-call
) over an already selected candidate removes it from the list of selected tags. At any point, you can exit completion with the current list of selected tags by typing C-M-j
(ivy-immediate-done
). See the ivy
manual for more commands/tricks.
counsel
, which usually comes withivy
, provides the commandcounsel-org-tag
, which you may like to try out.counsel-org-tag
multiple timesC-M-m
(ivy-call
) to select multiple tags - that appears to work for all selected tags EXCEPT for the last tag in the list you just selected. Frustrating!ivy
multiple selection; if you can reproduce the problem I suggest opening an issue on the project's GitHub page.