From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#19576: write-file writes the wrong buffer Date: Mon, 23 Nov 2015 18:28:48 +0000 Message-ID: <20151123182848.GF2004@acm.fritz.box> References: <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> <5651A23A.3030907@gmx.at> <83ziy62gcw.fsf@gnu.org> <5651FF6B.90609@gmx.at> <83vb8szied.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1448303274 3599 80.91.229.3 (23 Nov 2015 18:27:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 23 Nov 2015 18:27:54 +0000 (UTC) Cc: 19576@debbugs.gnu.org, andlind@gmail.com, juri@linkov.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 23 19:27:43 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 1a0vpV-00077s-80 for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Nov 2015 19:27:09 +0100 Original-Received: from localhost ([::1]:33994 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0vpV-0000ls-SQ for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Nov 2015 13:27:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0vpS-0000jw-2w for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2015 13:27:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0vpO-000490-R0 for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2015 13:27:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0vpO-00048w-OD for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2015 13:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a0vpO-000841-I0 for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2015 13:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Nov 2015 18:27:02 +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.144830320930953 (code B ref 19576); Mon, 23 Nov 2015 18:27:02 +0000 Original-Received: (at 19576) by debbugs.gnu.org; 23 Nov 2015 18:26:49 +0000 Original-Received: from localhost ([127.0.0.1]:49818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0vpB-000838-0Z for submit@debbugs.gnu.org; Mon, 23 Nov 2015 13:26:49 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:39423) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0vp8-00082m-Th for 19576@debbugs.gnu.org; Mon, 23 Nov 2015 13:26:47 -0500 Original-Received: (qmail 42153 invoked by uid 3782); 23 Nov 2015 18:26:45 -0000 Original-Received: from acm.muc.de (p579E89A6.dip0.t-ipconnect.de [87.158.137.166]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 23 Nov 2015 19:26:44 +0100 Original-Received: (qmail 9734 invoked by uid 1000); 23 Nov 2015 18:28:48 -0000 Content-Disposition: inline In-Reply-To: <83vb8szied.fsf@gnu.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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:109137 Archived-At: Hello, Eli and Martin. On Mon, Nov 23, 2015 at 08:21:14PM +0200, Eli Zaretskii wrote: > > Date: Sun, 22 Nov 2015 18:46:19 +0100 > > From: martin rudalics > > CC: acm@muc.de, 19576@debbugs.gnu.org, andlind@gmail.com, > > juri@linkov.net > > > > > I couldn't think of any situation that would cause that. It would > > > require a resize of windows outside redisplay that would also cause > > > redisplay to decide that the mini-window needs to be resized. If you > > > can come up with a recipe for this, we should indeed remove the "just > > > once" promise. > > > > A silly example with emacs -Q is > > > > (defvar fun 0) > > > > (defun fun (frame) > > "..." > > (message "\n%s\n" (setq fun (1+ fun))) (ding)) > > > > (add-hook 'window-size-change-functions 'fun) > > > > This gets me complete erratic behavior when moving point. > Maybe I'm blind, but I don't see anything erratic. > > Another example is > > > > (defvar fun 0) > > > > (defun fun (frame) > > "..." > > (message "%s" (setq fun (1+ fun))) (ding)) > > > > (add-hook 'window-size-change-functions 'fun) > > > > (progn > > (tool-bar-mode -1) > > (sit-for 1) > > (tool-bar-mode 1)) > > > > With my patch for bug#21975 this runs ‘fun’ twice when the tool-bar is > > reenabled. Likely due to my calculations of the real tool bar height. > I see that, but does that mean we should remove the "once only" > promise? Or, alternatively, perhaps reconsider my proposed patch from a few days ago which has w-s-c-functions run at most once for any redisplay operation. -- Alan Mackenzie (Nuremberg, Germany).