all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* dired cons bug?
@ 2022-08-10 11:26 Harald Judt
  2022-08-11  5:55 ` Jean Louis
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Harald Judt @ 2022-08-10 11:26 UTC (permalink / raw)
  To: help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 1132 bytes --]

Hi,

I have a question regarding using dired programmatically in Emacs 28.1. Say I
do the following call to open a dired buffer and insert the files:

(dired (cons "/home/user" '("/home/user/tmp/test/a/a" 
"/home/user/tmp/test/b/b" "/home/user/tmp/test/c/c")))

It works fine, I get a nice listing and can move around like expected, mark
files and try to delete them. Now it gets interesting: Usually after hitting
"x" to execute, then confirming the deletion, the buffer will refresh. But not
in this case, not when I open dired using the cons above. I can revert the
buffer using "g".

Note that when I simply do (dired "/home/user/tmp/test"), then insert the
subdir to show the files and delete them, this is not reproducible. The buffer
will be refreshed immediately after the delete operation completes.

Why? Am I missing something? Is this a (known) bug or expected behaviour? I've
tried with emacs -Q, so it seems to be no configuration problem.

Regards,
Harald

-- 
`Experience is the best teacher.'

PGP Key ID: 4FFFAB21B8580ABD
Fingerprint: E073 6DD8 FF40 9CF2 0665 11D4 4FFF AB21 B858 0ABD

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: dired cons bug?
@ 2022-08-13 23:05 Harald Judt
  0 siblings, 0 replies; 10+ messages in thread
From: Harald Judt @ 2022-08-13 23:05 UTC (permalink / raw)
  To: eliz, help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 1218 bytes --]

Hi Eli,

> >/Date: Thu, 11 Aug 2022 11:23:52 +0200/
> >/From: Harald Judt <h.judt@gmx.at>/
> >//
> >/I have found an explanation for my own question: The problem is that after a /
> >/dired-do-xxxx command, the buffer of the _target_ directory will be /
> >/refreshed. /
> >/But the target directory of /home/user/tmp/test/a/a would be /
> >//home/user/tmp/test/a/, and that is different from the one used in the base /
> >/dir of the cons (/home/user/). In fact, if I add a file /home/user/x and add /
> >/that to the file list and delete it, the buffer will be reverted correctly. /
> >/If /
> >/I delete any of the other files, it won't./
> >//
> >/Now, what could I do to programmatically revert the current dired buffer /
> >/after /
> >/executing a dired-do command?/
>
> I have posted a patch that's supposed to fix this.  Please try it.

Thanks for your patch, I have tried it and it indeed fixes my problems. I have 
not noticed any new problems caused by it so far, but I'll give it some more 
thorough testing next week.

Regards,

Harald

-- 
`Experience is the best teacher.'

PGP Key ID: 4FFFAB21B8580ABD
Fingerprint: E073 6DD8 FF40 9CF2 0665 11D4 4FFF AB21 B858 0ABD


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

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

end of thread, other threads:[~2022-08-13 23:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-10 11:26 dired cons bug? Harald Judt
2022-08-11  5:55 ` Jean Louis
2022-08-11  6:42   ` Eli Zaretskii
2022-08-11  9:32     ` Jean Louis
2022-08-11  8:11   ` Harald Judt
2022-08-11  9:23 ` Harald Judt
2022-08-12  5:50   ` Eli Zaretskii
2022-08-11 13:30 ` Eli Zaretskii
2022-08-11 13:38 ` [External] : " Drew Adams
  -- strict thread matches above, loose matches on Subject: below --
2022-08-13 23:05 Harald Judt

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.