help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: recentf exclude question


From: Andreas Politz
Subject: Re: recentf exclude question
Date: Thu, 10 Sep 2009 14:32:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

"B. T. Raven" <nihil@nihilo.net> writes:

> Andreas Politz wrote:
>> "B. T. Raven" <nihil@nihilo.net> writes:
>>
>>> I want only .txt, .tex, and the .emacs files listed in recentf (under
>>> Open Recent). Is there some way to construct a regular expression to
>>> prevent other opened files from being added to the list?
>>>
>>> Thanks,
>>> Ed
>>
>> Try this.
>>
>> (setq recentf-exclude nil
>>       recentf-include '("\\.t\\(ex\\|xt\\)\\'" "\\`\\.emacs\\'"))
>>
>> -ap
>>
>>
>>
>
> I find a recentf-keep variable in vers. 22 and 23 but no
> recentf-include. Anyway I evaluated the expression but it didn't
> prevent any types of files from being added to the list. Your first
> regular expression in the list with bar disjunction doesn't have a
> backtick to match the tick before the double quote; is this on
> purpose? I don't see how the first regexp specifies any number of
> characters before tex or txt and the second no characters. It looks
> like tex and txt are kept if I change the variable in your expression
> to recentf-include but .emacs isn't added to the list.
>
> ???
>
> Ed

\` and \' match at the beginning and end of a string or buffer.

The regexp does not necessarily have to match the whole file-name.

Yes, it's called recentf-keep.

Yes,the \` before .emacs is to restrictive, remove it. Or replace it
with [/\\] (match directory separator character).

-ap









reply via email to

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