[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding transient to Emacs core
From: |
Philip Kaludercic |
Subject: |
Re: Adding transient to Emacs core |
Date: |
Tue, 27 Apr 2021 15:21:26 +0000 |
Jonas Bernoulli <jonas@bernoul.li> writes:
> Any Emacs command can be added as the suffix of a transient prefix
> command, for example:
>
> (transient-define-prefix my-buffer-commands ()
> "Do stuff to buffers."
> [:description (lambda () (format "Act on current buffer (%s)"
> (current-buffer)))
> ("k" "kill the current buffer" kill-this-buffer)])
>
> (global-set-key [f1] 'my-buffer-commands)
I just tried this out, and it seems that transient it very different
compared to magit-popup, that powers my local version of magit (from
MELPA Stable).
I am uncertain how I feel about this, as it seems to be something
completely different than what I was thinking about all the time.
At the same time it does not seem obvious why, especially with transient
menus that may contain a lot of options (say a ffmpeg interface)
shouldn't be able to use the entire frame. Especially from a user
perspective.
> If the selected window were repurposed to display transient's buffer,
> then that would change what buffer is the current buffer and it would
> become impossible to act on the buffer that was previously the current
> buffer or on "the thing under the cursor" in that buffer.
What do you mean by "what buffer is the current buffer"? I am somewhat
confused by what you are trying to say here.
> Re-purposing the selected window would massively reduce the usefulness
> of a huge number of commands or even make them completely useless.
Again, I do not see how this follows? My verison of Magit has
magit-display-buffer-function, that allows me to display the buffer in
the selected window, with no loss of functionality. What does transient
do or need that prevents this?
--
Philip K.
- Re: Adding transient to Emacs core, (continued)
- Re: Adding transient to Emacs core, Jonas Bernoulli, 2021/04/27
- Re: Adding transient to Emacs core, Philip Kaludercic, 2021/04/27
- Re: Adding transient to Emacs core, Gregory Heytings, 2021/04/27
- Re: Adding transient to Emacs core, Jonas Bernoulli, 2021/04/27
- Re: Adding transient to Emacs core, Gregory Heytings, 2021/04/27
- Re: Adding transient to Emacs core, Jonas Bernoulli, 2021/04/27
- Re: Adding transient to Emacs core,
Philip Kaludercic <=
- Re: Adding transient to Emacs core, Jonas Bernoulli, 2021/04/27
- Re: Adding transient to Emacs core, martin rudalics, 2021/04/27
- Re: Adding transient to Emacs core, Jonas Bernoulli, 2021/04/27