Skip to content

Add functions to restore custom buffer bookmark properties#56

Open
shipmints wants to merge 3 commits into
florommel:mainfrom
shipmints:shipmints-bufferlo-bookmark-buffer-handler-functions
Open

Add functions to restore custom buffer bookmark properties#56
shipmints wants to merge 3 commits into
florommel:mainfrom
shipmints:shipmints-bufferlo-bookmark-buffer-handler-functions

Conversation

@shipmints
Copy link
Copy Markdown
Collaborator

  • New defcustoms 'bufferlo-bookmark-buffer-locals',
    'bufferlo-bookmark-buffer-handler-functions'.
  • New defuns 'bufferlo-bookmark-map-function-buffer-locals',
    'bufferlo-bookmark-buffer-handler-buffer-locals',
    'bufferlo-bookmark-map-function-text-scale-mode-amount',
    'bufferlo-bookmark-buffer-handler-text-scale-mode-amount'.
  • Update documentation.

This is better than our custom code.
- New defcustoms 'bufferlo-bookmark-buffer-locals',
'bufferlo-bookmark-buffer-handler-functions'.
- New defuns 'bufferlo-bookmark-map-function-buffer-locals',
'bufferlo-bookmark-buffer-handler-buffer-locals',
'bufferlo-bookmark-map-function-text-scale-mode-amount',
'bufferlo-bookmark-buffer-handler-text-scale-mode-amount'.
- Update documentation.
@shipmints shipmints force-pushed the shipmints-bufferlo-bookmark-buffer-handler-functions branch from 5e517fc to 7b34bd7 Compare November 1, 2025 14:32
@shipmints
Copy link
Copy Markdown
Collaborator Author

I suppose the configuration of these two features could be simplified like we handle ibuffer integration. The hooks need to be installed in pairs so we could automate this. Nobody will want to have only half the hooks installed, right?

@shipmints
Copy link
Copy Markdown
Collaborator Author

Done.

@shipmints
Copy link
Copy Markdown
Collaborator Author

Flo, should I merge this or do you have anything outstanding?

Copy link
Copy Markdown
Owner

@florommel florommel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nit, bufferlo-bookmark-buffer-locals and bufferlo-bookmark-text-scale-mode-amount seem to be flipped in the README's code examples.

Comment thread README.org

#+begin_src emacs-lisp
;; To persist text-scale-mode-amount
(setq bufferlo-bookmark-buffer-locals t)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be bufferlo-bookmark-text-scale-mode-amount, right?

Comment thread README.org

#+begin_src emacs-lisp
;; To persist buffer-local variables
(setq bufferlo-bookmark-text-scale-mode-amount t)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and this should be bufferlo-bookmark-buffer-locals

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like they are flipped, yep.

@florommel
Copy link
Copy Markdown
Owner

I also think that we don't need e2cf46e anymore.
Have a look at this branch: florommel-bufferlo-bookmark-buffer-handler-functions
I rebased it, removed e2cf46e and fixed the meantioned README nit. The bookmark handler feature hooks work fine for me (very cool, now I can save my but also have a quick look, then we can merge it.

PS: Great stuff, I just discovered the power of this.. now I can persist my symbol overlays with:

(setq bufferlo-bookmark-buffer-local-variables '(symbol-overlay-keywords-alist))

@shipmints
Copy link
Copy Markdown
Collaborator Author

e2cf46e

This is still required e2cf46e and I don't see it removed from the proposed branch. I still use it. It's independent of buffer locals so mentioning it in this PR seems a bit confusing?

@florommel
Copy link
Copy Markdown
Owner

e2cf46e

This is still required e2cf46e and I don't see it removed from the proposed branch. I still use it. It's independent of buffer locals so mentioning it in this PR seems a bit confusing?

Yes, sorry I was not precise; we still need it, of course. What I wanted to say is that this behavior is already on main. And you are right this has nothing to do with buffer locals. e2cf46e is just listed in the commits for this PR.

But anyways, do you agree with the rebased branch? I use it and it works.

@shipmints
Copy link
Copy Markdown
Collaborator Author

e2cf46e

This is still required e2cf46e and I don't see it removed from the proposed branch. I still use it. It's independent of buffer locals so mentioning it in this PR seems a bit confusing?

Yes, sorry I was not precise; we still need it, of course. What I wanted to say is that this behavior is already on main. And you are right this has nothing to do with buffer locals. e2cf46e is just listed in the commits for this PR.

But anyways, do you agree with the rebased branch? I use it and it works.

Seems fine to my eye, though I didn't test it because you did 👍 Not sure how e2cf46e got all mixed up in there but if it's in main, we're good. I'll adopt the main main once this is merged in. I can make some time to look at the Emacs 31 improvements this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants