emacs-devel
[Top][All Lists]
Advanced

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

Re: Introducing thread-safe Tramp


From: Michael Albinus
Subject: Re: Introducing thread-safe Tramp
Date: Sat, 28 Jul 2018 11:02:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Filipp Gunbin <address@hidden> writes:

>>> Maybe there could be rules for find-file to use async behavior by
>>> default, like:
>>>
>>> - When a non-local method is explicitly used (that is, not /sudo)
>>>
>>> - When default-directory is on a remote host
>>>
>>> - When a file being visited is greater than some customizable size
>>
>> That's even worse, IMO.  We will never be able to second-guess what
>> users want, and they will want a fire escape even if we succeed in
>> most cases.
>
> I think this is more about reasonable defaults than about guessing for
> users..  I'd be happy to have all remote files opened asynchronously by
> default - the delay is significant, especially if it's large log file
> over ssh.  For local files, I'd rarely notice the difference.  Of
> course, there could and should be fire escape.

I've changed find-file-asynchronously to accept also a regexp as
value. If you customize

(customize-set-variable
  'find-file-asynchronously tramp-file-name-regexp
  "Visit remote files asynchronously")

you get the requested behavior. The default shall still be nil, I
believe.

If needed, we could also allow a function as find-file-asynchronously
value. People could add their own checks then, like for file name size.



reply via email to

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