bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50187: 28.0.50; tramp is called from calendar


From: Michael Albinus
Subject: bug#50187: 28.0.50; tramp is called from calendar
Date: Fri, 16 Sep 2022 16:38:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Sam Steingold <sds@gnu.org> writes:

Hi Sam,

> (dolist (b (buffer-list))
>   (with-current-buffer b
>     (when (and (null buffer-file-name)
>                (not (eq major-mode 'dired-mode))
>                (not (string-match " ?\\*.*\\(tramp\\|vc\\|diff\\)" 
> (buffer-name)))
>                (find-file-name-handler default-directory 'file-remote-p))
>       (message "Reset 'default-directory' in %s(%s) from %s"
>                b (or buffer-file-name list-buffers-directory) 
> default-directory)
>       (setq default-directory (default-value 'default-directory))
>       )))

This works by sheer luck then. `default-directory' must not be nil; it
is fundamental that it is a string.

That code makes other packages useless for remote buffers, like shell or
compile. This cannot be the solution.

Best regards, Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]