Closed artelse closed 9 months ago
The *Outline*
buffer is automatically updated when you save your buffer, if symbols-outline-follow-mode
is on. You can turn if off if you like.
The question though is if this is the behavior we want. Why should it hook into irrelevant buffers while it can just hook into prog-mode ones?
There's no hook into irrelevant buffers. The follow-mode adds a hook to after-save-hook
that updates the *Outline*
buffer.
Yes, I understand that, but after-save-hook
is called after any buffer that is saved and that is my point, why not just prog-mode buffers?
Edit: added a test for prog-mode:
(if (derived-mode-p 'prog-mode)
(add-hook 'after-save-hook #'symbols-outline-refresh)
and this seems to work.
I see what you mean. There seems no elegant way to achieve what you need. Not only prog-mode buffers have symbols, but also org mode, markdown mode, etc, too. Users may want it to work in those buffers.
Your original error occurs because you delete the *Outline*
buffer, it seems. I have added a fix that avoids the error.
Your original error occurs because you delete the
*Outline*
buffer, it seems. I have added a fix that avoids the error.
Thanks for the fix. The error occurred because the *Outline*
buffer was never created in the first place; i.e. only after calling symbols-outline-show
.
I tried outlines with org, but it doesn't show anything. Is this related to ctags-universal
not knowing about org
?
Mine works fine with org. Could you check if the variable symbols-outline-fetch-fn
is set to symbols-outline-ctags-fetch
in org mode? If yes, could you check if there's any content in the buffer *symbols-outline-ctags-output*
?
Apparently the package hooks into a save file hook(?) and outputs
run-hooks: No buffer named *Outline*
in*messages*
on saving an org file for example. I would love to see the package to just hook into prog-mode. I've looked into the code and cannot see where it hooks into save. (Am not an elisp wiz.)