GNU bug report logs -
#60233
30.0.50; Dired buffer not updating sometimes
Previous Next
Reported by: Jean Louis <bugs <at> gnu.support>
Date: Wed, 21 Dec 2022 05:21:01 UTC
Severity: normal
Found in version 30.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #32 received at 60233 <at> debbugs.gnu.org (full text, mbox):
Jean Louis <bugs <at> gnu.support> writes:
> Hello Eli,
Hi Jean,
> Now I can reproduce the bug "why Dired buffer does not update" with
> `emacs -Q'.
>
> The new video for those who can see it is here:
> https://gnu.support/images/tmp/2022-12-23/2022-12-23-07:56:46.ogv
>
> Conditions that Dired buffer will not update is related to default
> directory being changed, being something else than what is the Dired
> buffer.
>
> To reproduce it in `emacs -Q' you please do following:
>
> - go into any Dired buffer;
>
> - M-x cd RET and change default directory to something else than Dired
> buffer
>
> - key B will inject new lines of a byte-compiled file without
> refreshing, delete by moving to Trash will delete without refreshing
> the Dired buffer.
>
> I can only assume that variable `default-directory' shall remain local
> to Dired buffer even if user invokes `M-x cd' or programmatically `cd'.
>
> And I never invoke `M-x cd' in Dired buffers, but I may invoke it in
> other functions such as below:
>
> (defun cf-send-sms (id)
> "Sends the SMS by using default SMS function"
> (cd (getenv "HOME"))
>
> And the reason to `cd' to HOME directory is to escape programs to try
> external commands within Tramp directories. I will try using
> `executable-find' for external programs, but again I think that when
> my functions get Tramp directory as default directory then they don't
> find either executables or directories, that is why I am changing to
> $HOME.
You're better with
--8<---------------cut here---------------start------------->8---
(defun cf-send-sms (id)
"Sends the SMS by using default SMS function"
(let ((default-directory (getenv "HOME")))
...)
--8<---------------cut here---------------end--------------->8---
> Jean
Best regards, Michael.
This bug report was last modified 2 years and 207 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.