unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: 55412@debbugs.gnu.org, acm@muc.de, tanzer@swing.co.at
Subject: bug#55412: 28.1; In Emacs 28.1, using ':eval' in 'frame-title-format' doesn't work properly
Date: Sat, 21 May 2022 11:59:43 +0300	[thread overview]
Message-ID: <83zgjb8dmo.fsf@gnu.org> (raw)
In-Reply-To: <5b197424-4849-9771-ff1d-41b7a8295ba2@gmx.at> (message from martin rudalics on Sat, 21 May 2022 10:32:51 +0200)

> Date: Sat, 21 May 2022 10:32:51 +0200
> Cc: Eli Zaretskii <eliz@gnu.org>, 55412@debbugs.gnu.org, tanzer@swing.co.at
> From: martin rudalics <rudalics@gmx.at>
> 
>  > I get nervous when I see "selected_frame = ...;" or "selected_window =
>  > ....;" outside of do_switch_frame or the corresponding window function,
>  > since it means selected_{frame,window} have been set without regard to
>  > all the other things which must be kept in synch with them.  At the
>  > moment, all these "wild" settings of selected_frame are in xdisp.c,
>  > which I suppose has special reasons for them.
> 
> What concerns me is that xdisp.c sets selected_window and selected_frame
> in the first place (also due to my attempts to fix Bug#39977).  My patch
> removes them all.

Frankly, I don't understand why would we want that.  AFAICT, that
patch just moves those assignments to a single place, and what does
that gain us, as counter-weight to potential breakage due to subtly
different stuff the original code was doing?  The new code also makes
the temporary change in the selected window more heavy and expensive,
which is not a good idea inside redisplay.

Note that redisplay also changes the current buffer, and it does that
independently of selecting a window.  I'm not sure window.c is ready
(or was designed) for such subtleties.

> Moreover, the code has to guarantee that selecting a window correctly
> sets up point from the window's point and stores the old point in the
> previously selected window#s point.  And it obviously has to guarantee
> that the involved buffers, windows and frames are alive when switching
> to and back from them - things redisplay had always problems with
> (confer Bug#47244).  Not reliably doing all these things in one place
> easily produces bugs that show up only in sessions that run for a long
> time and are consequently very difficult to debug.

The general advantage of doing things in one place is well known, but
I'm not sure this particular case lends itself well to such
generalizations.  IMNSHO, we are once again rocking a boat for no good
reason (and no, the problems in bug#47244 do _not_ IMO justify this,
because that bug can be fixed in other ways, as mentioned in that and
related discussions several times).

Bottom line, I'm not happy about this patch, sorry.





  reply	other threads:[~2022-05-21  8:59 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-14 15:45 bug#55412: 28.1; In Emacs 28.1, using ':eval' in 'frame-title-format' doesn't work properly Christian Tanzer
2022-05-14 16:58 ` Eli Zaretskii
2022-05-14 17:07   ` Eli Zaretskii
2022-05-15  9:48   ` Alan Mackenzie
2022-05-15 10:16     ` Eli Zaretskii
2022-05-16 20:52   ` Alan Mackenzie
2022-05-17 13:25     ` Eli Zaretskii
2022-05-18  7:19     ` martin rudalics
2022-05-18 11:35       ` Eli Zaretskii
2022-05-18 15:01         ` martin rudalics
2022-05-18 15:12           ` Alan Mackenzie
2022-05-18 15:49           ` Alan Mackenzie
2022-05-18 16:03             ` Eli Zaretskii
2022-05-18 16:38               ` Alan Mackenzie
2022-05-18 16:51                 ` Eli Zaretskii
2022-05-20  8:23                   ` martin rudalics
2022-05-20 10:58                     ` Eli Zaretskii
2022-05-21  8:32                       ` martin rudalics
2022-05-21  8:35                         ` Eli Zaretskii
2022-05-20 11:33                     ` Alan Mackenzie
2022-05-20 12:10                       ` Eli Zaretskii
2022-05-21  8:32                       ` martin rudalics
2022-05-21  8:59                         ` Eli Zaretskii [this message]
2022-05-19  7:18             ` martin rudalics
2022-05-20 20:39   ` Alan Mackenzie
2022-05-21 11:25     ` tanzer--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-21 12:35       ` Eli Zaretskii
2022-05-22 17:34       ` Alan Mackenzie
2022-05-15  9:28 ` martin rudalics

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=83zgjb8dmo.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=55412@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=rudalics@gmx.at \
    --cc=tanzer@swing.co.at \
    /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).