[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inconvenience with TRAMP and recentf
From: |
Michael Albinus |
Subject: |
Re: Inconvenience with TRAMP and recentf |
Date: |
Mon, 02 Jul 2007 21:37:55 +0200 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) |
Alan Hadsell <ahadsell@mtdiablo.com> writes:
> Michael Albinus <michael.albinus@gmx.de> writes:
>
>> In expand-file-name, Tramp needs to open a remote connection only in
>> case the local file name is not absolute, and it must expand the home
>> directory to an absolute file name.
>
> In my case, the entries in my recentf-list are already absolute:
> e.g. /pscp:al@fibonacci.pacengr.com:/home/al/delete_data.sql. But
> TRAMP still opens a new session whenever I start emacs.
I did test it locally (Emacs 22.1.50.2, Tramp 2.0.56). If the remote
file name in .recentf contains already an absolute local file name,
expand-file-name does NOT open a connection. The connection is opened by
file-readable-p.
The remote connection is NOT opened with the following settings in my
.emacs:
(require 'recentf)
(add-to-list 'recentf-keep 'file-remote-p)
(recentf-mode 1)
> Incidentally, maybe it would be a good idea to canonicalize the remote
> filenames when they are first placed in the recentf-list, rather than
> waiting for recentf-cleanup to do it.
Yes. But it seems all file names in .recentf are already absolute; at
least according to my tests. So the settings above might be sufficient,
aren't they?
Best regards, Michael.