GNU bug report logs - #41624
28.0.50; wdired-change-to-wdired-mode sometimes infloops

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Sun, 31 May 2020 04:48:02 UTC

Severity: normal

Found in version 28.0.50

To reply to this bug, email your comments to 41624 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#41624; Package emacs. (Sun, 31 May 2020 04:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Heerdegen <michael_heerdegen <at> web.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 31 May 2020 04:48:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; wdired-change-to-wdired-mode sometimes infloops
Date: Sun, 31 May 2020 06:47:03 +0200
Hello,

here is a recipe for emacs -Q:

M-x find-dired ~/ RET -iname \*.pdf RET  (any find-dired buffer will do)

M-: (setq wdired-allow-to-change-permissions 'advanced) RET

M-x wdired-change-to-wdired-mode RET

  ==> infloop

TIA,

Michael.



In GNU Emacs 28.0.50 (build 102, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0)
 of 2020-05-31 built on drachen
Repository revision: 61617ac7957e7f909086ed72ce1cd43701ecf18a
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Debian GNU/Linux bullseye/sid





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41624; Package emacs. (Thu, 22 Oct 2020 13:44:02 GMT) Full text and rfc822 format available.

Message #8 received at 41624 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 41624 <at> debbugs.gnu.org
Subject: Re: bug#41624: 28.0.50; wdired-change-to-wdired-mode sometimes
 infloops
Date: Thu, 22 Oct 2020 15:43:45 +0200
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> here is a recipe for emacs -Q:
>
> M-x find-dired ~/ RET -iname \*.pdf RET  (any find-dired buffer will do)
>
> M-: (setq wdired-allow-to-change-permissions 'advanced) RET
>
> M-x wdired-change-to-wdired-mode RET
>
>   ==> infloop

This bug is still present on the trunk, but I'm not quite sure whether
this is supposed to be supported or not?  The find-dired buffers aren't
very much like normal dired buffers...  so should wdired just signal an
error here?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41624; Package emacs. (Fri, 23 Oct 2020 10:04:01 GMT) Full text and rfc822 format available.

Message #11 received at 41624 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 41624 <at> debbugs.gnu.org
Subject: Re: bug#41624: 28.0.50; wdired-change-to-wdired-mode sometimes
 infloops
Date: Fri, 23 Oct 2020 12:03:30 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> > M-x find-dired ~/ RET -iname \*.pdf RET  (any find-dired buffer will do)
> >
> > M-: (setq wdired-allow-to-change-permissions 'advanced) RET
> >
> > M-x wdired-change-to-wdired-mode RET
> >
> >   ==> infloop
>
> This bug is still present on the trunk, but I'm not quite sure whether
> this is supposed to be supported or not?  The find-dired buffers aren't
> very much like normal dired buffers...  so should wdired just signal an
> error here?

I can't answer that, but I can tell that when I manually delete the last
lines of text and whitespace in such a buffer (saying "find finished
..."), it works as expected (though I'm getting a message saying that "1
rename actions failed").  But I'm definitely able to change permissions
with wdired then.  So it seems possible to make the feature work, the
infloop results from the unsuitable termination condition of the loop in
`wdired-preprocess-perms'.

Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41624; Package emacs. (Fri, 23 Oct 2020 11:17:01 GMT) Full text and rfc822 format available.

Message #14 received at 41624 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>,
 Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 41624 <at> debbugs.gnu.org
Subject: Re: bug#41624: 28.0.50;
 wdired-change-to-wdired-mode sometimes infloops
Date: Fri, 23 Oct 2020 11:15:54 +0000
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> This bug is still present on the trunk, but I'm not quite sure whether
> this is supposed to be supported or not?  The find-dired buffers aren't
> very much like normal dired buffers...  so should wdired just signal an
> error here?

I think it would be a very nice feature to have, though.

Does it ever work?  If so, perhaps we should signal an error only for
the cases where we know it doesn't?  If we can easily decide that...

If it never works, it's of course better to signal an error than
inflooping or doing something broken.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41624; Package emacs. (Fri, 23 Oct 2020 11:23:02 GMT) Full text and rfc822 format available.

Message #17 received at 41624 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 41624 <at> debbugs.gnu.org
Subject: Re: bug#41624: 28.0.50; wdired-change-to-wdired-mode sometimes
 infloops
Date: Fri, 23 Oct 2020 13:22:20 +0200
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> I can't answer that, but I can tell that when I manually delete the last
> lines of text and whitespace in such a buffer (saying "find finished
> ..."), it works as expected (though I'm getting a message saying that "1
> rename actions failed").  But I'm definitely able to change permissions
> with wdired then.  So it seems possible to make the feature work, the
> infloop results from the unsuitable termination condition of the loop in
> `wdired-preprocess-perms'.

If even renaming doesn't work, then it does sound like this was never
supposed to be a command that's applicable to dired-find buffers, I
think?

On the other hand, if this did work, then it'd be pretty nice.  But it
sounds less like a bug fix and more like a new feature.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41624; Package emacs. (Fri, 23 Oct 2020 11:24:01 GMT) Full text and rfc822 format available.

Message #20 received at 41624 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 41624 <at> debbugs.gnu.org
Subject: Re: bug#41624: 28.0.50; wdired-change-to-wdired-mode sometimes
 infloops
Date: Fri, 23 Oct 2020 13:22:52 +0200
Stefan Kangas <stefankangas <at> gmail.com> writes:

> If it never works, it's of course better to signal an error than
> inflooping or doing something broken.

Yes, I'm leaning towards signalling an error here.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41624; Package emacs. (Fri, 23 Oct 2020 11:39:02 GMT) Full text and rfc822 format available.

Message #23 received at 41624 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 41624 <at> debbugs.gnu.org
Subject: Re: bug#41624: 28.0.50; wdired-change-to-wdired-mode sometimes
 infloops
Date: Fri, 23 Oct 2020 13:38:06 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> > I can't answer that, but I can tell that when I manually delete the last
> > lines of text and whitespace in such a buffer (saying "find finished
> > ..."), it works as expected (though I'm getting a message saying that "1
> > rename actions failed").  But I'm definitely able to change permissions
> > with wdired then.  So it seems possible to make the feature work, the
> > infloop results from the unsuitable termination condition of the loop in
> > `wdired-preprocess-perms'.
>
> If even renaming doesn't work, then it does sound like this was never
> supposed to be a command that's applicable to dired-find buffers, I
> think?

I didn't say renaming doesn't work, I only got that inappropriate
message.  Maybe just because I had edited the buffer by hand to make the
loop terminate.

I'm not convinced that this is not an intended use case. - on the
contrary.  Everything works, basically, it just seems that some details
in the code are not prepared for some things that are slightly
different, e.g. the final line in those buffers.

Please don't just signal an error unless you are really sure that this
never worked and was never intended to work, and is not easy to fix.

Regards,

Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41624; Package emacs. (Fri, 23 Oct 2020 12:18:02 GMT) Full text and rfc822 format available.

Message #26 received at 41624 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 41624 <at> debbugs.gnu.org
Subject: Re: bug#41624: 28.0.50; wdired-change-to-wdired-mode sometimes
 infloops
Date: Fri, 23 Oct 2020 14:17:18 +0200
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> I didn't say renaming doesn't work, I only got that inappropriate
> message.  Maybe just because I had edited the buffer by hand to make the
> loop terminate.

I found out that the infloop can be fixed easily if we change
`find-dired-sentinel' to let the buffer end in a newline.

Then I can change permissions with wdired, I only still get the
inappropriate message that it would have failed, though it has
succeeded.

Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41624; Package emacs. (Fri, 23 Oct 2020 13:19:02 GMT) Full text and rfc822 format available.

Message #29 received at 41624 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 41624 <at> debbugs.gnu.org
Subject: Re: bug#41624: 28.0.50; wdired-change-to-wdired-mode sometimes
 infloops
Date: Fri, 23 Oct 2020 15:18:33 +0200
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> Then I can change permissions with wdired, I only still get the
> inappropriate message that it would have failed, though it has
> succeeded.

Hah, and this issue is also present in a "standard" dired buffer.

So, apart from the missing newline at the end of the find-dired buffer,
I see no difference to regular dired buffers.

Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41624; Package emacs. (Sat, 24 Oct 2020 19:47:02 GMT) Full text and rfc822 format available.

Message #32 received at 41624 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 41624 <at> debbugs.gnu.org
Subject: Re: bug#41624: 28.0.50; wdired-change-to-wdired-mode sometimes
 infloops
Date: Sat, 24 Oct 2020 21:46:12 +0200
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> I found out that the infloop can be fixed easily if we change
> `find-dired-sentinel' to let the buffer end in a newline.

[...]

>> Then I can change permissions with wdired, I only still get the
>> inappropriate message that it would have failed, though it has
>> succeeded.
>
> Hah, and this issue is also present in a "standard" dired buffer.
>
> So, apart from the missing newline at the end of the find-dired buffer,
> I see no difference to regular dired buffers.

Ah, then I think this should indeed be fixed (changing
`find-dired-sentinel' sounds good to me).  Are you pushing a fix for
this?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41624; Package emacs. (Sat, 31 Oct 2020 14:44:01 GMT) Full text and rfc822 format available.

Message #35 received at 41624 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 41624 <at> debbugs.gnu.org
Subject: Re: bug#41624: 28.0.50; wdired-change-to-wdired-mode sometimes
 infloops
Date: Sat, 31 Oct 2020 15:43:45 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Ah, then I think this should indeed be fixed (changing
> `find-dired-sentinel' sounds good to me).  Are you pushing a fix for
> this?

Ok, will do.

In the meanwhile I have reported (and also partially debugged) the
"rename actions failed" issue as separate Bug #44343.

Regards,

Michael.




This bug report was last modified 4 years and 226 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.