From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: master b2150e0: Preserve point under 'dired-auto-revert-buffer' (second case) Date: Wed, 19 Jul 2017 10:18:32 +0200 Message-ID: <596F15D8.207@gmx.at> References: <20170717091700.5734.53572@vcs0.savannah.gnu.org> <20170717091702.497B522E0A@vcs0.savannah.gnu.org> <87a841c056.fsf@rosalinde> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070704040600000602080703" X-Trace: blaine.gmane.org 1500452370 14692 195.159.176.226 (19 Jul 2017 08:19:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 19 Jul 2017 08:19:30 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stephen Berman , Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 19 10:19:26 2017 Return-path: Envelope-to: ged-emacs-devel@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 1dXkCZ-0003Py-82 for ged-emacs-devel@m.gmane.org; Wed, 19 Jul 2017 10:19:23 +0200 Original-Received: from localhost ([::1]:60363 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXkCe-0004qu-MJ for ged-emacs-devel@m.gmane.org; Wed, 19 Jul 2017 04:19:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXkC0-0004qe-Jb for emacs-devel@gnu.org; Wed, 19 Jul 2017 04:18:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXkBx-0007nR-TJ for emacs-devel@gnu.org; Wed, 19 Jul 2017 04:18:48 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:59719) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dXkBx-0007mJ-I6; Wed, 19 Jul 2017 04:18:45 -0400 Original-Received: from [192.168.1.101] ([46.125.249.35]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LdZAI-1dxlXH38Ak-00ikMF; Wed, 19 Jul 2017 10:18:41 +0200 In-Reply-To: <87a841c056.fsf@rosalinde> X-Provags-ID: V03:K0:9ssDRVR36RQAFEpfwuTIyyHqp2dl7UbnQu2Jhar/dyQNdfGW0SE xjdVtAYiCpveE8MsOvJLxxQ2JR6aNRhu/Z5sY9+wpBqjbmPefyrqhAJKjOYovu+MAH9KeJv ifNFQLwSEQkGh2vSqOmluzRv+xODuAIxHl06pIsfzHXbrSAPThEbCLzYDHG81ZRIg9l4Ft1 L3VU4PnQX5tSfvVQg0TZg== X-UI-Out-Filterresults: notjunk:1;V01:K0:fXrQvOtj0To=:Y7AARC6iveP1TR+JqdQGOk 13++IyjxnrIpZFFA7JyV+3nGTRtX/5nkPO4Tr0Lwt1iHC7txLc2zCHozwk+XjPpRmniamoD5U ZiNLuY8hBVsW3JlGI6M7kOEaywmDzPURi+avrYVL9ifgeJ9bPzkIRWaEIk4lgxFKNknrl0vh6 oYpc6l3fPZy+ZJT0Qp8V3DL1cSHLPlIlBIyyAe9oW/iKINST0T/4mr2NnUDDMjFkkcoYcNB5/ irX0JMJ42AltiQREm7DqvSusBzh1X1wKeEU3F5rMjaFhmXjfVeakzZTfY5msDTEYB6GwMIhD4 3WpMyN3hYjT+IOZE1s/v0+S/TUQbB/46SJwHPCzCE4COE3SgDo1om4qWYXuAQw3HZ3ztcTwzv HU/AKfYnjPlpOuTIs1OZPH1xLt/OhOEiwMskK60ELmX9PTatt8/zPURYqbQSAdNH/9aDpvUOJ ATh2XtX7AtB4rOs0vTDjSVC5WSo2iU10fXO/6FUbxhdxZVN0kDWewjr+Zlx9vAbtU4PN88SG1 zF8P4WJ0h290GLTYh71T4pi6zEmToY3zTAZMhybo3l3GjkN0rRP1lHjmmDnmmNlS8RWrmW5AS eyM4FpAPUpc1LX7+zHnuZJsphc78PKI5C7W2FuBGtYo2pVo5D3QsjdPs1P+OU5XAAR0SJvPOz IfR7mf/gAEFFG94YWUjlbZD6L06iAupwf52y6sdhuIq6wRzFvv8Ia9f/Uqpmgp/HUwjHstrCT azhBvwzlheklnIpz1aSELXIYw/B+H/ge+hkxQho4Cqw6bBRLbSDYJaag29/fIlbO1OLFJvuH X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.15 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:216873 Archived-At: This is a multi-part message in MIME format. --------------070704040600000602080703 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable > If I debugged this correctly, it seems that the crucial > difference is that, on calling quit-window after > pop-to-buffer-same-window, the window displaying the directory has a > non-nil quit-restore window parameter (in fact, its value contains the= > buffer visiting the todo-file), while on calling quit-window after > switch-to-buffer, the quit-restore window parameter is nil. Is this > correct (cc'ing Martin)? Yes. =E2=80=98switch-to-buffer=E2=80=99 misses a number of features whic= h make it behave differently from =E2=80=98display-buffer=E2=80=99 based functions.= In particular, it cannot be used for displaying buffers temporarily. > The only difference in the buffer lists of the two outputs is after > quit-window (the last line in each output). Is this difference due to= > the different quit-restore window parameter values? =E2=80=98quit-window=E2=80=99 works on a per window basis. Earlier the s= ituation was as follows: Consider two windows showing two different portions of the same buffer. If in one of these windows you temporarily worked on another buffer, then quitting that window would not restore the buffer previously shown in it because there is already another window showing that buffer. Even if it did restore the buffer, it would not have restored that window's position of point. =E2=80=98quit-window=E2=80=99 = simply tries to restore the buffer as previously shown in that window regardless of what the buffer list says. > If so, I'm not sure > what the best course of action is. This is what's supposed to happen > (what the test tests for): (1) the todo-mode buffer is displayed in a > window; (2) calling dired makes the window display a directory; (3) > calling todo-show makes the window display the todo-mode buffer again;= > (4) calling todo-quit buries the todo-mode buffer, so the window > displays the directory again; (5) now immediately calling quit-window = in > the directory should not make the window display the todo-mode buffer > again, if there is an alternative. This worked when dired used > switch-to-buffer, but no longer works now that dired uses > pop-to-buffer-same-window. I'd be grateful for any advice. The problematic step is (4). =E2=80=98quit-window=E2=80=99 has no idea o= f the semantics of =E2=80=98bury-buffer=E2=80=99 (neither do I). But if no one objects w= e could install the attached patch. martin --------------070704040600000602080703 Content-Type: text/plain; charset=windows-1252; name="window.el.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="window.el.diff" ZGlmZiAtLWdpdCBhL2xpc3Avd2luZG93LmVsIGIvbGlzcC93aW5kb3cuZWwKaW5kZXggMmI5 NzlmNC4uMjA4NjRjNiAxMDA2NDQKLS0tIGEvbGlzcC93aW5kb3cuZWwKKysrIGIvbGlzcC93 aW5kb3cuZWwKQEAgLTQ2MjcsNiArNDYyNywxNSBAQCBidXJ5LWJ1ZmZlcgogICAgICAoKG9y IGJ1ZmZlci1vci1uYW1lIChub3QgKGVxIGJ1ZmZlciAod2luZG93LWJ1ZmZlcikpKSkpCiAg ICAgICgod2luZG93LS1kZWxldGUgbmlsIHQpKQogICAgICAodAorICAgICAgKGxldCAoKHF1 aXQtcmVzdG9yZSAod2luZG93LXBhcmFtZXRlciBuaWwgJ3F1aXQtcmVzdG9yZSkpCisJICAg IHF1YWQpCisJKHdoZW4gKGFuZCAoZXEgKGNhciBxdWl0LXJlc3RvcmUpICdvdGhlcikKKwkJ ICAgKGNvbnNwIChzZXRxIHF1YWQgKG50aCAxIHF1aXQtcmVzdG9yZSkpKQorCQkgICAoZXEg KGNhciBxdWFkKSBidWZmZXIpKQorCSAgOzsgUmVzZXQgc2VsZWN0ZWQgd2luZG93J3MgJ3F1 aXQtcmVzdG9yZScgcGFyYW1ldGVyIHRvIGF2b2lkCisJICA7OyB0aGF0IHRoZSBidWZmZXIg aXMgcmVzdG9yZWQgaW4gdGhhdCB3aW5kb3cgYnkgYSBzdWJzZXF1ZW50CisJICA7OyDigJhx dWl0LXdpbmRvdycuCisJICAoc2V0LXdpbmRvdy1wYXJhbWV0ZXIgbmlsICdxdWl0LXJlc3Rv cmUgbmlsKSkpCiAgICAgICA7OyBTd2l0Y2ggdG8gYW5vdGhlciBidWZmZXIgaW4gd2luZG93 LgogICAgICAgKHNldC13aW5kb3ctZGVkaWNhdGVkLXAgbmlsIG5pbCkKICAgICAgIChzd2l0 Y2gtdG8tcHJldi1idWZmZXIgbmlsICdidXJ5KSkpCg== --------------070704040600000602080703--