Can I create a sparse tree where I am now, i.e. Create sparse tree in org-mode to indicate the path?

The title pretty much talks about this: I often want to create a rare tree for my current position in the current buffer, showing all the headers to get to me.

Here

** WANTED create a rare tree where I am now: orgmode:

I often want to create a rare tree where I am now. It's a bit of a pain to create a Cc // search - but this is my current kluge:

a) insert a unique string such as HERE-I-AM

b) CC // HERE-I-AM (org-come "HERE-I-AM" zero)

Providing something like this

** My (org-mode) LOGS :top: ** LOGs :log *** Fri Mar 22 2013 **** DONE org-mode - trying to get calendar to work ***** DONE rewrote docs - State "DONE" from "" [2013-03-22 Fri 14:49] blah blah blah HERE-I-AM ** ...NEXT Daily Log 

This is clearly unsatisfactory. for example, may not have write permission

+4
source share
2 answers

This function should do what you want:

 (defun my-org-sparse-tree () "Create an org sparse tree showing only point" (interactive) (org-overview) ;; Hide everything (org-show-context)) ;; Show context around point 
+1
source

I quickly removed something that might be what you want, or at least close it:

 (defun tr/path-sparse-tree () "sparse tree to the current buffer position" (interactive) (setq pathmarker "Eeshoo9OomeiRaix") ;; random string obtained from ;; pwgen, probably a unique marker ;; in any org document... (save-excursion (insert pathmarker) (org-occur pathmarker)) (delete-char 16)) 

I'm not an expert on emacs-w130 as such, but my quick tests have been promising regarding your description of the problem. At least your current kludge is automated; -).

+1
source

All Articles