emacs-devel
[Top][All Lists]
Advanced

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

Default value of recentf-keep


From: Michael Albinus
Subject: Default value of recentf-keep
Date: Mon, 09 Jul 2007 17:48:32 +0200
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (hpux)

Hi,

recentf-keep has as default value '(file-readable-p). It also
recommends to add `file-remote-p' as first predicate in case one wants
to keep remote files in recentf-list without establishing remote
connections during Emacs startup.

That works fine with one inconvenience: because remote files are never
checked for there existence, they are kept forever in recentf-list,
even if they disappear on the remote system.

I'ld like to propose the following new function as default initial
predicate for recentf-keep:

(defun recentf-keep-default-predicate (file)
  "Return non-nil if FILE should be kept in the recent list.
It handles the case of remote files as well."
  (cond
   ((file-remote-p file t) (file-readable-p file))
   ((file-remote-p file))
   ((file-readable-p file))))

With this function, a remote file would be cleaned up from
recentf-list once a connection has been established to the
corresponding remote system, and the file is not accessible.

What do people think about?

Best regards, Michael.





reply via email to

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