fix from granit for org tag completion via helm. seems a bug/behavior change with org 9 is the cause per granit
This commit is contained in:
parent
1d1b2a4d4f
commit
62c8e8cfb2
19
org/init.el
19
org/init.el
|
@ -111,12 +111,27 @@
|
||||||
(load "~/.emacs.d.profiles/common/helm-org.el")
|
(load "~/.emacs.d.profiles/common/helm-org.el")
|
||||||
(require 'helm-org)
|
(require 'helm-org)
|
||||||
(helm-mode 1)
|
(helm-mode 1)
|
||||||
; fix helm multi-tag select (needs custom seprator. default is comma
|
|
||||||
(setq helm-crm-default-separator ":")
|
|
||||||
(add-to-list 'helm-completing-read-handlers-alist '(org-capture . helm-org-completing-read-tags))
|
(add-to-list 'helm-completing-read-handlers-alist '(org-capture . helm-org-completing-read-tags))
|
||||||
(add-to-list 'helm-completing-read-handlers-alist '(org-set-tags . helm-org-completing-read-tags))
|
(add-to-list 'helm-completing-read-handlers-alist '(org-set-tags . helm-org-completing-read-tags))
|
||||||
(add-to-list 'helm-completing-read-handlers-alist '(org-set-tags-command . helm-org-completing-read-tags))
|
(add-to-list 'helm-completing-read-handlers-alist '(org-set-tags-command . helm-org-completing-read-tags))
|
||||||
|
|
||||||
|
; fix helm multi-tag select (needs custom seprator. default is comma
|
||||||
|
;(setq helm-crm-default-separator ":"
|
||||||
|
(define-advice helm--completion-in-region (:around (helm-fun origfun start end collection &optional predicate) temporary-helm-crm-separator-for-tags)
|
||||||
|
(setq tcrmds helm-crm-default-separator)
|
||||||
|
;; If the last command was any of these values, we're looking at tags most likely
|
||||||
|
(when (or (member last-command '(org-capture org-ctrl-c-ctrl-c org-set-tags org-set-tags-command))
|
||||||
|
;;This is a workaround for completions when you've already started typing.
|
||||||
|
(and (eq this-command 'crm-complete)
|
||||||
|
(eq major-mode 'org-mode))
|
||||||
|
;; This is probably the only thing we really need, but it doesn't handle custom "Tags" prompts
|
||||||
|
(and (active-minibuffer-window)
|
||||||
|
(eq "Tags: " (minibuffer-prompt))))
|
||||||
|
(setq helm-crm-default-separator ":"))
|
||||||
|
;; Call the original Helm Completion function with all the original arguments
|
||||||
|
(funcall helm-fun origfun start end collection predicate)
|
||||||
|
(setq helm-crm-default-separator tcrmds))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; ui tuning
|
; ui tuning
|
||||||
(diminish 'projectile-mode)
|
(diminish 'projectile-mode)
|
||||||
|
|
Reference in a new issue