unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Madhu <enometh@meer.net>
To: jonas@bernoul.li
Cc: emacs-devel@gnu.org
Subject: Re: Adding transient to Emacs core
Date: Mon, 26 Apr 2021 23:03:18 +0530 (IST)	[thread overview]
Message-ID: <20210426.230318.88708181443886760.enometh@meer.net> (raw)
In-Reply-To: <87pmyhdvla.fsf@bernoul.li>

*  Jonas Bernoulli <jonas@bernoul.li> <87pmyhdvla.fsf@bernoul.li>
Wrote on Mon, 26 Apr 2021 15:27:45 +0200

> I have replied to your mail by asking you to refrain from remarks like
> this and that you communicate publicly.  I requested the latter in the
> hope that that would help with the former.

[I apologize - I wasn't sensitized enough to your sensibilities.]

> Just re-sending a mail from two years ago also means that it ignores
> all technical improvements since than.

This may be true: the version I was using was a commit from June 2020.

>> Besides the new window is not scrollable or searchable, it doesnt
>> support any standard emacs operations.
>
> No longer true, but you have to explicitly enable it with:
>
>   (setq transient-enable-popup-navigation t)
>
>> with-demoted-errors does not always work in killing off the new frame,
>> and emacs gets into a generally irrecoverable state (unless you have
>> taken precautions after having studied the transient.el's failure
>> modes before)
>
> This no longer happens. I have figured out the last remaining heisenbug
> that could put Emacs in an inconsistent state months ago and there have
> been zero new reports since then.  The error handling also has improved
> substantially, so even if something does go spectacularly wrong, this
> should no longer put Emacs in an inconsistent state.

I assume this is on the current `master' branch - and will be using
this shortly.


>> This design leads to spectacular failure modes with emacs and does not
>> really close issue #44.  The assumption in transient's code is that
>> display-buffer-in-side-window will always succeed but that is not how
>> display-buffer is specified to work:
>>
>> If a window cannot be popped up in the current frame display-buffer
>> will create a new frame.
>
> There is room for improvement, but the current worst case scenario is
> the following.  Note that this can only happen if the current frame is
> (1) less than ~5 lines high, (2) no other frame already exists, and (3)
> the window manager selects the newly created frame.  In that case a new
> frame briefly flashes and disappears again.  I.e. it is impossible to
> invoke the suffixes of that transient prefix command, but Emacs does not
> enter any "spectacular failure modes" (no transient keymaps and/or hooks
> get stuck).  You can simply increase the frame size and then invoke the
> transient prefix again.

(setq pop-up-windows nil) is a valid setting.

The spectacular scenarios I've encountered are when the frame did
*not* go away - and you cannot or control emacs and have to switch to
a different terminal and kill it.

I hope you understand the inconvenience that this sort of situation
causes.

I understans that you say this has been addressed.


> Fixing this remaining issue might be as easy as:
>
>   (define-key transient-predicate-map
>     [handle-switch-frame] 'transient--do-stay)
>
> This is not the default yet but I might do this or something similar in
> the near future.  This also makes it possible to:
>
>   (setq transient-display-buffer-action
>         '(display-buffer-pop-up-frame))
>
> And even without that there were several alternative display actions
> available that work just fine, e.g.:
>
>   (setq transient-display-buffer-action
>         '(display-buffer-in-child-frame))
>
>   (setq transient-display-buffer-action
>         '(display-buffer-below-selected))

>> (since you are using display-buffer to display this pop-up window you
>> are effectively supporting user customization of display-buffer. In
>> which case you should not use display-buffer at all since you cannot
>> support legitimate use of display-buffer)
>
> Yes, transient does not support every conceivable display action, but
> neither does anything else.  What you are saying here is "you don't
> support all possible customizations, therefore you should offer none".

If you say that (pop-up-windows nil) is not a valid customization, I
would strongly disagree with that.

If transient cannot handle input for some configuration then there
should be a fallback to emacs mechanisms that *can* handle input.

If the package does not support use display-buffer according to the
design of display-buffer, I maintain it will have a negative impact if
adopted in the core and one is constrained to use it (instead of
keeping it optional)





  reply	other threads:[~2021-04-26 17:33 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 [this message]
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
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=20210426.230318.88708181443886760.enometh@meer.net \
    --to=enometh@meer.net \
    --cc=emacs-devel@gnu.org \
    --cc=jonas@bernoul.li \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).