From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#32672: 27.0.50; image resize on window resizing Date: Thu, 20 Sep 2018 02:15:34 +0300 Organization: LINKOV.NET Message-ID: <875zz1t6y1.fsf@mail.linkov.net> References: <87pnxmyjgt.fsf@mail.linkov.net> <87ftyfoakb.fsf@mail.linkov.net> <5B98B33D.7000605@gmx.at> <871s9ycnjl.fsf@mail.linkov.net> <5B9A15DA.5000403@gmx.at> <87efdxnfww.fsf@mail.linkov.net> <5B9B7253.5060808@gmx.at> <87pnxexr2m.fsf@mail.linkov.net> <5B9E1E0E.7070805@gmx.at> <87h8ip2eby.fsf@mail.linkov.net> <5B9F4DBD.5020009@gmx.at> <877ejjzr9s.fsf@mail.linkov.net> <5BA20763.8070305@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1537399493 15761 195.159.176.226 (19 Sep 2018 23:24:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 19 Sep 2018 23:24:53 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 32672@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 20 01:24:49 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g2lpw-0003yT-5y for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Sep 2018 01:24:48 +0200 Original-Received: from localhost ([::1]:47679 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2ls2-0000AR-KK for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Sep 2018 19:26:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2lrK-0008EJ-Ry for bug-gnu-emacs@gnu.org; Wed, 19 Sep 2018 19:26:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g2lrD-00087w-Gi for bug-gnu-emacs@gnu.org; Wed, 19 Sep 2018 19:26:12 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41891) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g2lr9-00080h-2n for bug-gnu-emacs@gnu.org; Wed, 19 Sep 2018 19:26:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g2lr8-0005Y7-UI for bug-gnu-emacs@gnu.org; Wed, 19 Sep 2018 19:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Sep 2018 23:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32672 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32672-submit@debbugs.gnu.org id=B32672.153739950721240 (code B ref 32672); Wed, 19 Sep 2018 23:26:02 +0000 Original-Received: (at 32672) by debbugs.gnu.org; 19 Sep 2018 23:25:07 +0000 Original-Received: from localhost ([127.0.0.1]:46144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g2lqE-0005WT-Tn for submit@debbugs.gnu.org; Wed, 19 Sep 2018 19:25:07 -0400 Original-Received: from pop.dreamhost.com ([64.90.62.162]:38500 helo=pdx1-sub0-mail-a11.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g2lqC-0005WJ-E1 for 32672@debbugs.gnu.org; Wed, 19 Sep 2018 19:25:04 -0400 Original-Received: from pdx1-sub0-mail-a11.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a11.g.dreamhost.com (Postfix) with ESMTP id 5E15880087; Wed, 19 Sep 2018 16:25:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=w2vezGVwYf+GUlCrgQ6J1wHkjec=; b= QShM1GAmbZmqemU0QAwZcrg5fiYWMz2t7dopCBcPbZy5mC0c8cvgmPvRFigi1hWl dyR0lx9Gt2i79WROIbHQTLQh9rD8MYzOTe2UEYY2tQkzgV1OHHyZ8NaQrkItvWam aktQNieeuRgbts54qiy1qbvgi5G5r40xvAa7u6Gqus8= Original-Received: from localhost.linkov.net (m91-129-107-237.cust.tele2.ee [91.129.107.237]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a11.g.dreamhost.com (Postfix) with ESMTPSA id 59B888007B; Wed, 19 Sep 2018 16:25:02 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a11 X-DH-BACKEND: pdx1-sub0-mail-a11 In-Reply-To: <5BA20763.8070305@gmx.at> (martin rudalics's message of "Wed, 19 Sep 2018 10:22:59 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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" Xref: news.gmane.org gmane.emacs.bugs:150464 Archived-At: >> 2 ... current: *scratch* ... window-buffer: *info* >> >> which is in an inconsistent state, > > ... not really - look at the backtrace: But the problem is that the buffer-local hook will have such idiomatic code: (with-current-buffer (window-buffer window) ... where window-buffer will return a wrong buffer. >> and after typing `q' the hook is called 3 times >> >> 3 ... current: *scratch* ... window-buffer: *scratch* >> 4 ... current: *scratch* ... window-buffer: *scratch* >> 5 ... current: *scratch* ... window-buffer: *scratch* > > Look at the backtraces: > > And this one comes from burying the *info* buffer. What should we do > instead? I don't know. In this particular feature request I'm going to use debounce, but for general case I don't see how to optimize it. >> And there is the workflow how to break the correct order >> of `C-x C-x ': >> >> 1. Create *info* buffer: `C-h i' and quit `q' >> 2. Split windows `C-x 2' or `C-x 3' (both windows display *scratch*) >> 3. Check that `C-x C-x ' correctly returns to the original >> buffer *scratch* in the first window. >> 4. After `C-x o' in another window `C-x C-x ' >> doesn't return to the original buffer *scratch*. >> It displays *info*. > > Evidently, this comment for 'record-window-buffer' > > ;; The following function is called by `set-window-buffer' _before_ it > ;; replaces the buffer of the argument window with the new buffer. > > had its purpose. Please try the attached patch. Thanks, now the problem is not reproducible.