Created
November 14, 2013 13:45
-
-
Save bamanzi/7466998 to your computer and use it in GitHub Desktop.
[emacs] anything-org-headings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq anything-c-source-org-headings | |
'((name . "Org Headings") | |
(headline . "^[*]+ ") | |
(condition . (eq major-mode 'org-mode)) | |
(migemo) | |
(persistent-action . (lambda (elm) | |
(anything-c-action-line-goto elm) | |
(show-subtree))) | |
(action-transformer | |
. (lambda (actions candidate) | |
'(("Go to Line" . anything-c-action-line-goto) | |
("Go to section and fold otherse" . anything-c-outline-org-heading-hide-others)))) | |
) | |
"Show Org headlings. | |
Differenct from `anything-c-source-org-headlines`, this one keeps faces") | |
(defun anything-org-headings () | |
"Preconfigured anything to show org-like headings." | |
(interactive) | |
(let ((anything-candidate-number-limit 200)) | |
(anything-other-buffer 'anything-c-source-org-headings "*org-mode headings*"))) | |
(define-key global-map (kbd "<f5> h") 'anything-org-headings) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment