GNU bug report logs - #75645
Implement something like (bookmark-bmenu-list) for registers

Previous Next

Package: emacs;

Reported by: Dani Moncayo <dmoncayo <at> gmail.com>

Date: Sat, 18 Jan 2025 10:51:02 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Thierry Volpiatto <thievol <at> posteo.net>, 75645 <at> debbugs.gnu.org, Dani Moncayo <dmoncayo <at> gmail.com>
Subject: bug#75645: Implement something like (bookmark-bmenu-list) for registers
Date: Sat, 18 Jan 2025 17:03:19 +0000
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Dani Moncayo <dmoncayo <at> gmail.com>
>> Date: Sat, 18 Jan 2025 11:50:23 +0100
>> 
>> While analyzing source code files, I use (a lot) the functionality of
>> keeping buffer
>> positions in registers ((point-to-register) and (jump-to-register)).
>> 
>> But I miss being able to display the current list of registers in a new buffer
>> similar to the one generated for bookmarks with the command
>> (bookmark-bmenu-list).
>> 
>> And following the analogy, I'd like that new buffer to allow things like:
>> * Delete one, several, or all registers.
>> * Jump to the position pointed by some register, by clicking (or
>> pressing ENTER) on its line.
>> 
>> I'd very much like to have such a feature, and I think others would like it too.
>
> Thanks.
>
> Thierry, any comments or suggestions?

It is easy to provide a delete register command for Emacs, however with
the preview interface we can delete only one register at once:

--8<---------------cut here---------------start------------->8---
(customize-set-variable 'register-use-preview 'insist)

(defun register-delete (register)
  (interactive (list (register-read-with-preview "Delete register: ")))
  (setq register-alist (delete (assoc register register-alist)
                               register-alist)))

(cl-defmethod register-command-info ((_command (eql register-delete)))
  (make-register-preview-info
   :types '(all)
   :msg "Delete register `%s'"
   :act 'modify
   :smatch t))
--8<---------------cut here---------------end--------------->8---


But for this use case why not using bookmarks instead of registers?

Note: Helm provides a command (helm-register) that does what you are
asking.

-- 
Thierry
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 200 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.