org-randomnote icon indicating copy to clipboard operation
org-randomnote copied to clipboard

indirect-buffer behavior not working [?]

Open ghost opened this issue 7 years ago • 3 comments

Love the idea, thank for creating this mode!

I'm not sure if indirect-buffer is working as intended... it seems to pick a random heading in the org file setup as candidate (and switch to that buffer), but I think it's a regular full-view buffer... Is it suppose to create a new (indirect) buffer with a narrowed view of a particular header?

I've got this setup:

  (use-package org-randomnote
    :init (spacemacs/set-leader-keys "aor" 'org-randomnote)
    :bind ("C-c r" . org-randomnote)
    :config (setq org-randomnote-candidates '("~/org/notes.org")
                  org-randomnote-open-behavior 'indirect-buffer))

ghost avatar Dec 15 '17 13:12 ghost

Sure, happy you're using it!

So, I don't really use indirect-buffers myself, so I'm not 100% sure if the way I set it up is the way that you'd want it done as someone who uses them.

When I set the open-behavior to indirect-buffer, it does create a new indirect buffer, at least as I understand how it's supposed to work. The buffer edits the original, but just shows the relevant header.

Let me know what you think. If it's not the way you expect, I'm open to PR's :)

mwfogleman avatar Dec 15 '17 14:12 mwfogleman

Yes, that's what I thought, but for me, when selecting a random note, with the above setup, I still see all of the content (with cursor positioned on a random headline indeed).

ghost avatar Dec 15 '17 16:12 ghost

screen shot 2017-12-15 at 11 39 18 am

This is what I get. Can you share a screenshot of what it looks like for you? Can you check that the variable is actually set to indirect-buffer?

mwfogleman avatar Dec 15 '17 16:12 mwfogleman