1

When I have executed (org-narrow-to-subtree), how can move between subtrees of the same level.

Is this possible?

I have tried

next/previous heading                             C-c C-n/p
next/previous heading, same level                 C-c C-f/b

But they don't recognize the same levels as the narrowed subtree.

Example:

* Tree 1
** Sub 1
** Sub 2
* Tree 2

If i am at * Tree 1 and do C-x C-n s is there a way to jump between * Tree 1 and * Tree 2 without first doing C-x C-n w?

  • See if your keys bindings have not been changed from the defaults. C-h k C-c C-f must show org-forward-heading-same-level. – Emacs User May 21 '16 at 14:13
  • It is mapped to that function. Within the subtree I have narrowed to, this works fine. What I'm wondering is can I jump to the next subtree on the same level as the one I narrowed to. – Sparx May 21 '16 at 19:19
3

If what you want to move the narrowing along with point to the next subtree, you can define a command that does that:

(defun my/org-narrow-forward ()
  "Move to the next subtree at same level, and narrow to it."
  (interactive)
  (widen)
  (org-forward-heading-same-level 1)
  (org-narrow-to-subtree))

I guess you could also simply define a keyboard macro.

  • Thanks for the quick answer. One of these days elisp will enter my head when looking for answers like these. – Sparx May 21 '16 at 22:03
0

org-tree-slide.el could be useful for you.

  • This is a link-only answer, so it risks being deleted. To prevent that, please summarize how using org-tree-slide.el answers the question. – Drew Mar 28 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.