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

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

bug#17425: 24.4.50; tramp-cleanup-this-connection on push-button


From: Michael Albinus
Subject: bug#17425: 24.4.50; tramp-cleanup-this-connection on push-button
Date: Mon, 12 May 2014 22:32:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> - There's a buffer with an existing remote default-directory, connection
>>   established.
>> - No problem to run browse-url in that buffer (the example was an
>>   rcirc buffer). It doesn't hurt, that default-directory is remote.
>> - After a while, the remote host wasn't available any more, for whatever
>>   reason.
>> - Now browse-url fails, because it checks file-directory-p and
>>   file-readable-p. Both operations try to access the remote
>>   default-directory.
>
> If the process is supposed to run locally, then the right test should be
> based on unhandled-file-name-directory (that's what it's for).  If the
> process is supposed to be run "on the host referred to be by
> default-directory", then re-connecting is the right thing to do.

unhandled-file-name-directory will always return a local directory. This
could destroy the work of url-handlers.el. Imagine the snippet

(let ((default-directory "http://debbugs.gnu.org";))
  (url-handler-mode 1)
  (browse-url "17425"))

If one of the browse-url-* functions uses expand-file-name internally,
it shall open the url "http://debbugs.gnu.org/17425";. This wouldn't
work, if unhandled-file-name-directory changes default-directory.

If you don't care, then I'm ok with you. I just wanted to show the
consequence. 

>         Stefan

Best regards, Michael.





reply via email to

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