[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19576: write-file writes the wrong buffer
From: |
Eli Zaretskii |
Subject: |
bug#19576: write-file writes the wrong buffer |
Date: |
Thu, 19 Nov 2015 17:44:54 +0200 |
> Date: Thu, 19 Nov 2015 09:12:50 +0100
> From: martin rudalics <rudalics@gmx.at>
> CC: andlind@gmail.com, 19576@debbugs.gnu.org
>
> > Thanks for working on this, Martin. However, I don't think we should
> > install this change. We call Lisp hooks from many places, including
> > maybe a dozen in the display engine. It makes little sense to make
> > only one of them resistant to this kind of problems. OTOH, if we do
> > this everywhere, I feel that we will unduly punish 99.999% percent of
> > legitimate users of these hooks just because one of them had a bug.
>
> 100% agreed. But run_window_configuration_change_hook goes a long way
> saving and restoring current buffer and selected window around each call
> to a function on ‘window-configuration-change-hook’.
That function isn't called by the display engine, but only by a
handful of functions that react to changes in windows. So I really
don't consider that to be an analogous case, sorry.
> People who put their functions on ‘window-size-change-functions’ and
> ‘window-configuration-change-hook’ usually don't care about the precise
> reason why these function get called. They simply want to cover all
> cases where a new window appears or a specific window changes size. Do
> we really expect them to add a ‘save-window-excursion’ in one case and
> avoid it in the other because it would mean unnecessary extra work?
Yes, we do. Hooks called by the display engine should be coded very
carefully, because they are a large part of that proverbial rope that
Emacs gives us to hang ourselves. If they don't write those hooks
with great care, they get what they deserve.
- bug#19576: write-file writes the wrong buffer, (continued)
- bug#19576: write-file writes the wrong buffer, John Wiegley, 2015/11/18
- bug#19576: write-file writes the wrong buffer, Anders Lindgren, 2015/11/19
- bug#19576: write-file writes the wrong buffer, Eli Zaretskii, 2015/11/19
- bug#19576: write-file writes the wrong buffer, Johan Bockgård, 2015/11/22
- bug#19576: write-file writes the wrong buffer, Johan Bockgård, 2015/11/22
- bug#19576: write-file writes the wrong buffer, Eli Zaretskii, 2015/11/22
- bug#19576: write-file writes the wrong buffer, martin rudalics, 2015/11/17
- bug#19576: write-file writes the wrong buffer, Anders Lindgren, 2015/11/17
- bug#19576: write-file writes the wrong buffer, Eli Zaretskii, 2015/11/18
- bug#19576: write-file writes the wrong buffer, martin rudalics, 2015/11/19
- bug#19576: write-file writes the wrong buffer,
Eli Zaretskii <=
- bug#19576: write-file writes the wrong buffer, martin rudalics, 2015/11/20
- bug#19576: write-file writes the wrong buffer, Eli Zaretskii, 2015/11/20
bug#19576: write-file writes the wrong buffer, Alan Mackenzie, 2015/11/17