From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#32673: 27.0.50; wdired: broken 'wdired--restore-dired-filename-prop' Date: Wed, 12 Sep 2018 12:02:00 +0200 Message-ID: <87sh2fghk7.fsf@gmx.net> References: <87lg8byluo.fsf@mail.linkov.net> <875zzbu1or.fsf@gmx.net> <87sh2fpq4m.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1536746994 7503 195.159.176.226 (12 Sep 2018 10:09:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 12 Sep 2018 10:09:54 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 32673@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 12 12:09:49 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 1g025l-0001qy-Ex for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Sep 2018 12:09:49 +0200 Original-Received: from localhost ([::1]:35390 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g027r-0006uB-UK for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Sep 2018 06:11:59 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g027h-0006qi-6L for bug-gnu-emacs@gnu.org; Wed, 12 Sep 2018 06:11:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g01zC-0007jr-28 for bug-gnu-emacs@gnu.org; Wed, 12 Sep 2018 06:03:11 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33545) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g01zB-0007jn-Uh for bug-gnu-emacs@gnu.org; Wed, 12 Sep 2018 06:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g01zB-0003a2-Qv for bug-gnu-emacs@gnu.org; Wed, 12 Sep 2018 06:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Sep 2018 10:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32673 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32673-submit@debbugs.gnu.org id=B32673.153674653413692 (code B ref 32673); Wed, 12 Sep 2018 10:03:01 +0000 Original-Received: (at 32673) by debbugs.gnu.org; 12 Sep 2018 10:02:14 +0000 Original-Received: from localhost ([127.0.0.1]:37803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g01yQ-0003Ym-Cn for submit@debbugs.gnu.org; Wed, 12 Sep 2018 06:02:14 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:39513) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g01yO-0003YY-5V for 32673@debbugs.gnu.org; Wed, 12 Sep 2018 06:02:12 -0400 Original-Received: from rosalinde ([188.109.144.27]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lbd9v-1fY69B072J-00lD0z; Wed, 12 Sep 2018 12:02:02 +0200 In-Reply-To: <87sh2fpq4m.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 12 Sep 2018 02:32:09 +0300") X-Provags-ID: V03:K1:PBuV57JVFkj5Y1V/wvTL2y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bs 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:150244 Archived-At: On Wed, 12 Sep 2018 02:32:09 +0300 Juri Linkov wrote: >> The immediate cause of this is that wdired--restore-dired-filename-prop, >> which is on after-change-functions, calls dired-get-filename without >> making sure that the file name is not the empty string. But it turns >> out that using dired-get-filename in that function also doesn't work >> with symlinks as I had thought (and tested, but evidently not enough): >> after enabling wdired-mode but before making a change, (file-symlink-p >> (dired-get-filename)) on a symlink returns the name of the target, but >> as soon as a change is made, that sexp returns nil, which causes a >> text-read-only signal. The patch below replaces this sexp and according >> to my tests avoids the error which breaks delete-selection-mode and also >> most text-read-only signals (one remains: when deleting the whole link >> name; I haven't been able to figure out how to avoid that). The patch >> should get more testing (in particular, is looking for the `l' flag a >> reliable way to identify a symlink?), and an ERT test would also be >> good, but I probably can't do either for the next few weeks, because >> I'll be travelling. I can install the patch before I leave, since it >> seems at least better than the status quo, or maybe someone else can >> take a look and either confirm that it is good enough or else come up >> with a better fix. > > Thanks, since your patch fixes the reported problem, there is no reason > to postpone installing it. Ok, but I'll wait another day or two, to give others a chance to object. > Regarding improving the handling of symlinks, > maybe you can use some code from dired-move-to-end-of-filename, > especially handling dired-ls-F-marks-symlinks. Thanks for the pointer. I don't think I'll have time to look into that before leaving, but maybe I can do so while I'm away, otherwise after returning. Steve Berman