alphapapa / org-sidebar

A helpful sidebar for Org mode
GNU General Public License v3.0
527 stars 16 forks source link

Jump to current buffer #18

Closed shaund closed 4 years ago

shaund commented 4 years ago

Is there a way to make clicking/pressing enter go to the main buffer instead of opening up an indirect one?

It looks like org-sidebar-tree-jump-source might be what I'm after, but I don't know how to set it as an option.

The behavior I'd like to (optionally) have is keeping just two buffers open, the tree view and the main, and having clicking around in the tree view move to that part of the main file (like Word or Google Docs, or Scrivener in Scrivenings view).

And thanks for making this functionality into a package.

shaund commented 4 years ago

I just saw I missed this in the command section of the readme:

If you prefer, you may customize org-sidebar-tree-jump-fn to jump to entries in their source buffer rather than indirect buffers.

How would I do that?

EDIT: I figured it out:

(use-package org-sidebar
    :custom
        (org-sidebar-tree-jump-fn 'org-sidebar-tree-jump-source)
)