GNU bug report logs -
#75645
Implement something like (bookmark-bmenu-list) for registers
Previous Next
To reply to this bug, email your comments to 75645 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75645
; Package
emacs
.
(Sat, 18 Jan 2025 10:51:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Dani Moncayo <dmoncayo <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
Your message specified a Severity: in the pseudo-header, but
the severity value wishlist. was not recognised.
The default severity normal is being used instead.
The recognised values are: critical, grave, serious, important, normal, minor, wishlist.
(Sat, 18 Jan 2025 10:51:02 GMT) Full text and rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Severity: wishlist.
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.
In GNU Emacs 31.0.50 (build 32, x86_64-pc-linux-gnu, GTK+ Version
3.24.41, cairo version 1.18.0) of 2025-01-18 built on C11-Q8YAKWONJX0
Repository revision: 43c2e49d19f2e7a840507ae9e728b623fcb7c341
Repository branch: master
Windowing system distributor 'Microsoft Corporation', version 11.0.12010000
System Description: Ubuntu 24.04.1 LTS
Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND
THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2
XPM GTK3 ZLIB
Important settings:
value of $LANG: C.UTF-8
locale-coding-system: utf-8-unix
--
Dani Moncayo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75645
; Package
emacs
.
(Sat, 18 Jan 2025 11:03:03 GMT)
Full text and
rfc822 format available.
Message #8 received at 75645 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
If you don't mind using a package, Daniel Mendler's consult package
supports viewing registers.
https://github.com/minad/consult?tab=readme-ov-file#register
Along with a raft of other great features.
On Sat, Jan 18, 2025 at 5:51 AM Dani Moncayo <dmoncayo <at> gmail.com> wrote:
> Severity: wishlist.
>
> 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.
>
> In GNU Emacs 31.0.50 (build 32, x86_64-pc-linux-gnu, GTK+ Version
> 3.24.41, cairo version 1.18.0) of 2025-01-18 built on C11-Q8YAKWONJX0
> Repository revision: 43c2e49d19f2e7a840507ae9e728b623fcb7c341
> Repository branch: master
> Windowing system distributor 'Microsoft Corporation', version 11.0.12010000
> System Description: Ubuntu 24.04.1 LTS
>
> Configured features:
> CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
> LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND
> THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2
> XPM GTK3 ZLIB
>
> Important settings:
> value of $LANG: C.UTF-8
> locale-coding-system: utf-8-unix
>
> --
> Dani Moncayo
>
>
>
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75645
; Package
emacs
.
(Sat, 18 Jan 2025 12:08:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 75645 <at> debbugs.gnu.org (full text, mbox):
> 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?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75645
; Package
emacs
.
(Sat, 18 Jan 2025 13:51:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 75645 <at> debbugs.gnu.org (full text, mbox):
By the way, I also miss a command to reset/clear the list of registers.
For now, I have the below code in my init file. I find it useful when
I'm about to start a new research, and what to start anew with an
empty list of registers.
Something like this may be useful for others, I think.
-------
(defun clear-all-registers ()
"Clear all registers."
(interactive)
(setq register-alist nil)
(message "All registers have been cleared."))
(define-key global-map [?\C-x?r?a] 'clear-all-registers)
--
Dani Moncayo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75645
; Package
emacs
.
(Sat, 18 Jan 2025 16:58:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 75645 <at> debbugs.gnu.org (full text, mbox):
[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)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75645
; Package
emacs
.
(Sat, 18 Jan 2025 18:09:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 75645 <at> debbugs.gnu.org (full text, mbox):
On Sat, Jan 18, 2025 at 5:56 PM Thierry Volpiatto <thievol <at> posteo.net> wrote:
>
> 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---
I like that (register-delete) command. But I think it should error
out if I specify an already empty register.
I propose to add it to Emacs, and also a command to delete all registers.
I would be OK with these two.
>
> But for this use case why not using bookmarks instead of registers?
>
I use registers for temporary, single-session things (analysis of source code).
It would be cumbersome to use bookmarks for that.
> Note: Helm provides a command (helm-register) that does what you are
> asking.
Maybe I'll check it out if I find time. Thanks.
> --
> Thierry
--
Dani Moncayo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75645
; Package
emacs
.
(Sat, 18 Jan 2025 18:21:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 75645 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Dani Moncayo <dmoncayo <at> gmail.com> writes:
> On Sat, Jan 18, 2025 at 5:56 PM Thierry Volpiatto <thievol <at> posteo.net> wrote:
>>
>> 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---
>
> I like that (register-delete) command. But I think it should error
> out if I specify an already empty register.
You can't (try to) delete an empty register with the preview.
--
Thierry
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75645
; Package
emacs
.
(Sat, 18 Jan 2025 18:45:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 75645 <at> debbugs.gnu.org (full text, mbox):
On Sat, Jan 18, 2025 at 7:20 PM Thierry Volpiatto <thievol <at> posteo.net> wrote:
>
> Dani Moncayo <dmoncayo <at> gmail.com> writes:
> >
> > I like that (register-delete) command. But I think it should error
> > out if I specify an already empty register.
>
> You can't (try to) delete an empty register with the preview.
(??) Maybe I'm missing something.
If I execute the (delete-register) command you wrote, and then I type
a key which doesn't currently have any register value, what I see is
that the preview window and the prompt message disappear, as if the
command had finished correctly. But I could have accidentally hit the
wrong key, and thought everything went well, when it didn't.
--
Dani Moncayo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75645
; Package
emacs
.
(Sat, 18 Jan 2025 19:07:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 75645 <at> debbugs.gnu.org (full text, mbox):
On Sat, Jan 18, 2025 at 7:44 PM Dani Moncayo <dmoncayo <at> gmail.com> wrote:
>
> On Sat, Jan 18, 2025 at 7:20 PM Thierry Volpiatto <thievol <at> posteo.net> wrote:
> >
> > Dani Moncayo <dmoncayo <at> gmail.com> writes:
> > >
> > > I like that (register-delete) command. But I think it should error
> > > out if I specify an already empty register.
> >
> > You can't (try to) delete an empty register with the preview.
>
> (??) Maybe I'm missing something.
>
> If I execute the (delete-register) command you wrote, and then I type
> a key which doesn't currently have any register value, what I see is
> that the preview window and the prompt message disappear, as if the
> command had finished correctly. But I could have accidentally hit the
> wrong key, and thought everything went well, when it didn't.
Oh, I think I found the misunderstanding: If I do
(customize-set-variable 'register-use-preview 'insist), then I indeed
get an error ("[not matching]") in the echo area.
But with the default value of register-use-preview (traditional), the
(delete-register) command should error out if I try to delete an empty
register, like it does if I try to jump to an empty register.
--
Dani Moncayo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75645
; Package
emacs
.
(Sat, 18 Jan 2025 20:08:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 75645 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Dani Moncayo <dmoncayo <at> gmail.com> writes:
> On Sat, Jan 18, 2025 at 7:44 PM Dani Moncayo <dmoncayo <at> gmail.com> wrote:
>>
>> On Sat, Jan 18, 2025 at 7:20 PM Thierry Volpiatto <thievol <at> posteo.net> wrote:
>> >
>> > Dani Moncayo <dmoncayo <at> gmail.com> writes:
>> > >
>> > > I like that (register-delete) command. But I think it should error
>> > > out if I specify an already empty register.
>> >
>> > You can't (try to) delete an empty register with the preview.
>>
>> (??) Maybe I'm missing something.
>>
>> If I execute the (delete-register) command you wrote, and then I type
>> a key which doesn't currently have any register value, what I see is
>> that the preview window and the prompt message disappear, as if the
>> command had finished correctly. But I could have accidentally hit the
>> wrong key, and thought everything went well, when it didn't.
>
> Oh, I think I found the misunderstanding: If I do
> (customize-set-variable 'register-use-preview 'insist), then I indeed
> get an error ("[not matching]") in the echo area.
>
> But with the default value of register-use-preview (traditional), the
> (delete-register) command should error out if I try to delete an empty
> register, like it does if I try to jump to an empty register.
Yes the default value (traditional) doesn't handle properly such issues
among other things.
--
Thierry
[signature.asc (application/pgp-signature, inline)]
Severity set to 'wishlist' from 'normal'
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Tue, 21 Jan 2025 02:27:02 GMT)
Full text and
rfc822 format available.
This bug report was last modified 199 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.