unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Default value of recentf-keep
@ 2007-07-09 15:48 Michael Albinus
  0 siblings, 0 replies; only message in thread
From: Michael Albinus @ 2007-07-09 15:48 UTC (permalink / raw)
  To: emacs-devel; +Cc: Alan Hadsell

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-09 15:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-09 15:48 Default value of recentf-keep Michael Albinus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).