Subject: Re: bug#47497: 28.0.50; dired: does not distinguish between local directory and remote
From: Michael Albinus <[email-masked]>
To: Jean Louis <[email-masked]>
Cc: [email-masked]
Date: Tue, 30 Mar 2021 13:09:54 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Jean Louis <[email-masked]> writes:

Hi Jean,

> If there exists local directory: /scp:static: by using Dired and
> pressing RET, Emacs will try to open connection over Tramp and show
> remote files.
>
> Is Tramp working on improbability that users will never have such
> directories in / root file system?

Tramp handles this case, if instructed. Read the Tramp manual, chapter
"Frequesntly Asked Questions":

--8<---------------cut here---------------start------------->8---
        − To deactivate TRAMP for some look-alike remote file names,
          set ‘tramp-ignored-file-name-regexp’ to a proper regexp in
          ‘.emacs’.  *Note*, that we don’t use
          ‘customize-set-variable’, in order to avoid loading TRAMP.

               (setq tramp-ignored-file-name-regexp "\\`/ssh:example\\.com:")

          This is needed, if you mount for example a virtual file
          system on your local host’s root directory as
          ‘/ssh:example.com:’.
--8<---------------cut here---------------end--------------->8---

I'm closing the bug, because there's no error. The problem was discussed
in bug#31489 initially.

Best regards, Michael.