From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#33871: 27.0.50; Revert Dired window saved in window configuration Date: Mon, 14 Feb 2022 10:13:00 +0100 Message-ID: <119a9c2c-e27f-6c3a-07ad-66bc76fc58cf@gmx.at> References: <87bm59mglk.fsf@mail.linkov.net> <87fsoo323s.fsf@gnus.org> <86h792x3wv.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22232"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 33871@debbugs.gnu.org To: Juri Linkov , Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 14 10:16:37 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJXTI-0005dF-SV for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 14 Feb 2022 10:16:36 +0100 Original-Received: from localhost ([::1]:42322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJXTH-0001UQ-E5 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 14 Feb 2022 04:16:35 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJXQo-0008WM-Km for bug-gnu-emacs@gnu.org; Mon, 14 Feb 2022 04:14:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45791) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJXQn-0003Cu-TM for bug-gnu-emacs@gnu.org; Mon, 14 Feb 2022 04:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nJXQn-0005pe-QC for bug-gnu-emacs@gnu.org; Mon, 14 Feb 2022 04:14:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Feb 2022 09:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33871 X-GNU-PR-Package: emacs Original-Received: via spool by 33871-submit@debbugs.gnu.org id=B33871.164482999722360 (code B ref 33871); Mon, 14 Feb 2022 09:14:01 +0000 Original-Received: (at 33871) by debbugs.gnu.org; 14 Feb 2022 09:13:17 +0000 Original-Received: from localhost ([127.0.0.1]:39688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJXQ5-0005oa-Cc for submit@debbugs.gnu.org; Mon, 14 Feb 2022 04:13:17 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:46223) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJXQ0-0005oI-Ck for 33871@debbugs.gnu.org; Mon, 14 Feb 2022 04:13:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1644829986; bh=LfNlHs8MGoOd9FKMGgC0Q6EQNn7JUnG89ugrjyIVKus=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=gSERqs+WVn51ulzIjZGMyn7QWeKPsTyzWaQB4GG+mvfF2RZC/iAcS3rlYCYnAJmNa J0ltbQqlrFxcoowfVnLzsP7NH580XZ/GklhJvyjbUH6VlXc9gesua/OSnNfhMIh+zM z0aufp0KeLX1bMP1zyMzrhyRDvI8GCbEPz5WHD60= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.101] ([213.142.96.169]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mw9QC-1oBdZc0xr2-00s658; Mon, 14 Feb 2022 10:13:04 +0100 Content-Language: en-US In-Reply-To: <86h792x3wv.fsf@mail.linkov.net> X-Provags-ID: V03:K1:bohbAwEdH2wBM+baiUOB3UfIyk8guGYXrFIFuu0O8g5mrAE3ZTo WDeVc9+mc6OQ5tz22NJFPixSn8GSrsG9iHFdQs1MnkXWXHeNPxYlwXceqCEgeMA2KQoSnxV u+pCSELZtijLH9EZmIBvkMbqN7UMizFumejVyjkMpMvS/TP9Whul0CkLIUockcnWBVwQiSI ULdMgzaMCEXnvdlV/Ce7w== X-UI-Out-Filterresults: notjunk:1;V03:K0:+aZ6r3Pau9c=:M7SHOvn4v3oLBkI2yzjtFG r/KZAOh+fzUhpZL8EfshAQKawrGi5TshZOvNtLOr4aiuunks7qD/tCLxFonRxf6QgdtcOPpTV OURA/eGJ2WBxYOyaC94YTVInZZHkHQ+JLf/VBr0uTWt1qYE3lf0Jnxx6Yiq/nXaNgihB527qF UBsYJ9MhSus4B4KflCnt/EA1dhRMAppVpnQSQxY7irCh6D3ZgdOMdPO6RhIFAPDA5nU8/FDtQ osBQUJM4gfeCloY7JiIrtgYxj043NtmrRKuNJz1PKIHjAw7uReZkAzP6oPuKHePCDj6DpGI3a g27Gjg4hzS3nQAtyApfRFQYZX5ZBLiDb5jQurXgZeLjQjl39A+WA2io0FISLvViKT9R8zIt6+ WzRYHiR42NS2wg4Jx1X9CfPkH+gfaXv21pI5UBomHGh+Pa5wcB/43Maq8zOXnOqKtA7IIL2TR 6VFEkVBYK69/TLQN8wLveI+onJTBzUEggai/lPg7mB9ciwEMttz74DcZZyFnZqb/rYZ3BNA56 kjMYlRJxjxmNBAC81AwJdP/aeXWf4t9pazt66+71hbeajX0ygvPnbnDptsHFYsTxEp+HrwvkN Eekp/Yvit6vlanK5T6J1WhTyRZ6Bx42nOPHmN7yhRB8r47fH8IrzhahL1hx9xD00BNerLzR35 CmL7Oh5cgzMYPJN9HMn/acupDPDOZ1wcdGRD6KahL/7uzcd4iFG4HI2L7WXayxj6863MAO+hC 2Q6TGO2DxUnDSubt93IsRIG4Tzeh8nLEZ40ChOPH4jT9WQc0I7DbNPWZUtloBM9cAuCYh5zm X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:226867 Archived-At: > It should end up where it was initially, i.e. on file names in Dired. > But this can achieved only by implementing context-aware markers, > such as used by the package saveplace.el, e.g.: > > ((window-configuration-1 > ((dired-window-1 . `(lambda () (dired-goto-file ,(dired-get-filename)))))) > (window-configuration-2 ...) > ...) Reverting a directory in a window could remember the name of the file shown at the corresponding line and the offset of 'window-point' on that line and also the entire contents of the old directory until revert completes. As soon as the new contents of the directory have been established, dired would search the remembered name and position point at the remembered offset accordingly. If it does not find that name, it would have to compare the contents of the old and current contents of the directory and use some heuristics to position point appropriately. martin