[Top][All Lists]

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

Re: Revisit: recentf-cleanup, file-readable-p & remote files

From: Michael Mauger
Subject: Re: Revisit: recentf-cleanup, file-readable-p & remote files
Date: Mon, 14 Mar 2005 09:36:38 -0800 (PST)

--- David Ponce <address@hidden> wrote:

> Hi Michael and other Emacs developers,
>  > I am now in a situation where about half of the files I edit are
>  > local and the remainder are on a remote Unix server.  I appreciate
>  > the automatic cleanup of files on the recentf list and would like to
>  > leave that feature in place.  Unfortunately the time to connect to
>  > the badly overloaded server and checking files there has gotten
>  > painful.  Having the remote filenames on the recentf list is
>  > valuable (thus I don't want to place remote files on the
>  > recentf-exclude list).  What I would like to be able to do is just
>  > not check these remote files as part of the auto cleanup process.
>  >
> Your patch looks good. However I would prefer a more general mechanism
> to keep files in the recent list, that is which can keep remote files
> of course but other ones too.
> Here is a patch that implements that. It introduces a new customizable
> variable `recentf-keep' which can be saw as a counterpoint of
> `recentf-exclude'. It uses the same format so you can force to keep
> file names in the recent list based on regexp matching or on
> predicates. For compatibility, the default is to keep readable files,
> that is those that verify the `file-readable-p' predicate. It is
> easy to keep remote file names too by adding the `file-remote-p'
> predicate in front of `recentf-keep'. To keep all file names just set
> `recentf-keep' to nil.
> Another advantage of that solution is that it eliminates the need of
> the `recentf-keep-non-readable-files-flag' flag and simplifies the
> implementation! I also removed the unnecessary `recentf-find-file'
> wrapper function to directly use `find-file' to open files.
> Could you please try this patch? WDYT?
> If there is no objection, can I commit it?
> Thanks!
> David

I had problems with the patch but was able to manually recreate the
results.  It works great.  I'll run it for a couple of days and I'll let
you and the list know if I encounter any problems.

Attached is my re-created version of the patch.

Attachment: recentf.diff
Description: recentf.diff

reply via email to

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