unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#41624: 28.0.50; wdired-change-to-wdired-mode sometimes infloops
@ 2020-05-31  4:47 Michael Heerdegen
  2020-10-22 13:43 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Heerdegen @ 2020-05-31  4:47 UTC (permalink / raw)
  To: 41624


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






^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#41624: 28.0.50; wdired-change-to-wdired-mode sometimes infloops
  2020-05-31  4:47 bug#41624: 28.0.50; wdired-change-to-wdired-mode sometimes infloops Michael Heerdegen
@ 2020-10-22 13:43 ` Lars Ingebrigtsen
  2020-10-23 10:03   ` Michael Heerdegen
  2020-10-23 11:15   ` Stefan Kangas
  0 siblings, 2 replies; 11+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-22 13:43 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 41624

Michael Heerdegen <michael_heerdegen@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





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#41624: 28.0.50; wdired-change-to-wdired-mode sometimes infloops
  2020-10-22 13:43 ` Lars Ingebrigtsen
@ 2020-10-23 10:03   ` Michael Heerdegen
  2020-10-23 11:22     ` Lars Ingebrigtsen
  2020-10-23 11:15   ` Stefan Kangas
  1 sibling, 1 reply; 11+ messages in thread
From: Michael Heerdegen @ 2020-10-23 10:03 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 41624

Lars Ingebrigtsen <larsi@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.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#41624: 28.0.50; wdired-change-to-wdired-mode sometimes infloops
  2020-10-22 13:43 ` Lars Ingebrigtsen
  2020-10-23 10:03   ` Michael Heerdegen
@ 2020-10-23 11:15   ` Stefan Kangas
  2020-10-23 11:22     ` Lars Ingebrigtsen
  1 sibling, 1 reply; 11+ messages in thread
From: Stefan Kangas @ 2020-10-23 11:15 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Michael Heerdegen; +Cc: 41624

Lars Ingebrigtsen <larsi@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.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#41624: 28.0.50; wdired-change-to-wdired-mode sometimes infloops
  2020-10-23 10:03   ` Michael Heerdegen
@ 2020-10-23 11:22     ` Lars Ingebrigtsen
  2020-10-23 11:38       ` Michael Heerdegen
  0 siblings, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-23 11:22 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 41624

Michael Heerdegen <michael_heerdegen@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





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#41624: 28.0.50; wdired-change-to-wdired-mode sometimes infloops
  2020-10-23 11:15   ` Stefan Kangas
@ 2020-10-23 11:22     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 11+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-23 11:22 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Michael Heerdegen, 41624

Stefan Kangas <stefankangas@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





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#41624: 28.0.50; wdired-change-to-wdired-mode sometimes infloops
  2020-10-23 11:22     ` Lars Ingebrigtsen
@ 2020-10-23 11:38       ` Michael Heerdegen
  2020-10-23 12:17         ` Michael Heerdegen
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Heerdegen @ 2020-10-23 11:38 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 41624

Lars Ingebrigtsen <larsi@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.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#41624: 28.0.50; wdired-change-to-wdired-mode sometimes infloops
  2020-10-23 11:38       ` Michael Heerdegen
@ 2020-10-23 12:17         ` Michael Heerdegen
  2020-10-23 13:18           ` Michael Heerdegen
  2020-10-24 19:46           ` Lars Ingebrigtsen
  0 siblings, 2 replies; 11+ messages in thread
From: Michael Heerdegen @ 2020-10-23 12:17 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 41624

Michael Heerdegen <michael_heerdegen@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.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#41624: 28.0.50; wdired-change-to-wdired-mode sometimes infloops
  2020-10-23 12:17         ` Michael Heerdegen
@ 2020-10-23 13:18           ` Michael Heerdegen
  2020-10-24 19:46           ` Lars Ingebrigtsen
  1 sibling, 0 replies; 11+ messages in thread
From: Michael Heerdegen @ 2020-10-23 13:18 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 41624

Michael Heerdegen <michael_heerdegen@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.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#41624: 28.0.50; wdired-change-to-wdired-mode sometimes infloops
  2020-10-23 12:17         ` Michael Heerdegen
  2020-10-23 13:18           ` Michael Heerdegen
@ 2020-10-24 19:46           ` Lars Ingebrigtsen
  2020-10-31 14:43             ` Michael Heerdegen
  1 sibling, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-24 19:46 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 41624

Michael Heerdegen <michael_heerdegen@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





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#41624: 28.0.50; wdired-change-to-wdired-mode sometimes infloops
  2020-10-24 19:46           ` Lars Ingebrigtsen
@ 2020-10-31 14:43             ` Michael Heerdegen
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Heerdegen @ 2020-10-31 14:43 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 41624

Lars Ingebrigtsen <larsi@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.





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-10-31 14:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-31  4:47 bug#41624: 28.0.50; wdired-change-to-wdired-mode sometimes infloops Michael Heerdegen
2020-10-22 13:43 ` Lars Ingebrigtsen
2020-10-23 10:03   ` Michael Heerdegen
2020-10-23 11:22     ` Lars Ingebrigtsen
2020-10-23 11:38       ` Michael Heerdegen
2020-10-23 12:17         ` Michael Heerdegen
2020-10-23 13:18           ` Michael Heerdegen
2020-10-24 19:46           ` Lars Ingebrigtsen
2020-10-31 14:43             ` Michael Heerdegen
2020-10-23 11:15   ` Stefan Kangas
2020-10-23 11:22     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).