Re: [O] save folded state

2015-02-02 Thread Phillip Lord
Worth trying the buffer-invisibility-spec solution. I'd be interested to know if it works or not. Although I wonder whether the commands that you are using really should be obeying visibility context. Phil John Kitchin writes: > yes, I meant programatically. I was having some issue in selecting

Re: [O] save folded state

2015-01-27 Thread John Kitchin
yes, I meant programatically. I was having some issue in selecting contex using commands that grab what is visible. So for things inside a folded section it was not grabbing the right context. I solved it by doing something similar to what you describe, i.e. a tempbuffer. lentic looks pretty inte

Re: [O] save folded state

2015-01-27 Thread Phillip Lord
You mean programmatically? Is folding not just implemented with invisible overlays? If so, why do you need to change this to get context? You can try setting buffer-invisibility-spec temporarily. For example, run this function in a folded org-mode buffer. (defun temp () (interactive) (messag

[O] save folded state

2015-01-26 Thread John Kitchin
I am trying to map over a buffer with headlines in various states of folded, and get context around certain elements. I find I need to fully expand the buffer to get the context in the way I am currently doing it (e.g. getting the lines around the element), but I would like to put the buffer back t