From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 09 12:11:03 2018 Received: (at submit) by debbugs.gnu.org; 9 Sep 2018 16:11:03 +0000 Received: from localhost ([127.0.0.1]:51442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fz2Ig-0006rx-SN for submit@debbugs.gnu.org; Sun, 09 Sep 2018 12:11:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53145) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fz2If-0006rU-JZ for submit@debbugs.gnu.org; Sun, 09 Sep 2018 12:11:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fz2IS-0003JY-VX for submit@debbugs.gnu.org; Sun, 09 Sep 2018 12:10:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:54024) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fz2IQ-0003DI-Vr for submit@debbugs.gnu.org; Sun, 09 Sep 2018 12:10:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fz2IN-0003B1-JR for bug-gnu-emacs@gnu.org; Sun, 09 Sep 2018 12:10:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fz23d-0002lo-IW for bug-gnu-emacs@gnu.org; Sun, 09 Sep 2018 11:55:32 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:37536 helo=pdx1-sub0-mail-a38.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fz23d-0002fS-8E for bug-gnu-emacs@gnu.org; Sun, 09 Sep 2018 11:55:29 -0400 Received: from pdx1-sub0-mail-a38.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a38.g.dreamhost.com (Postfix) with ESMTP id C60057F24E for ; Sun, 9 Sep 2018 08:55:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to :subject:date:message-id:mime-version:content-type; s= linkov.net; bh=NPcfen2dDx2sVTpxzZ9e3DuZJmM=; b=sWikAwSSVDj08S/2W OzrD7F7aY1FkPjUE1qx2wuyxPuz7hsVV1uV9ugGyfW+0t4bsesao88cCMnkR94LR Tzlt+g96BMGKVTeGtML+doiXBsimYoeEg0bfGOGZg14K/zery/6lApQzZ00Mrbwc Ci+T8HxaFzoudj3FzBT0yOLFE0= Received: from localhost.linkov.net (m91-129-104-147.cust.tele2.ee [91.129.104.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a38.g.dreamhost.com (Postfix) with ESMTPSA id 0D9CC7E505 for ; Sun, 9 Sep 2018 08:55:26 -0700 (PDT) From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: 27.0.50; wdired: broken 'wdired--restore-dired-filename-prop' Organization: LINKOV.NET Date: Sun, 09 Sep 2018 18:52:55 +0300 Message-ID: <87lg8byluo.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) As reported in https://lists.gnu.org/archive/html/emacs-devel/2018-09/msg00372.html Wdired breaks delete-selection-mode in the latest master 27.0.50: 1. create scratch directory with a file mkdir /tmp/test cd /tmp/test touch foo.c 2. start emacs LC_ALL=C emacs -Q -nw 3. activate delete-selection-mode M-x delete-selection-mode RET 4. go into the folder C-x C-f /tmp/test 5. enter wdired mode C-x C-q 6. replace 'foo' with 'test' by selecting the whole file name and typing a new one, e.g. M-2 C-M-SPC test or C-SPC C-e test When typing the first letter, it removes delete-selection-pre-hook from pre-command-hook, thus breaking delete-selection-mode, because of this error seen in the *Messages* buffer: Error in pre-command-hook (delete-selection-pre-hook): (error "No file on this line") The same error is reproducible when simply deleting an old file name before typing a new one in the step 6, e.g.: M-d test The raised error is: Debugger entered--Lisp error: (error "No file on this line") signal(error ("No file on this line")) error("%s" "No file on this line") dired-move-to-end-of-filename(nil) dired-get-filename() wdired--restore-dired-filename-prop(198 198 1) delete-char(1 nil) funcall-interactively(delete-char 1 nil) call-interactively(delete-char nil nil) command-execute(delete-char) This is caused by changes in bug#32173. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 11 18:09:03 2018 Received: (at 32673) by debbugs.gnu.org; 11 Sep 2018 22:09:03 +0000 Received: from localhost ([127.0.0.1]:37410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fzqqE-0000AA-PG for submit@debbugs.gnu.org; Tue, 11 Sep 2018 18:09:03 -0400 Received: from mout.gmx.net ([212.227.15.15]:50671) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fzqqC-00009g-QU for 32673@debbugs.gnu.org; Tue, 11 Sep 2018 18:09:01 -0400 Received: from rosalinde ([88.70.66.68]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LnPSg-1fLoSK0Dh0-00hi0D; Wed, 12 Sep 2018 00:08:50 +0200 From: Stephen Berman To: Juri Linkov Subject: Re: bug#32673: 27.0.50; wdired: broken 'wdired--restore-dired-filename-prop' References: <87lg8byluo.fsf@mail.linkov.net> Date: Wed, 12 Sep 2018 00:08:52 +0200 In-Reply-To: <87lg8byluo.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 09 Sep 2018 18:52:55 +0300") Message-ID: <875zzbu1or.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:hwZOKRxfVzGgUUp8UUhWwJWLZoNRFocb7fdZDAyDN3lR32TMb9M kMzejDZB6BTPcokdnbBKqcFbSQTErN8ksVfmWp3R2Nvn+JdWuBzmNKDPWx6wX1NuhWgKb9B 14uJRGfl/ueN3lkdXdYWTQ0xcgE0uj+EJGVd7TIaf+k6RXqpEi0TOhTdcCxpeE7/+E3Imof e/h/VjBRi9a4PzybMrisQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:m35muvFgnE0=:edKuchtQFshdPFu3ExXbe5 hVB0BWMYDbQgHsL91nxKQpdoFlj5aELD32NToApU2z2bnFaTpAnoJvLwAoAhSnwBFYJCElzMC HUU3llGxRewphumO8ysnLTsJtiBMlgnxRxWe8rHkdt62B96xP83tdVaz+9dyma3B5ijLw1P7K FOwwRR2oXrI0o/ate6T39+EMzmrcaHyHF6+wXajf7k8wRcWHKTig5NxtNVqeTg02iYsHwAUJp wwuAsa0jKBblEPYP+4Kul/yojwYtBb3pv8enVOsrr5Wk4qsGlOJztJ4o1B/kPBobgovHTPCEi JoT9ocke6KFEsCyvI7fcebrRqBgBkfxLM+VfkUo4ftHrXgTRsZHRtB3RFdVl89Jo4EYXElxUV xp0UxxO0xO8mA5a+a71e3Z3ZISeItd9AxDmpRRurU/tOoOnt0EMIcLijKvdHXrMt54mlXey9p 7zdY33VlRUVGMBGKHLmwIY+aglK74qfadZnKOuJ3YZeOszj/C2p4MZX9zfSOHlCH2yfjH/eeh nAPOL7cPwfAwymQQtsn22h55H0wR//p7f3AyVZc1OaIRIM0f74fkjU++0RBz5rD74rZPUUX24 8k2+5t7DYqBWXDVaL9bQhuiSDj2sylDpAdbI38e7McOw0tSMgy7WTlMOt7m40V8ghQfWsRmXI 1dc0xRHAs11ykChbIAKt11lvtS9spNavaHFMqZgsaAQ8LlevZ0uAdkK4p+rmlcWKoo3twVyEw +86emN5NM0mmOZyb4hy6OrMXxK1voDq6Qbo4/uWUiOTZW9xzGwdi9z4U+f1o4NBHvesf/2qfX ab+GWskQN0yL4f0Il38Vk/1LV1ySNrY7KSFsxh3byzxjTlA4CM= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32673 Cc: 32673@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Sun, 09 Sep 2018 18:52:55 +0300 Juri Linkov wrote: > As reported in https://lists.gnu.org/archive/html/emacs-devel/2018-09/msg00372.html > Wdired breaks delete-selection-mode in the latest master 27.0.50: > > 1. create scratch directory with a file > > mkdir /tmp/test > cd /tmp/test > touch foo.c > > 2. start emacs > > LC_ALL=C emacs -Q -nw > > 3. activate delete-selection-mode > > M-x delete-selection-mode RET > > 4. go into the folder > > C-x C-f /tmp/test > > 5. enter wdired mode > > C-x C-q > > 6. replace 'foo' with 'test' by selecting the whole file name > and typing a new one, e.g. > > M-2 C-M-SPC test > > or > > C-SPC C-e test > > When typing the first letter, it removes delete-selection-pre-hook from > pre-command-hook, thus breaking delete-selection-mode, because of this > error seen in the *Messages* buffer: > > Error in pre-command-hook (delete-selection-pre-hook): (error "No file on this line") > > The same error is reproducible when simply deleting an old file name > before typing a new one in the step 6, e.g.: > > M-d test > > The raised error is: > > Debugger entered--Lisp error: (error "No file on this line") > signal(error ("No file on this line")) > error("%s" "No file on this line") > dired-move-to-end-of-filename(nil) > dired-get-filename() > wdired--restore-dired-filename-prop(198 198 1) > delete-char(1 nil) > funcall-interactively(delete-char 1 nil) > call-interactively(delete-char nil nil) > command-execute(delete-char) > > This is caused by changes in bug#32173. 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. Steve Berman diff --git a/lisp/wdired.el b/lisp/wdired.el index be0bde290a..3157e887d7 100644 --- a/lisp/wdired.el +++ b/lisp/wdired.el @@ -607,15 +607,22 @@ wdired-check-kill-buffer (defun wdired--restore-dired-filename-prop (beg end _len) (save-match-data (save-excursion - (beginning-of-line) - (when (re-search-forward directory-listing-before-filename-regexp - (line-end-position) t) - (setq beg (point) - end (if (and (file-symlink-p (dired-get-filename)) - (search-forward " -> " (line-end-position) t)) - (goto-char (match-beginning 0)) - (line-end-position))) - (put-text-property beg end 'dired-filename t))))) + (let ((lep (line-end-position))) + (beginning-of-line) + (when (re-search-forward + directory-listing-before-filename-regexp lep t) + (setq beg (point) + ;; If the file is a symlink, put the dired-filename + ;; property only on the link name. (Using + ;; (file-symlink-p (dired-get-filename)) fails in + ;; wdired-mode, bug#32673.) + end (if (and (re-search-backward + dired-permission-flags-regexp nil t) + (looking-at "l") + (search-forward " -> " lep t)) + (goto-char (match-beginning 0)) + lep)) + (put-text-property beg end 'dired-filename t)))))) (defun wdired-next-line (arg) "Move down lines then position at filename or the current column. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 11 19:37:42 2018 Received: (at 32673) by debbugs.gnu.org; 11 Sep 2018 23:37:42 +0000 Received: from localhost ([127.0.0.1]:37434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fzsE2-0004P7-5u for submit@debbugs.gnu.org; Tue, 11 Sep 2018 19:37:42 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:46832 helo=pdx1-sub0-mail-a38.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fzsE0-0004Ox-5y for 32673@debbugs.gnu.org; Tue, 11 Sep 2018 19:37:40 -0400 Received: from pdx1-sub0-mail-a38.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a38.g.dreamhost.com (Postfix) with ESMTP id 0C2E57F267; Tue, 11 Sep 2018 16:37:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=uqm7PPokhFMIM5hRo1DEFbjpmbo=; b= xp1O7tr/ZfdCLWM0oeWdbeHWEDFlLBb8MP2B9jQV0dCc67oYZAW4rug47ckINdZq xTwbDYIsjr2oBJR0jiSpLo27aE9r7r4LjBi+CKiOCDYoMBA1haeyIsDNL3x3FiP/ f/fkRSp7sxO7IL3r4tIGJ9mOWO5j+ar+nMB0+4NUuwA= Received: from localhost.linkov.net (m91-129-104-147.cust.tele2.ee [91.129.104.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a38.g.dreamhost.com (Postfix) with ESMTPSA id 5EFD97F25F; Tue, 11 Sep 2018 16:37:36 -0700 (PDT) From: Juri Linkov To: Stephen Berman Subject: Re: bug#32673: 27.0.50; wdired: broken 'wdired--restore-dired-filename-prop' Organization: LINKOV.NET References: <87lg8byluo.fsf@mail.linkov.net> <875zzbu1or.fsf@gmx.net> Date: Wed, 12 Sep 2018 02:32:09 +0300 In-Reply-To: <875zzbu1or.fsf@gmx.net> (Stephen Berman's message of "Wed, 12 Sep 2018 00:08:52 +0200") Message-ID: <87sh2fpq4m.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32673 Cc: 32673@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > 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. 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. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 12 06:02:14 2018 Received: (at 32673) by debbugs.gnu.org; 12 Sep 2018 10:02:14 +0000 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 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 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 From: Stephen Berman To: Juri Linkov Subject: Re: bug#32673: 27.0.50; wdired: broken 'wdired--restore-dired-filename-prop' References: <87lg8byluo.fsf@mail.linkov.net> <875zzbu1or.fsf@gmx.net> <87sh2fpq4m.fsf@mail.linkov.net> Date: Wed, 12 Sep 2018 12:02:00 +0200 In-Reply-To: <87sh2fpq4m.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 12 Sep 2018 02:32:09 +0300") Message-ID: <87sh2fghk7.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:PBuV57JVFkj5Y1V/wvTL2y/T/WIqJXRI3NiH2StD/Q4kqjay+1u bzPGe3itk9sTFgj3wxvoXUBwK5pQ4X9U6GyqeJlNOnJWhNSngIIm84YJcj2KGLuon7FN1wk ZX6aiJgqr1Vy+qXBr9+YKWylfV3o6vwpn8/HYEmflHwRnblVp2E0UXMvTSkujuAm/qf8Bxg m7YgI+zn1YEmt6FcRX+pg== X-UI-Out-Filterresults: notjunk:1;V01:K0:6lCbP6mr0hs=:gMxkDkauFkE/jEKnqjRGdZ Ec+/HPE/9L0DX9Qfplg4cHWKYuaCEBxbkyXZ++JU/pl15142j1HwOSQegQqWrkEEPpFbuLuwb wJFm7WA6Pl0Jc5b6mlFDw1Keozj0wuZe7vZL1677Wi7bvowQr13NLv4mxRgvR1WWTt5krpiSw eVrNA8b+aypQF3ssPDVNItRm3NUuWoLNHIx99Afl1vM0oQi1A2n9Duw09fSAy1O8cUgQjsYwe sSu8wPqfotSN2FZXRNQvv60ubb1zjiVH5cgiB6Cc/saS+uZC52TVaihNomVc+TFETGJ3MLlcr ayf5wQzsymjagEJXe1fWLoH8IzBWR3vbDH9wgccotdFD8IaU82ebYqxpOBThPFMV+iVOMqNPD BVRn48b/5tSvKzqWGDJdBtG+6AKf7IKc7+6Mo5Et8twS1bFPDOzZ+gGId3mvhWB/xjdflXU5e qT7pqinGMepVlp+5JBcWHvz1YbdAXrkaMkDkmoZ721+Pi/aAmd2xjDnh/pEmEy+TkbQ2/5Q5Q YPbuk1gKtk5T8YYx5RUBaUiZl1sieUZPVUu8g/6JwdrMg6UlVm6yk10M4XuXjJWhh5vmtIYbO 6WUIoFOjG+ehb4Oq4Av9jiu5CL3nxQtnw5Tc0cYpmRaj09rneOnXL2YjNbwyOZmtmH1fEV19y CY4dWT7pBxTXY/k+kMoYSoCLEM/l2dObCSwJ2vgq/BUrhqSuFvQ8bKbgRNMvHHte1laVQm9Db Td2CPQcFXcCGp43h6TrAMtrPD+C8m/R6yEjI7ZMH8lptGsIFoE2A8kOBEdQH+/0cPOXGH+bs7 IjmWSzuEvdqex7IofwdoCcPiv80oAYl4hY+AVLryVA9pgH7kWE= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32673 Cc: 32673@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) 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 From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 12 09:57:10 2018 Received: (at 32673) by debbugs.gnu.org; 12 Sep 2018 13:57:10 +0000 Received: from localhost ([127.0.0.1]:38324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g05dm-0005GW-22 for submit@debbugs.gnu.org; Wed, 12 Sep 2018 09:57:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57195) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g05dk-0005GH-Oi for 32673@debbugs.gnu.org; Wed, 12 Sep 2018 09:57:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g05da-0005QE-H4 for 32673@debbugs.gnu.org; Wed, 12 Sep 2018 09:57:03 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g05da-0005PT-Cp; Wed, 12 Sep 2018 09:56:58 -0400 Received: from [176.228.60.248] (port=3516 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1g05dZ-0000yJ-Vt; Wed, 12 Sep 2018 09:56:58 -0400 Date: Wed, 12 Sep 2018 16:57:09 +0300 Message-Id: <83a7omn7ii.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-reply-to: <87sh2fpq4m.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 12 Sep 2018 02:32:09 +0300) Subject: Re: bug#32673: 27.0.50; wdired: broken 'wdired--restore-dired-filename-prop' References: <87lg8byluo.fsf@mail.linkov.net> <875zzbu1or.fsf@gmx.net> <87sh2fpq4m.fsf@mail.linkov.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 32673 Cc: 32673@debbugs.gnu.org, stephen.berman@gmx.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Juri Linkov > Date: Wed, 12 Sep 2018 02:32:09 +0300 > Cc: 32673@debbugs.gnu.org > > Thanks, since your patch fixes the reported problem, there is no reason > to postpone installing it. Agreed. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 13 16:22:01 2018 Received: (at 32673) by debbugs.gnu.org; 13 Sep 2018 20:22:01 +0000 Received: from localhost ([127.0.0.1]:39641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0Y7l-0003r8-4p for submit@debbugs.gnu.org; Thu, 13 Sep 2018 16:22:01 -0400 Received: from mout.gmx.net ([212.227.15.19]:54721) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0Y7i-0003qu-Cb for 32673@debbugs.gnu.org; Thu, 13 Sep 2018 16:21:58 -0400 Received: from rosalinde ([188.109.197.247]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MUYnD-1gQdYt0ciZ-00RL1h; Thu, 13 Sep 2018 22:21:48 +0200 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#32673: 27.0.50; wdired: broken 'wdired--restore-dired-filename-prop' References: <87lg8byluo.fsf@mail.linkov.net> <875zzbu1or.fsf@gmx.net> <87sh2fpq4m.fsf@mail.linkov.net> <83a7omn7ii.fsf@gnu.org> Date: Thu, 13 Sep 2018 22:21:46 +0200 In-Reply-To: <83a7omn7ii.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 12 Sep 2018 16:57:09 +0300") Message-ID: <87va79f8rp.fsf@rub.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:Odz9bkX2L9sYhap8jY4d7rOgoeXxA4OQkl0GcYi3m9eN3SaEjU3 r37RtCwVW+grAmLZ8gPtjK71Dz2Oo0s0alB1zF9WImbseuuFDy42be3ZkK4OKK5E1P6LDAz K83chhj6mBs6f3+VAUBPnrONk6UNgndLwiuWzQozPKkeGbvBcmB8xUQeOI3MVpOPJRFSFq5 B72kBcANronec4cOZovNQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:XN9aer25N5s=:w4B0+MirCcTUqBe86vDfFt 2Be2cM271UHoLMA4raziv46U3u6qtXjujJnrGX5F8ApzNeERcliFDJV+10m9yPy52iNnflJNc Vn22KIrWa/Wo9CAf/TQyvmMujGljsFYLRbVVeq1Hdpx+pvFXMcWEaYB9tuITe364GSRc8i3KL DlF+V+qk35ZrikCP9LwNzbKKSgGo9JthbzcoRyNAx+JVdxpxqH1bXSKMy8Od+BtIvWLgqUo84 fuLS5OjKC0yW/kEEXn1pNujBqL/cMkKT6pWJNQ5bQI3ZUdY9hFupNgVxwK2Wo6Yx0rFbONsAb E6kblbHkW7YAchTQ/KxXxhFu43K7g1OvWDTY7WzVOXNQYGifsxW8Mw04u4OP9OIRvUh4US9uL Dl0v3fYlGH20Bj9McLn8A24Hr8zQGrJ2Y/wDIvg8v5SAycYed9ErKurOKh+c32uJE/qfvNQ7v J/VBlpKy/ZzzeMKsQTDeo8kmgxZcEkoEd+6jWnxJkf1iahli4mn7MWtmJK1PYtXDy3o4+vVS8 1psJMg6bjPjTOhbARbWq+VbdomG6HXPe6b+NHSMuE8czJHhM5IC8N69qnZPvneoftk7CnVGxp 3qUPpDKKlaEdj7Vq8pCOofisA8NNyeKafgAmESUvCGF9SiyjV8bKem54We9bvMiCBSgojG2tS BJrkKQ6P85N1o5LYxo644XjkdTqH9csFSi/K/OVKUjlERVgvdhhpwa8I1Onx5WZmZ4a5B9x4W fW/yhAmp+2DcRCqXx7/r8xuoEUlpMfd4cZilT6wtEZOfAY5NUlxtG6q1fqWn5NhKtEgmU2h3G RZGGbvP+OuzKeGOs+xbI7kFCbGccGgLnsboxSDDHTvXNOqXH7E= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 32673 Cc: 32673@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Wed, 12 Sep 2018 16:57:09 +0300 Eli Zaretskii wrote: >> From: Juri Linkov >> Date: Wed, 12 Sep 2018 02:32:09 +0300 >> Cc: 32673@debbugs.gnu.org >> >> Thanks, since your patch fixes the reported problem, there is no reason >> to postpone installing it. > > Agreed. Ok, pushed to master as commit 755fa34. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 12 19:27:33 2020 Received: (at 32673) by debbugs.gnu.org; 13 Feb 2020 00:27:33 +0000 Received: from localhost ([127.0.0.1]:59221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j22Lt-0007dt-J2 for submit@debbugs.gnu.org; Wed, 12 Feb 2020 19:27:33 -0500 Received: from black.elm.relay.mailchannels.net ([23.83.212.19]:47775) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j22Lr-0007dg-5o; Wed, 12 Feb 2020 19:27:32 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id B815F361364; Thu, 13 Feb 2020 00:27:29 +0000 (UTC) Received: from pdx1-sub0-mail-a74.g.dreamhost.com (100-96-17-7.trex.outbound.svc.cluster.local [100.96.17.7]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 3C5E53613E8; Thu, 13 Feb 2020 00:27:29 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a74.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Thu, 13 Feb 2020 00:27:29 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Unite-Quick: 60e4c96c3727cbee_1581553649305_1624535266 X-MC-Loop-Signature: 1581553649305:4222139022 X-MC-Ingress-Time: 1581553649305 Received: from pdx1-sub0-mail-a74.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a74.g.dreamhost.com (Postfix) with ESMTP id D341C7F571; Wed, 12 Feb 2020 16:27:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=iJiIhT6vWx7TZOe1AVuN1452tb4=; b= g9HjFvsfHlMAyvyFLm5P2E9duNriWtgjG6r+HZFrf/htL7MnhC0ySrVjX6ZTduHB e6Uqs5b5UhfhcWMwlZowK0eptj+OiIUXfuYNuYpv+zfUcOlmJEZohT8bstNdumJa SJbOej0sRRX6QuGfozCLkWDOH8pFMZxooA3/Gk1xR+I= Received: from mail.jurta.org (m91-129-105-126.cust.tele2.ee [91.129.105.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a74.g.dreamhost.com (Postfix) with ESMTPSA id D6D5D7F570; Wed, 12 Feb 2020 16:27:20 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a74 From: Juri Linkov To: Stephen Berman Subject: Re: bug#32673: 27.0.50; wdired: broken 'wdired--restore-dired-filename-prop' References: <87lg8byluo.fsf@mail.linkov.net> <875zzbu1or.fsf@gmx.net> <87sh2fpq4m.fsf@mail.linkov.net> <83a7omn7ii.fsf@gnu.org> <87va79f8rp.fsf@rub.de> Date: Wed, 12 Feb 2020 23:53:30 +0200 In-Reply-To: <87va79f8rp.fsf@rub.de> (Stephen Berman's message of "Thu, 13 Sep 2018 22:21:46 +0200") Message-ID: <87ftfgbsxh.fsf@linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrieejgddvfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrdduvdeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdehrdduvdeipdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepshhtvghphhgvnhdrsggvrhhmrghnsehgmhigrdhnvght X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32673 Cc: Eli Zaretskii , 32673@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 32673 fixed close 32673 27.1 quit > Ok, pushed to master as commit 755fa34. Thanks, closed. From unknown Sun Jun 15 08:32:48 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 12 Mar 2020 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator