all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jonas Bernoulli <jonas@bernoul.li>
To: Gregory Heytings <gregory@heytings.org>
Cc: Madhu <enometh@meer.net>, emacs-devel@gnu.org
Subject: Re: Adding transient to Emacs core
Date: Tue, 27 Apr 2021 14:05:48 +0200	[thread overview]
Message-ID: <875z08lyoz.fsf@bernoul.li> (raw)
In-Reply-To: <fe6aee4ffd604a0d013e@heytings.org>

Gregory Heytings <gregory@heytings.org> writes:

>>
>> I have addressed this by let-binding that variable to t around the call 
>> to display-buffer.  There's just no way around that because transient's 
>> buffer just has to be displayed somewhere other than the selected 
>> window.
>>
>
> I agree with Philip here: why is there "just no way around that"?  At 
> least when the frame is too small, it could make sense to display the 
> transient buffer "above" the selected window.

Many Emacs commands operate on the "current thing".  Different commands
treat different things as the current thing.  It could be the selected
frame or window, the current buffer, line, character, value of a certain
text property at point, ...

`kill-this-buffer' for example operates on the current buffer.

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)

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.

Re-purposing the selected window would massively reduce the usefulness
of a huge number of commands or even make them completely useless.



  reply	other threads:[~2021-04-27 12:05 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-19 15:51 Adding transient to Emacs core Jonas Bernoulli
2021-04-19 16:07 ` Eli Zaretskii
2021-04-20 12:39   ` Jonas Bernoulli
2021-04-20 13:01     ` Eli Zaretskii
2021-04-20 16:53       ` Jonas Bernoulli
2021-04-20 17:22         ` Kévin Le Gouguec
2021-04-20 18:05           ` Stefan Kangas
2021-04-20 13:19 ` Dmitry Gutov
2021-04-20 16:59   ` Jonas Bernoulli
2021-04-20 17:07     ` Dmitry Gutov
2021-04-26  2:30 ` Madhu
2021-04-26 11:51   ` Eli Zaretskii
2021-04-26 12:54     ` Philip Kaludercic
2021-04-26 13:07       ` Eli Zaretskii
2021-04-26 17:56     ` Madhu
2021-04-26 18:12       ` Eli Zaretskii
     [not found]         ` <20210427.073903.1397547038526168961.enometh@meer.net>
2021-04-27  2:36           ` Eli Zaretskii
2021-04-26 13:27   ` Jonas Bernoulli
2021-04-26 17:33     ` Madhu
2021-04-26 17:44       ` Eli Zaretskii
2021-04-26 17:52       ` Stefan Monnier
2021-04-27  2:03         ` Madhu
2021-04-27  3:29           ` Stefan Monnier
2021-04-27  9:00       ` Jonas Bernoulli
2021-04-27 10:51         ` Philip Kaludercic
2021-04-27 11:01         ` Gregory Heytings
2021-04-27 12:05           ` Jonas Bernoulli [this message]
2021-04-27 12:26             ` Gregory Heytings
2021-04-27 15:24               ` Jonas Bernoulli
2021-04-27 15:21             ` Philip Kaludercic
2021-04-27 21:11               ` Jonas Bernoulli
2021-04-27 12:08         ` martin rudalics
2021-04-27 15:03           ` Jonas Bernoulli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875z08lyoz.fsf@bernoul.li \
    --to=jonas@bernoul.li \
    --cc=emacs-devel@gnu.org \
    --cc=enometh@meer.net \
    --cc=gregory@heytings.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.