-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request]: how to narrow view to the subtree #35
Comments
After some research,
So, is there any way to combine this two functions? |
Regarding Prob. 2 you could have done this: (setq imenu-list-after-jump-hook nil)
(add-hook 'imenu-list-after-jump-hook (lambda () (recenter 0)))
That's indeed a bug. Imenu doesn't support jumping to non-low-level nodes. Prob. 3 happens because of how imenu-list updates the index buffer. When the index of the main buffer changed, it just rewrites the index entirely. No information about folds is retained and that's why everything unfolds. I need to research how to fix this, but I don't know when I'll have the time to do so. However, in your case you don't change the contents of the main buffer, so I don't know why imenu-list decides to update the index buffer. This might be another bug. Does it happen only for org-mode buffers? |
@phyliu79 new branch named
Relevant commits are f188f06 and 42f983d. Can you verify that this problem is fixed, and doesn't cause other issues? (Prob. 3 not fixed yet) |
Hi, I re-checked *.org *.tex and *.el:
I also try the new branches. I found your corresponding to both
However, there are no more issues. At least outline mode is as good as the original one. There are some clues about expanding: The cursor of go-to jump to the main window, even I set |
@phyliu79 thanks for testing, I was 99% percent sure that it would fix the invalid function bug, so it's weird it didn't work for you. I'm going to merge the outline branch soon, despite that. I know why the expansion happens, it's just that implementing the fix isn't obvious. As I wrote, I don't know when I'll have time to fix it, sadly. |
In the org-mode, is there any way to show contents of only the clicked entry (in the main window) by the narrow view (In org-mode itself, this can be down by
org-narrow-to-subtree
orC-x n s
)? The narrow-view may help to focus on the clicked entry.Now, imenu-list afford
imenu-list-after-jump-hook
to make the headline of the entry at the center or top of the window, which can partly help to focus on the clicked entry. Here, I want it to be at the top, so I use the following setting. This setting need setrecenter-positions
. Is there any simple way to directly set headline (cussor) position just for imenu-list?The text was updated successfully, but these errors were encountered: