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: Tue, 18 Sep 2018 01:35:27 +0300 Organization: LINKOV.NET Message-ID: <877ejjzr9s.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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1537224203 29650 195.159.176.226 (17 Sep 2018 22:43:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 17 Sep 2018 22:43:23 +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 Tue Sep 18 00:43:19 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 1g22Eg-0007al-DZ for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Sep 2018 00:43:18 +0200 Original-Received: from localhost ([::1]:37654 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g22Gn-0000Pn-1J for geb-bug-gnu-emacs@m.gmane.org; Mon, 17 Sep 2018 18:45:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g22Ev-0007kN-DR for bug-gnu-emacs@gnu.org; Mon, 17 Sep 2018 18:43:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g22Ay-0008WP-67 for bug-gnu-emacs@gnu.org; Mon, 17 Sep 2018 18:39:31 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39186) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g22AY-0007yr-C8 for bug-gnu-emacs@gnu.org; Mon, 17 Sep 2018 18:39:27 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g22AY-0005uK-13 for bug-gnu-emacs@gnu.org; Mon, 17 Sep 2018 18:39: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: Mon, 17 Sep 2018 22:39:01 +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.153722393022686 (code B ref 32672); Mon, 17 Sep 2018 22:39:01 +0000 Original-Received: (at 32672) by debbugs.gnu.org; 17 Sep 2018 22:38:50 +0000 Original-Received: from localhost ([127.0.0.1]:43444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g22AL-0005tq-S6 for submit@debbugs.gnu.org; Mon, 17 Sep 2018 18:38:50 -0400 Original-Received: from pop.dreamhost.com ([64.90.62.162]:38526 helo=pdx1-sub0-mail-a21.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g22AJ-0005ti-RH for 32672@debbugs.gnu.org; Mon, 17 Sep 2018 18:38:48 -0400 Original-Received: from pdx1-sub0-mail-a21.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a21.g.dreamhost.com (Postfix) with ESMTP id B5AE57F11B; Mon, 17 Sep 2018 15:38:46 -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=KPju27CH7m4vnMx76LeLxcNBgdo=; b= i23t85UtO3id5K2FesYHsNvRVNuVAnSad4m3TdJ4MlM8avjqGhb39H3n3JJrkWPd H23NdDFIuiaR0hshmMS1seID+MFWs8pNNhkghkW6613riLrcT1ufqJEHOGeKR7Up mV6o4bM2WzEHIkaRIxrricjEous5qycG2PE+vdGR/LE= 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-a21.g.dreamhost.com (Postfix) with ESMTPSA id A705B7E435; Mon, 17 Sep 2018 15:38:45 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a21 X-DH-BACKEND: pdx1-sub0-mail-a21 In-Reply-To: <5B9F4DBD.5020009@gmx.at> (martin rudalics's message of "Mon, 17 Sep 2018 08:46:21 +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:150384 Archived-At: >> I tried but the hook still not called. Moreover, it broke something: >> after `C-x ' I need to type `C-x ' twice to get back >> to the original buffer. > > Suppose with emacs -Q I load the following code: > > (defvar count 0) > > (defun foo () > (setq count (1+ count)) > (message "%s ... current: %s ... window-buffer: %s" > count (current-buffer) (window-buffer))) > > (with-current-buffer "*scratch*" > (add-hook 'buffer-list-update-hook 'foo nil t)) > > This gets me an initial > > 1 ... current: *scratch* ... window-buffer: *scratch* > > When I now type C-x and then C-x I get > > 2 ... current: *scratch* ... window-buffer: *scratch* > > and my window shows *scratch*. What do you get? Please try with more buffers than initial 2 (*scratch* and *Messages*), e.g. with *info* (just `C-h i'), I get 1 ... current: *scratch* ... window-buffer: *scratch* 2 ... current: *scratch* ... window-buffer: *info* which is in an inconsistent state, 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* 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*.