-
Notifications
You must be signed in to change notification settings - Fork 159
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
Bookmark restoration seems broken? #745
Comments
I'll investigate. It's possible that the bookmark integration before the whole scoping business from #744. If that's the case and bookmarks need a reliable buffer name we might have a problem. |
Update: The problem is specific to tag nodes, files are working. |
Yes, this is what I meant by imenu. |
Ok, here's where it gets ugly: Treemacs actually has no way to "move to a tag node" in the way that restoring a bookmark would require. The fact that it does work under some circumstances is pure chance, a related move method is used that does sometimes work out. Now I could go and fill that gap of course, but the code responsible for finding nodes has undergone a major rewrite on account of #677, working on it now would be utterly uneconomical. So I'm afraid I'm going to have to put this bug on ice until #677 is finished. In fact please remind me to tackle this issue if you see I haven't done so after #677, bugs are always my first priority, so this one should be fixed as soon as possible. |
Ok, thank you for looking at this! Actually for me it would be ok if treemacs does not restore the selected tag node for a bookmark and only restore up to the file. Just in case this makes things simpler. |
It does. I'll add it as a temporary workaround. |
If I recall correctly, most bugs I had in treemacs were due to the imenu. So I think every simplification in that part would help a lot. Furthermore since this imenu part is also dynamically created by an external provider I think treemacs should not try too hard in this area! |
The whole imenu feature hasn't seen much change since I've written it a long time ago, when I was a lot less experienced with elisp. I don't think it's all that well used either. So it makes sense that it can sometimes be rickety. When #677 is done I plan to rewrite it based on the new extension api. That should help with the issues and instabilities that are caused by the current special-casing. |
Sounds good! |
Workaround is up now. |
Thank you! I will try when updating the packages the next time, when the melpa build finished. |
I can confirm, it works! |
I was wondering before if it's my code (#744) or if its treemacs but it seems treemacs has problems restoring bookmarks when I have selected a node in the imenu.
bookmark-set
in the treemacs buffer, which stores the path to the nodetreemacs--bookmark-handler
It seems restoring works if I am not restarting. Is it a serialization problem?
Example backtrace:
The text was updated successfully, but these errors were encountered: