From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#33458: 27.0.50; dired loses position when reverted from outside place Date: Fri, 30 Nov 2018 09:21:35 +0100 Message-ID: <5C00F30F.2040309@gmx.at> References: <87k1l6f9li@posteo.net> <87muq23vsk.fsf@gmx.net> <87h8g9fpl3@posteo.net> <5BF7AF19.4070809@gmx.at> <87bm6fyf78@posteo.net> <5BF84EE6.9020004@gmx.at> <87wop0and5.fsf@mail.linkov.net> <5BFBBDC5.10706@gmx.at> <87efb7fjm1.fsf@mail.linkov.net> <5BFCFB87.6060005@gmx.at> <87zhtudq0i.fsf@mail.linkov.net> <5BFE5334.3080502@gmx.at> <87sgzkn4vj.fsf@mail.linkov.net> <5BFFA3D4.6020809@gmx.at> <87in0fa4dh.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1543566158 21578 195.159.176.226 (30 Nov 2018 08:22:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 30 Nov 2018 08:22:38 +0000 (UTC) Cc: Stephen Berman , 33458@debbugs.gnu.org, v88m@posteo.net To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 30 09:22:34 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 1gSe4G-0005Su-9l for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Nov 2018 09:22:32 +0100 Original-Received: from localhost ([::1]:58633 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSe6M-0001L3-Ry for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Nov 2018 03:24:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSe3q-0005pm-7g for bug-gnu-emacs@gnu.org; Fri, 30 Nov 2018 03:22:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gSe3m-00009W-Ht for bug-gnu-emacs@gnu.org; Fri, 30 Nov 2018 03:22:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51223) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gSe3m-00008V-DD for bug-gnu-emacs@gnu.org; Fri, 30 Nov 2018 03:22:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gSe3m-0008JT-8e for bug-gnu-emacs@gnu.org; Fri, 30 Nov 2018 03:22:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Nov 2018 08:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33458 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33458-submit@debbugs.gnu.org id=B33458.154356611631931 (code B ref 33458); Fri, 30 Nov 2018 08:22:02 +0000 Original-Received: (at 33458) by debbugs.gnu.org; 30 Nov 2018 08:21:56 +0000 Original-Received: from localhost ([127.0.0.1]:55480 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSe3g-0008Ix-15 for submit@debbugs.gnu.org; Fri, 30 Nov 2018 03:21:56 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:48399) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSe3e-0008Ik-M2 for 33458@debbugs.gnu.org; Fri, 30 Nov 2018 03:21:55 -0500 Original-Received: from [192.168.1.101] ([46.125.249.98]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LpKrt-1h7Syy26ZJ-00f9xu; Fri, 30 Nov 2018 09:21:45 +0100 In-Reply-To: <87in0fa4dh.fsf@mail.linkov.net> X-Provags-ID: V03:K1:XlygtiovlYWR74AJ0Oda08PMqiWKlx+mUkyft3FsCrwlVLUT9RQ UANI6mt5EAGJZTVgbw9pukmek8PvxkMWMVsvtNTLn0CFaNeYWw2u8TWpK8MCkNxWZHToxA8 ya4nZ7dYqadERuqZAe/hGjOQLqQY/kgJ5EtS8TxIILrxv0Kd+54NQKj3Ewp4mlHgFtXYWZ+ sNt4aPvtZ2bRD0EKvlS+Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:9bOQe8GLAuM=:VAjl+cp4/OjDhHPpVjnBn5 ty5treealkImohbrHKr2TN3ehX80gfnXG3c/MQ5w4oPxULqs7kPYbvNHvhtLv5cAIdznBfLMy 7441HdprPq9eGJIek99a7zDoLKOrI629VFJo2SVX0hqcsdSllKMTOHfD9l9Dw1Ub8ssZVJd6O UAW7bnZrCErZbv5cvhPfMv0P5EYrvl9TbddpyT/a5HTqaPwiL6iPQTAAyVTbinDAWinOrFJ/u oAgJWrtzWnmaURf5yQdx/UzqqaoRTrq9uK5FeL6iTueHAPPhl0Ha++G7rsMgmV6hcpcSjrL9O vrf6KpqegoznvCS/kjqx670ZyCVS0DUjXC8EXrKyBL6KAoqZxg/0lCBGMxUUYSY7zhVfXV7nL V4X3nOK0MiAeyKhmFB2BMSZ7S2T0Jaf/i9kU8ZDcxBFYF5WP3LbK9pXKrOhcO4weod4pjlTQE ivDalHthjSwkJVY0jsDOysDX04xW4swWE8xDJ5Z1RAjVvFlBM4talsrhtkwsGWurgLMgIpLDd imV1+A3aYz0IqCD+6FZO7vB3TrzSqM3nzuBYxBxkXZfODr5T2jXOswrB92AqFNqFoOp2Nktvc YcsLuGEXvlDWmtnLdjCqQJWOd+sKQrO8CC4L34ZUoOvDv+OxXgmsS7GyhEHVqn+hJ68gUx2tT O5RdU7OpE8BpexpjiCgeQHer/YCTOnAzX8HdijNG5GxvQkrw1k+byiqeFxTGre9EtrdAZP3LJ +KSmidRjN10DVFcr/RmLPvdykr5zCdDuh8Z1a7TZpP07naHLBzSZzKyhjk0KMVgAlvXIQXZO 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:152924 Archived-At: >> The buffer's point is OK. So we could introduce a variable, say >> 'set-window-point-from-point', and set this to t when reverting a >> buffer reveals that 'get-buffer-window' is nil. Redisplaying the >> buffer would then always go to the buffer's point instead of some >> position stored in the window's list of previous buffers. >> >> I'm not sure when to reset this mechanism though. The first time we >> display the buffer again? Then switching to that buffer in another >> window later would suffer from the initial problem. Keep it for every >> other window until it has seen the buffer again? How would we do >> that? > > Maybe until point is moved to another position either by the user or > by any other code that doesn't set 'set-window-point-from-point' again. I'm not sure how to avoid defeating the idea behind 'window-point' - showing the same buffer at different positions simultaneously. >> Finally note that this does not fix the dired problem. There we want >> the cursor go to the line showing the file where point previously was >> in that window. > > Maybe for dired store meta-information such as dired-filename > in window parameters. Then when a dired buffer is restored in a window, > and dired-revert moved point-marker to the beginning of the dired buffer, > move point to the file from the window parameter. Interesting idea. The parameter could also include the name of the file at 'window-start' and try to restore that position as well. Still we'd have to access each window's list of previous and next buffers and store the parameter only if the buffer appears in any of these lists (not to talk about window configurations stored somewhere else). And we would have to remove the parameter whenever the buffer gets killed. martin