-
Notifications
You must be signed in to change notification settings - Fork 8
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: Bookmarking end-of-file in an org document #22
Comments
Hi Jason, Sure, this seems like it could be useful. I'd suggest that such a record record an additional Note as well that this probably needs to be handled in indirect, narrowed buffers too. What do you think? Thanks. |
I haven't experimented with indirect or narrowed buffers. How would those work differently from a regular org buffer? My idea was to evaluate |
I can't think of a reason for recording start-of-buffer or any other special positions, but maybe using a |
@jmay If it's not specific to Org, I think the feature should not be confined to this package. I think you can define a new bookmark backend and use its bookmark-store function explicitly to create a bookmark that jumps to the end of your file. Is there anything I am missing? |
@akirak As far as I can tell, there's only one "slot" for injecting a new bookmark backend. I'd like to be able to inject an alternative flow that only operates when point is at EOB but does not disturb any other backend, mode-specific or otherwise. I made changes in the commit above that enhances |
@jmay I have never had a situation where I want to bookmark the end of a file. That's not my current workflow. I may mistakenly bookmark the end of a file when I just want to bookmark a heading. Thus I want the functionality to be opt-in. Otherwise, I don't have any opinion on how it should be implemented. I think it's a trade-off between usefulness vs. additional complexity. It would be possible to implement your idea as a function advice without tweaking this package. |
@akirak Thanks for the input. I've added a configuration setting (defaulting to OFF) for the proposed EOB marking. Latest revision is jmay@4ee2240 |
@jmay This is not my project, so @alphapapa may review your PR, if he is interested in it. |
Actually, I can imagine wanting to bookmark the end of an Org file, e.g. if one always appends to the end of a file, and so the last heading won't be the same one each time one visits (like with a datetree). So I think we could add a special case for when point is at end-of-buffer, and maybe prompt the user whether to bookmark EOB or that heading. |
I would like to be able to save a bookmark to an org file that points to the end of the file, not to any heading in it. This isn't really org-specific, but I only have use cases that involve org files. Since
org-bookmark-heading
remaps the thebookmark-make-record-function
in any org-mode buffer, this feature should either be in this package or there should be a fallback-to-default-bookmark handler (and therefore a way to decide whether to fallback, and have the feature in the built-in bookmark function, which adds complexity in both places).Since this might not be of interest to everyone, there would need to be a switch to toggle this feature.
My proposal is to recognize that point is at end of buffer and record a specific type of org bookmark in that case. Could overload the existing
id
oroutline-path
fields for this or have a different attribute.org-bookmark-heading-jump
would then recognize the EOB marker and jump directly to(end-of-buffer)
.Would this be useful to other people?
The text was updated successfully, but these errors were encountered: