From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#63676: cancelling editable dired causes UI problems with dired Date: Sun, 28 May 2023 05:39:34 +0200 Message-ID: <87r0r15dl5.fsf@web.de> References: <83ilcing54.fsf@gnu.org> <87jzwupp7n.fsf@web.de> <83edn2jnqd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17478"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: peter.mao@gmail.com, 63676@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 28 05:40:23 2023 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 1q37GZ-0004MS-0z for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 May 2023 05:40:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q37GH-0004sB-Fg; Sat, 27 May 2023 23:40:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q37GG-0004s1-4D for bug-gnu-emacs@gnu.org; Sat, 27 May 2023 23:40:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q37GF-0007s9-Si for bug-gnu-emacs@gnu.org; Sat, 27 May 2023 23:40:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q37GF-0005w7-7p for bug-gnu-emacs@gnu.org; Sat, 27 May 2023 23:40:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 May 2023 03:40:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63676 X-GNU-PR-Package: emacs Original-Received: via spool by 63676-submit@debbugs.gnu.org id=B63676.168524518822790 (code B ref 63676); Sun, 28 May 2023 03:40:03 +0000 Original-Received: (at 63676) by debbugs.gnu.org; 28 May 2023 03:39:48 +0000 Original-Received: from localhost ([127.0.0.1]:52900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q37Fz-0005vV-09 for submit@debbugs.gnu.org; Sat, 27 May 2023 23:39:47 -0400 Original-Received: from mout.web.de ([212.227.15.14]:36191) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q37Ft-0005vB-WA for 63676@debbugs.gnu.org; Sat, 27 May 2023 23:39:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1685245175; i=michael_heerdegen@web.de; bh=IKxW897aVxnHYiyBL2WHUHog8QMthoZBqVTnu6WnJs0=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=fNv8cCtlco+AAfpSiiaOmyRjyKm7GHR8baNFONeB7jFWPnoEs39Iu5URr74znJKEV X+A6RDPuLCXNLLG4ov2w2jwnHx3WmY3boqCIwblLG1Gcz/xoFJxRiivhqO0pwta10M ddqz8spEsNA4s0VFlzkwcgZVX+L7z3ED2NKrk45WmegHFf1wbKduvnKAjsCfzNxWVz +3VvXFnLrLufsr28X/u5Uw/wQ0ADdy3oZvBZ2B740/QVIPFjyUXljQgXog0hJIWvae Z8zLLZNI89j+H8T8NqA/ewDuHg0n52Ya1OClGsj/WlfLevlG0c+xQbbf+sa3AAXsNJ 9zzSAAvjEJsrA== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from drachen.dragon ([178.14.74.62]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1Mx0Ix-1qI2pw0zj1-00yCHG; Sun, 28 May 2023 05:39:35 +0200 In-Reply-To: <83edn2jnqd.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 27 May 2023 09:24:26 +0300") X-Provags-ID: V03:K1:vqjk7cbmrnpYkXuN0Gy1K5GvF6qpOZ2Ql0sgmAZXhzh581jOqAf PU4nF31nGCYNAT9On19rRAvSSOITNGT3pnmgX6dOLa7s72VWDXq42+G2x5aR4sY+Be6itiG sKc6WQwFSvqdvnNjoNToe3gCkMHu5L4MJDwmR/vu3d1acXqofCx47gLI3fBjsijBUTFv3Im +jsX8tAGhQI4QYIP0m02Q== UI-OutboundReport: notjunk:1;M01:P0:Xke4ZVSmzZ4=;A6tawp7uiusEqRhJ73EW/Cw2S4N DfF91qzKKLS5mHrYDkWDZR/yFG1DIt4W92TkgK7ldedCdlnRsW2GoZvimRIZBqVoEeW4No26J cVMnRxyAVEn/HEAunwsSYH4l+7pAMEuwAIz4Hf9j5Qf58NKcCO5bDELbmJXuUkODlOj4iS8DM h7PRxPd8ggAzJIDo2cdd4+sHuW1x4j03hXltnvCWz6g33UE2jlId3maOF54rwz7hUT9gN8fbL HxzUM36NQ5C/VIE9HcNItEvVHVUAId4k48XbppcpxxcLTXOojxuKLwAeUy74xLJyxSqsWbyyD +gdPnhVkpqdMD6hR14NkdzmhqzAPjcTEwk6pLkeXcYW6SfdzP/EVwCR7TVnLMZqfBmZ/v2sOb gsqFOW9dMJN6223/bYIu3NjPFuRfeIx4mOA+c6JeTO5BOAHgGxeaYYTK2DfRLXfbwYs1OATYo HRKlpmoE7G+QVyIdgxQkEGx0QKIjZ4eSPQbQdMyQQeLeHh9BZQnCiYsOZInalZOCDUDOvOyql WkRkQrRxdTGO/QzNnj5zceq0XOab+fcfn7Z/MqyP3sL3IjfFM6hXJzxU6ZsUIPdssPVT6+mU2 BbzTPoprq6ijtw4zqDDplcj+6gT044/ByM3ZhjfJo+MdC/3ZUK2FBwr0pnhLbQnOLon1qvAxS Zn8REgKj6XgIMVfmsAvBUqEmsJeOSjHHP4o16TBo/Cuhs9WkPPxu9LhCTCVvFe6flRAoRqSHa yvBIGWbbXjsnTCQw7rArhkb1rA3P6XAuAO9Gp0P/P5QEQEL2UBghMS9Zb2DD1UFh+8adKdmh 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262501 Archived-At: Eli Zaretskii writes: > Are we sure this is the _only_ thing that needs to be updated? > dired-revert does much more, so we should audit what it does carefully > to determine which parts may need re-doing here. Ok, I now had another look. The only thing that aborting does not 100%-cleanly revert is: if option `wdired-search-replace-filenames' is non-nil, wdired does some setup for isearch to enable the user to query-replace only in filenames (and ignore other buffer parts). If the user disables that option after entering wdired, but before aborting, the current code doesn't revert those modifications to isearch functions. [ Note that calling dired-revert does not help here because it doesn't touch buffer local variables ]. I think that needs fixing, although it is unlikely that somebody does that. The other modifications to the dired buffer are all restored carefully. What's left are effects that could be caused by restoring the buffer contents with the old contents when reverting (like this issue here). `dired-build-subdir-alist' is the only thing in dired that uses markers not only temporarily. All other markers are used to ease operations and are thrown away after the operation is finished. Overlays are not used at all. Text properties and file marks (those like "*") are part of the saved buffer contents and are restored along with the contents. Things like re-registering the dired buffer are done (`dired-advertize') accordingly. Some things also have already been fixed AFAIR (like the cooperation of dired-hide-details-mode and wdired). People have been using and testing aborting for a long time. I think nearly everything would have been uncovered until now: recent related bug reports mostly discovered problems related to recent changes to dired that not yet had been handled by the wdired code. It's a complex matter but I don't have more useful ideas what else could go wrong that a `dired-revert' would fix (or not; in general). From my perspective my suggested change and the quality of dired and wdired wrt this change is quite safe. Michael.