[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#60233: 30.0.50; Dired buffer not updating sometimes
From: |
Eli Zaretskii |
Subject: |
bug#60233: 30.0.50; Dired buffer not updating sometimes |
Date: |
Sat, 24 Dec 2022 14:23:07 +0200 |
> Date: Fri, 23 Dec 2022 08:23:10 +0300
> From: Jean Louis <bugs@gnu.support>
> Cc: 60233@debbugs.gnu.org
>
> 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.
>
> For Dired updating, I think that M-x cd shall not change the
> default-directory for Dired buffer -- and again -- I am not using it
> interactively but in functions.
>
> Now I can't remember how I invoked a function that uses `cd' but I can
> focus on it next time. Maybe I just launched some of functions.
Thanks.
I think there's a misunderstanding here of what "M-x cd" does. Its
_only_ effect is to change the default-directory of the current
buffer. So:
(1) doing this in a Dired buffer is shooting yourself in the foot;
(2) if 'cd' is not allowed to change default-directory in Dired
buffers, then it will have no effect, which sounds unjustified
and unnecessary;
(3) whatever you think you need "M-x cd" for in Dired buffers must
be done in some other way
I don't think I see any bug here. It's a cockpit error: you should
not invoke "M-x cd" in Dired buffers if you want to keep updating
them.
- bug#60233: 30.0.50; Dired buffer not updating sometimes, Jean Louis, 2022/12/21
- bug#60233: 30.0.50; Dired buffer not updating sometimes, Eli Zaretskii, 2022/12/21
- bug#60233: 30.0.50; Dired buffer not updating sometimes, Jean Louis, 2022/12/21
- bug#60233: 30.0.50; Dired buffer not updating sometimes, Eli Zaretskii, 2022/12/21
- bug#60233: 30.0.50; Dired buffer not updating sometimes, Jean Louis, 2022/12/22
- bug#60233: 30.0.50; Dired buffer not updating sometimes, Jean Louis, 2022/12/22
- bug#60233: 30.0.50; Dired buffer not updating sometimes, Jean Louis, 2022/12/23
- bug#60233: 30.0.50; Dired buffer not updating sometimes, Michael Albinus, 2022/12/23
- bug#60233: 30.0.50; Dired buffer not updating sometimes, Jean Louis, 2022/12/23
- bug#60233: 30.0.50; Dired buffer not updating sometimes,
Eli Zaretskii <=
- bug#60233: 30.0.50; Dired buffer not updating sometimes, Jean Louis, 2022/12/24
- bug#60233: 30.0.50; Dired buffer not updating sometimes, Eli Zaretskii, 2022/12/24
bug#60233: 30.0.50; Dired buffer not updating sometimes, Gregory Heytings, 2022/12/22