Thanks Michael, that seems to work.

Ernesto

On Fri, Aug 10, 2018 at 6:04 AM Michael Albinus <[email protected]>
wrote:

> Ernesto Alfonso <[email protected]> writes:
>
> > Hi,
>
> Hi Ernesto,
>
> > I'm not too familiar with tramp internals and I was looking for a way
> > to easily determine whether a given buffer is using tramp or not, and
> > optionally to determine the method in use.
>
> The buffer-local variable `default-directory' will help. It gives always
> the default directory of a buffer, independent whether a file is visiting
> this buffer or not.
>
> If (file-remote-p default-directory) returns non-nil, the buffer is
> related to Tramp. Even better, (file-remote-p default-directory 'method)
> returns the connection method.
>
> > Thanks,
> >
> > Ernesto
>
> Best regards, Michael.
>
_______________________________________________
Tramp-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to