helm-org-in-buffer-headings, mu4e-company

This commit is contained in:
Ivan Malison 2014-12-12 20:38:40 -08:00
parent 5cda6fd005
commit 426180b232
2 changed files with 24 additions and 0 deletions

View File

@ -912,6 +912,15 @@ The current directory is assumed to be the project's root otherwise."
(use-package helm-ag :ensure t))
:config
(progn
(cl-defun helm-org-in-buffer-headings ()
(interactive)
(helm :sources (helm-source-org-headings-for-files
(list (projectile-completing-read
"File to look at headings from: "
(projectile-all-project-files))))
:candidate-number-limit 99999
:buffer "*helm org inbuffer*"))
;; helm zsh source history
(defvar helm-c-source-zsh-history
'((name . "Zsh History")

15
load.d/mu4e-company.el Normal file
View File

@ -0,0 +1,15 @@
(defun mu4e-company-contacts (command &optional input &rest ignored)
(interactive (list 'interactive))
(cl-case command
(interactive (company-begin-backend 'mu4e-contacts-company))
(prefix
(when (eq major-mode 'mu4e-compose-mode)
(save-excursion
(beginning-of-line)
(if (and (eq (line-number-at-pos) 2)
(looking-at "^To: *\\(.*?\\)$"))
(match-string-no-properties 1)
'stop))))
(candidates
(--filter (string-match-p (downcase input) (downcase it))
mu4e~contacts-for-completion))))