-
-
Save sprig/11499090 to your computer and use it in GitHub Desktop.
(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) |
That was what I was looking for, thank you!
I think I've found a simpler version:
Setting the custom variable helm-completing-read-handlers-alist that tells helm what to use and when.
I placed this in my .emacs and it disabled helm for C-c C-c in an org outline :
(add-to-list 'helm-completing-read-handlers-alist '(org-set-tags))
I don't really know if that is what you looked for, and I hope it helps!
Thanks @sshbio, that was exactly what I needed!
Thanks @sshbio! It is not exactly what I was after - I had helm enabled everywhere (i.e. it replaced completing-read), and this helped me disable it in a single command, rather than enabling it there. I am pretty sure I didn't know about helm-completing-read-handlers-alist
though, so thanks for that as well!
Worth noting that the way advice is added here is incorrect; otherwise this works :)
Namely, advice should be added like so (notice the missing #
):
(advice-add 'org-icompleting-read :around #'kk/run-with-no-helm)
After spending more time on this, the advise option provided doesn't allow for normal completion when tab is pressed in the quick tag selection menu. I found the solution by here to to preferred.
org-no-helm.el is a better version that works even for capturing in templates.