Add :oag and :oagr for searching org files
This commit is contained in:
parent
515171b957
commit
de509ab31e
2 changed files with 23 additions and 0 deletions
|
@ -120,5 +120,25 @@
|
||||||
to-delete)
|
to-delete)
|
||||||
(setq narf-org-attachments-list attachments)))
|
(setq narf-org-attachments-list attachments)))
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; Easy searching
|
||||||
|
;;
|
||||||
|
|
||||||
|
;; Ex-mode interface for `helm-ag'. If `bang', then `search' is interpreted as
|
||||||
|
;; regexp.
|
||||||
|
;;;###autoload (autoload 'narf:org-helm-ag-search "defuns-org-notebook" nil t)
|
||||||
|
(evil-define-operator narf:org-helm-ag-search (beg end &optional search hidden-files-p regex-p)
|
||||||
|
:type inclusive :repeat nil
|
||||||
|
(interactive "<r><a><!>")
|
||||||
|
(in! org-directory
|
||||||
|
(narf:helm-ag-search beg end search bang t t)))
|
||||||
|
|
||||||
|
;;;###autoload (autoload 'narf:org-helm-ag-regex-search "defuns-org-notebook" nil t)
|
||||||
|
(evil-define-operator narf:org-helm-ag-regex-search (beg end &optional search bang)
|
||||||
|
:type inclusive :repeat nil
|
||||||
|
(interactive "<r><a><!>")
|
||||||
|
(narf:org-helm-ag-search beg end search bang t))
|
||||||
|
|
||||||
(provide 'defuns-org-notebook)
|
(provide 'defuns-org-notebook)
|
||||||
;;; defuns-org-notebook.el ends here
|
;;; defuns-org-notebook.el ends here
|
||||||
|
|
|
@ -74,6 +74,9 @@
|
||||||
;; Org-mode
|
;; Org-mode
|
||||||
(exmap "att[ach]" 'narf:org-attach)
|
(exmap "att[ach]" 'narf:org-attach)
|
||||||
(exmap "link" 'narf:org-link)
|
(exmap "link" 'narf:org-link)
|
||||||
|
;; ag-powered search for org-files
|
||||||
|
(exmap "oag" 'narf:org-helm-ag-search)
|
||||||
|
(exmap "oagr" 'narf:org-helm-ag-regex-search)
|
||||||
|
|
||||||
;; Plugins
|
;; Plugins
|
||||||
(after! flycheck
|
(after! flycheck
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue