Last active
July 2, 2024 11:32
-
-
Save sprig/11499090 to your computer and use it in GitHub Desktop.
Advice for org-set-tags to disable helm completion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun kk/run-with-no-helm (orig-func &rest args) | |
| "Run a function without helm completion." | |
| (if (boundp 'helm-mode) | |
| (let ((orig-helm-mode helm-mode)) | |
| (unwind-protect | |
| (progn | |
| (helm-mode 0) | |
| (apply orig-func args) | |
| ) | |
| (helm-mode (if orig-helm-mode 1 0)))) | |
| (apply orig-func args) | |
| )) | |
| (advice-add 'org-icompleting-read :around 'kk/run-with-no-helm) | |
| (advice-add 'org-completing-read :around 'kk/run-with-no-helm) | |
| (advice-add 'org-completing-read-no-i :around 'kk/run-with-no-helm) |
Author
Thank you so much! This is exactly what I need! I am irritated by the Helm for many times as it pops up when I don't need it in org mode.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Your comments prompted me to revisit this, as I haven't been using tags too frequently lately, but wanted to start again. Looks like this isn't working correctly anymore with either
#'(function-symbol) or with'(regular symbol). The quoted approach does work except it should beorg-set-tags-command. However, at least in my case, I don't get a regularcompleting-read(i.e. no completions) after excluding it that way.On the other hand, helm does appear helpful at this time as it allows frictionless addition of a new tag. The only issue is that when skipping the menu with C-u C-u, it adds a comma after the first tag. Replacing the comma with a colon allows one to complete multiple tags, which otherwise get blocked by the comma. A small modification to
org.elfixes this for me: