Add helm-based org searching commands
This commit is contained in:
parent
31291af29d
commit
a1b57eda3a
5 changed files with 36 additions and 15 deletions
1
Cask
1
Cask
|
@ -155,6 +155,7 @@
|
|||
(depends-on "ob-http")
|
||||
(depends-on "ob-go" :git "https://github.com/pope/ob-go")
|
||||
(depends-on "org-download")
|
||||
(depends-on "helm-deft" :git "https://github.com/dfeich/helm-deft")
|
||||
|
||||
;; PlantUML -- modules/module-plantuml.el
|
||||
(depends-on "puml-mode")
|
||||
|
|
|
@ -149,5 +149,7 @@
|
|||
(use-package helm-command :commands helm-M-x)
|
||||
(use-package helm-descbinds :commands helm-descbinds)
|
||||
|
||||
(use-package helm-deft :defer t)
|
||||
|
||||
(provide 'core-helm)
|
||||
;;; core-helm.el ends here
|
||||
|
|
|
@ -90,5 +90,19 @@
|
|||
(interactive "<a><!>")
|
||||
(if bang (helm-multi-swoop-all search) (helm-swoop :$query search)))
|
||||
|
||||
;;;###autoload
|
||||
(defun narf/helm-org-search (&optional directory)
|
||||
(interactive)
|
||||
(require 'helm-ag)
|
||||
(require 'helm-deft)
|
||||
(let ((dir (or directory org-directory)))
|
||||
(let ((helm-deft-dir-list `(,dir))
|
||||
(default-directory dir)
|
||||
(helm-ag--default-directory dir))
|
||||
(helm :sources `(,(if directory
|
||||
'helm-source-deft-fn
|
||||
'helm-source-projectile-files-list)
|
||||
helm-source-do-ag)))))
|
||||
|
||||
(provide 'defuns-helm)
|
||||
;;; defuns-helm.el ends here
|
||||
|
|
|
@ -39,23 +39,21 @@
|
|||
|
||||
;;; Deft
|
||||
;;;###autoload
|
||||
(defun narf/deft-projects ()
|
||||
(defun narf/helm-org-projects ()
|
||||
(interactive)
|
||||
(require 'deft)
|
||||
(let ((deft-directory org-directory-projects))
|
||||
(deft)))
|
||||
|
||||
(narf/helm-org-search org-directory-projects))
|
||||
;;;###autoload
|
||||
(defun narf/deft-contact ()
|
||||
(defun narf/helm-org-contacts ()
|
||||
(interactive)
|
||||
(require 'deft)
|
||||
(let ((deft-directory org-directory-contacts))
|
||||
(deft)))
|
||||
|
||||
(narf/helm-org-search org-directory-contacts))
|
||||
;;;###autoload
|
||||
(defun narf/deft-invoices ())
|
||||
(defun narf/helm-org-invoices ()
|
||||
(interactive)
|
||||
(narf/helm-org-search org-directory-invoices))
|
||||
;;;###autoload
|
||||
(defun narf/deft-writing ())
|
||||
(defun narf/helm-org-writing ()
|
||||
(interactive)
|
||||
(narf/helm-org-search (expand-file-name "writing/" org-directory)))
|
||||
|
||||
(provide 'defuns-org-custom)
|
||||
;;; defuns-org-custom.el ends here
|
||||
|
|
|
@ -124,8 +124,6 @@
|
|||
:nv "]" 'helm-etags-select
|
||||
:nv "a" 'helm-projectile-find-other-file
|
||||
:nv "E" (λ (in! narf-emacs-dir (helm-projectile-find-file)))
|
||||
:nv "n" (λ (in! org-directory (helm-projectile-find-file)))
|
||||
:nv "N" 'narf:org-search-files-or-headers
|
||||
:nv "m" 'helm-recentf
|
||||
:nv "M" 'helm-projectile-recentf ; recent PROJECT files
|
||||
:nv "p" 'helm-projectile-switch-project
|
||||
|
@ -144,7 +142,15 @@
|
|||
:n "ol" (λ (narf-open-with "LaunchBar"))
|
||||
:n "oL" (λ (narf-open-with "LaunchBar" default-directory))
|
||||
:n "ot" (λ (narf:tmux-chdir nil t))
|
||||
:n "oT" 'narf:tmux-chdir)
|
||||
:n "oT" 'narf:tmux-chdir
|
||||
|
||||
;; Org
|
||||
:nv "n." (λ (in! org-directory (let ((helm-ff-skip-boring-files t)) (helm-find-files-1 org-directory))))
|
||||
:nv "n/" 'narf/helm-org-search
|
||||
:nv "np" 'narf/helm-org-projects
|
||||
:nv "nc" 'narf/helm-org-contacts
|
||||
:nv "ni" 'narf/helm-org-invoices
|
||||
:nv "nw" 'narf/helm-org-writing)
|
||||
|
||||
;; <localleader>
|
||||
(:prefix "\\"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue