bug#81662: 31.1; [FR] Registers pointing to bookmarks

Daniel Mendler via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <[email protected]>
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
Stéphane Marks <[email protected]> writes:

> On Thu, Aug 20, 2026 at 9:18 AM Stefan Monnier via Bug reports for GNU
> Emacs, the Swiss army knife of text editors <[email protected]> wrote:
>
>> > I propose to support bookmarks as register content. This way register
>> > keys can be used as quick access keys to bookmarks. Bookmarks are
>> > supported by many major modes. The feature can be implemented easily
>> > since register.el uses generic methods:
>>
>> As I mentioned recently elsewhere, I think it would be good to
>> consolidate the two (as well as the `revert-buffer-function` and the
>> help-xref state), so I think it's a step in the right direction.
>>
>> > (cl-defmethod register-val-describe ((bm (head bookmark)) _verbose)
>> >   (princ (format "Bookmark \"%s\"" (cdr bm))))
>>
>> Ah, so you'd use `(bookmark . NAME)` as representation?
>> I was expecting we'd use the actual "bookmark record" rather than use an
>> indirection through `bookmark-alist`.  Now that I see this option, I'm
>> not sure which is best.
>>
>
> One downside to using a bookmark name is that bookmark-rename and
> bookmark-delete won't know about a register's name reference, now stale.
> In the bufferlo package, we've taken some care with both to warn about
> potential conflicts and propagate changes in bufferlo bookmark structures.
> This could be cleaner.

Bookmarks can also point to files and files can be renamed too. The
situation is just the same here.

Daniel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.