From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Anders Lindgren Newsgroups: gmane.emacs.bugs Subject: bug#19576: write-file writes the wrong buffer Date: Sat, 21 Nov 2015 21:33:52 +0100 Message-ID: References: <564A3292.2050807@gmx.at> <87fv05phpw.fsf@mail.linkov.net> <20151117200204.GA5054@acm.fritz.box> <83lh9v9p7k.fsf@gnu.org> <20151118232304.GB1690@acm.fritz.box> <83mvua7z8k.fsf@gnu.org> <83k2pb4mc9.fsf@gnu.org> <20151121155658.GA3636@acm.fritz.box> <83bnan4a01.fsf@gnu.org> <5650B79A.1090504@gmx.at> <83610v42yy.fsf@gnu.org> <5650BB77.40106@gmx.at> <834mgf41ci.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1143a94c03ab23052512e95f X-Trace: ger.gmane.org 1448138063 2209 80.91.229.3 (21 Nov 2015 20:34:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Nov 2015 20:34:23 +0000 (UTC) Cc: 19576@debbugs.gnu.org, Alan Mackenzie , Juri Linkov To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 21 21:34:14 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a0ErK-0006Rk-LM for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Nov 2015 21:34:10 +0100 Original-Received: from localhost ([::1]:53592 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0ErK-0000lu-01 for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Nov 2015 15:34:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0ErF-0000lj-Gx for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2015 15:34:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0ErC-0000gR-8f for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2015 15:34:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57628) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0ErC-0000gH-4T for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2015 15:34:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a0ErB-0008Uu-UY for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2015 15:34:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Anders Lindgren Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Nov 2015 20:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19576 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19576-submit@debbugs.gnu.org id=B19576.144813803532651 (code B ref 19576); Sat, 21 Nov 2015 20:34:01 +0000 Original-Received: (at 19576) by debbugs.gnu.org; 21 Nov 2015 20:33:55 +0000 Original-Received: from localhost ([127.0.0.1]:47336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0Er4-0008UW-Ez for submit@debbugs.gnu.org; Sat, 21 Nov 2015 15:33:55 -0500 Original-Received: from mail-vk0-f44.google.com ([209.85.213.44]:34424) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0Er2-0008UP-VW for 19576@debbugs.gnu.org; Sat, 21 Nov 2015 15:33:53 -0500 Original-Received: by vkbs1 with SMTP id s1so17040048vkb.1 for <19576@debbugs.gnu.org>; Sat, 21 Nov 2015 12:33:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=NxOFSa1US8rw5WQTBEvHIIVTfLhI+2kryLod1RuMdIA=; b=rOTqE4efqKLCnW0quh++lJpkUYPBSBXVnbFQdgQq4fLr2G8+Ufyuw3lKQ2KS4Dul0O /G3Sqz6XDK6+f68fOFiFkSnowSizTfGrZftcFeoijlqcpW6QZVC0KmkufYELaFlqmtND Cp4l9Akzj9/2828epnaHSK4ieqK36bxF1nDF+DlOi5pHUO1mElzu7WtiXL+JfiW8JCWm mq1xQKGBcn1dD56zruQAxHafyCFs3CyVpOHM4z2aM0CL0DXLq2YwelFnWLyulMItxh99 PvfD+QRCR+HWMk6KjJjz76qByOs6lpO5uPYjm2Al13kFHa1doWjuGOdylOIcemj3N2qk lhcg== X-Received: by 10.31.146.66 with SMTP id u63mr7657197vkd.31.1448138032508; Sat, 21 Nov 2015 12:33:52 -0800 (PST) Original-Received: by 10.31.210.133 with HTTP; Sat, 21 Nov 2015 12:33:52 -0800 (PST) In-Reply-To: <834mgf41ci.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:109033 Archived-At: --001a1143a94c03ab23052512e95f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Auhm -- when starting to write the bug report I decided to make sure I got all the facts right. Unfortunately, it turned out that I had run an old Emacs 23 on X11 -- which do run the window-size-change-functions. When testing on an Emacs 25 on X11, it turns out that it doesn't. Back on the mac, I see the same pattern. In other words: On Emacs 23, window-size-change-functions is called when the user manually resized the frame. On Emacs 24 and Emacs 25 it isn't. Sorry for the mixup. Anyway, I just reported this regression as bug#21975. I noticed this since Follow-mode no longer aligns its windows automatically when the user resized the frame. In practice, this is not a big problem since they will become aligned at the first user interaction instead. -- Anders On Sat, Nov 21, 2015 at 8:08 PM, Eli Zaretskii wrote: > > Date: Sat, 21 Nov 2015 19:44:07 +0100 > > From: martin rudalics > > CC: andlind@gmail.com, acm@muc.de, 19576@debbugs.gnu.org, > > juri@linkov.net > > > > > We could run both types of hooks, couldn't we? > > > > As I said we do that already for splitting and deleting windows. So we > > obviously could. But this means that packages run the same function > > twice because they are used to run the same function in both hooks. > > That'[s why I think we should do this on master, to see if this causes > any problems. > > > > The documentation > > > seems to suggest that both of them should be run in this situation. > > > > =E2=80=98window-configuration-change-hook=E2=80=99 shouldn't run since = the window > > configuration does not change. > > But the ELisp manual says it should: > > -- Variable: window-configuration-change-hook > A normal hook that is run every time you change the window > configuration of an existing frame. This includes splitting or > deleting windows, changing the sizes of windows, or displaying a > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > different buffer in a window. > > > But why should we OT1H make =E2=80=98window-size-change-functions=E2=80= =99 more > > efficient when OTOH we call it after we already called > > =E2=80=98window-configuration-change-hook=E2=80=99? > > Sorry, I don't see the relevance of efficiency to this issue. > --001a1143a94c03ab23052512e95f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Auhm -- when starting to write the bug report I decided to= make sure I got all the facts right.

Unfortunately, it = turned out that I had run an old Emacs 23 on X11 -- which do run the window= -size-change-functions. When testing on an Emacs 25 on X11, it turns out th= at it doesn't. Back on the mac, I see the same pattern.

<= /div>
In other words: On Emacs 23, window-size-change-functions is call= ed when the user manually resized the frame. On Emacs 24 and Emacs 25 it is= n't.

Sorry for the mixup.

=
Anyway, I just reported this regression as bug#21975.

I noticed this since Follow-mode no longer aligns its windows auto= matically when the user resized the frame. In practice, this is not a big p= roblem since they will become aligned at the first user interaction instead= .

=C2=A0 =C2=A0 -- Anders


On Sat, Nov 21,= 2015 at 8:08 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> Date: Sat, 21 Nov 2015 19:44:07 +0100
> From: martin rudalics <rudalics@= gmx.at>
> CC: andlind@gmail.com, acm@muc.de, 19576@debbugs.gnu.org,
>=C2=A0 juri@linkov.net
>
>=C2=A0 > We could run both types of hooks, couldn't we?
>
> As I said we do that already for splitting and deleting windows.=C2=A0= So we
> obviously could.=C2=A0 But this means that packages run the same funct= ion
> twice because they are used to run the same function in both hooks.
That'[s why I think we should do this on master, to see if this = causes
any problems.

>=C2=A0 > The documentation
>=C2=A0 > seems to suggest that both of them should be run in this si= tuation.
>
> =E2=80=98window-configuration-change-hook=E2=80=99 shouldn't run s= ince the window
> configuration does not change.

But the ELisp manual says it should:

=C2=A0 =C2=A0-- Variable: window-configuration-change-hook
=C2=A0 =C2=A0 =C2=A0 =C2=A0A normal hook that is run every time you change = the window
=C2=A0 =C2=A0 =C2=A0 =C2=A0configuration of an existing frame.=C2=A0 This i= ncludes splitting or
=C2=A0 =C2=A0 =C2=A0 =C2=A0deleting windows, changing the sizes of windows,= or displaying a
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
=C2=A0 =C2=A0 =C2=A0 =C2=A0different buffer in a window.

> But why should we OT1H make =E2=80=98window-size-change-functions=E2= =80=99 more
> efficient when OTOH we call it after we already called
> =E2=80=98window-configuration-change-hook=E2=80=99?

Sorry, I don't see the relevance of efficiency to this issue.

--001a1143a94c03ab23052512e95f--