* bug#33033: 27.0.50; [wishlist] Registers for non-file buffers
@ 2018-10-13 8:09 Helmut Eller
2019-07-11 15:38 ` Lars Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: Helmut Eller @ 2018-10-13 8:09 UTC (permalink / raw)
To: 33033
1.) It would be nice if the register machinery could also be used for
switching to buffers that aren't connected to a file but have
more-or-less fixed names like *shell*, *Backtrace*, or *scratch*.
E.g. (set-register ?s '(buffer "*scratch*")) could set up things so that
C-x r j s would switch to the *scratch* buffer.
2.) Similarly, it would be useful to have a way to switch to a buffer
based on the buffer's mode.
E.g. (set-register ?l '(mode emacs-lisp)) could switch to the last
recently used buffer in emacs-lisp mode.
I suppose I could implement this myself with registerv-make, but maybe
those two use cases should be standardized and documented.
Helmut
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#33033: 27.0.50; [wishlist] Registers for non-file buffers
2018-10-13 8:09 bug#33033: 27.0.50; [wishlist] Registers for non-file buffers Helmut Eller
@ 2019-07-11 15:38 ` Lars Ingebrigtsen
2019-07-11 16:15 ` Helmut Eller
0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-11 15:38 UTC (permalink / raw)
To: Helmut Eller; +Cc: 33033
Helmut Eller <eller.helmut@gmail.com> writes:
> 1.) It would be nice if the register machinery could also be used for
> switching to buffers that aren't connected to a file but have
> more-or-less fixed names like *shell*, *Backtrace*, or *scratch*.
>
> E.g. (set-register ?s '(buffer "*scratch*")) could set up things so that
> C-x r j s would switch to the *scratch* buffer.
Can you use registers today to jump to buffers that are connected to
files? I'm wondering why you're singling out non-file buffers here...
But in general, it seems to me that these keystrokes aren't that much
more efficient than just C-x b scr RET or something.
> 2.) Similarly, it would be useful to have a way to switch to a buffer
> based on the buffer's mode.
>
> E.g. (set-register ?l '(mode emacs-lisp)) could switch to the last
> recently used buffer in emacs-lisp mode.
Hm... I don't quite see the utility here.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#33033: 27.0.50; [wishlist] Registers for non-file buffers
2019-07-11 15:38 ` Lars Ingebrigtsen
@ 2019-07-11 16:15 ` Helmut Eller
2019-07-12 15:14 ` Lars Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: Helmut Eller @ 2019-07-11 16:15 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 33033
On Thu, Jul 11 2019, Lars Ingebrigtsen wrote:
> Helmut Eller <eller.helmut@gmail.com> writes:
>
>> 1.) It would be nice if the register machinery could also be used for
>> switching to buffers that aren't connected to a file but have
>> more-or-less fixed names like *shell*, *Backtrace*, or *scratch*.
>>
>> E.g. (set-register ?s '(buffer "*scratch*")) could set up things so that
>> C-x r j s would switch to the *scratch* buffer.
>
> Can you use registers today to jump to buffers that are connected to
> files? I'm wondering why you're singling out non-file buffers here...
Yes, I have (set-register ?e '(file . "~/.emacs")) in .emacs.
> But in general, it seems to me that these keystrokes aren't that much
> more efficient than just C-x b scr RET or something.
>
>> 2.) Similarly, it would be useful to have a way to switch to a buffer
>> based on the buffer's mode.
>>
>> E.g. (set-register ?l '(mode emacs-lisp)) could switch to the last
>> recently used buffer in emacs-lisp mode.
>
> Hm... I don't quite see the utility here.
Well, you can close this bug.
Helmut
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#33033: 27.0.50; [wishlist] Registers for non-file buffers
2019-07-11 16:15 ` Helmut Eller
@ 2019-07-12 15:14 ` Lars Ingebrigtsen
2021-11-30 14:17 ` Lars Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-12 15:14 UTC (permalink / raw)
To: Helmut Eller; +Cc: 33033
Helmut Eller <eller.helmut@gmail.com> writes:
>> Helmut Eller <eller.helmut@gmail.com> writes:
>>
>>> 1.) It would be nice if the register machinery could also be used for
>>> switching to buffers that aren't connected to a file but have
>>> more-or-less fixed names like *shell*, *Backtrace*, or *scratch*.
>>>
>>> E.g. (set-register ?s '(buffer "*scratch*")) could set up things so that
>>> C-x r j s would switch to the *scratch* buffer.
>>
>> Can you use registers today to jump to buffers that are connected to
>> files? I'm wondering why you're singling out non-file buffers here...
>
> Yes, I have (set-register ?e '(file . "~/.emacs")) in .emacs.
Ah, I see. Yes, then it makes sense to add a `buffer' form, too, I
think?
Does anybody object to this? It seems about as useful as the `file'
form... And looking at the implementation in register.el, it looks
pretty trivial to add.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#33033: 27.0.50; [wishlist] Registers for non-file buffers
2019-07-12 15:14 ` Lars Ingebrigtsen
@ 2021-11-30 14:17 ` Lars Ingebrigtsen
0 siblings, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-30 14:17 UTC (permalink / raw)
To: Helmut Eller; +Cc: 33033
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Ah, I see. Yes, then it makes sense to add a `buffer' form, too, I
> think?
>
> Does anybody object to this? It seems about as useful as the `file'
> form... And looking at the implementation in register.el, it looks
> pretty trivial to add.
I've now added this to Emacs 29.
As for the:
> E.g. (set-register ?l '(mode emacs-lisp)) could switch to the last
> recently used buffer in emacs-lisp mode.
I don't think that sounds generally useful enough, so I've not added
that.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-11-30 14:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-13 8:09 bug#33033: 27.0.50; [wishlist] Registers for non-file buffers Helmut Eller
2019-07-11 15:38 ` Lars Ingebrigtsen
2019-07-11 16:15 ` Helmut Eller
2019-07-12 15:14 ` Lars Ingebrigtsen
2021-11-30 14:17 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.