From mboxrd@z Thu Jan 1 00:00:00 1970 From: AW Subject: Re: minor mode recentf: show only *.tex and *.org files?! Date: Tue, 25 Jun 2013 14:30:23 +0200 Message-ID: <2970376.3AR5okv97l@linux-ik7b.site> References: <1491756.k2ybY6NjeE@linux-ik7b.site> <87li5y8onv.fsf@yahoo.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrSIc-0008AP-Sb for emacs-orgmode@gnu.org; Tue, 25 Jun 2013 08:24:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrSIa-0002Da-7K for emacs-orgmode@gnu.org; Tue, 25 Jun 2013 08:24:42 -0400 Received: from mailout10.t-online.de ([194.25.134.21]:37610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrSIZ-0002DG-UK for emacs-orgmode@gnu.org; Tue, 25 Jun 2013 08:24:40 -0400 In-Reply-To: <87li5y8onv.fsf@yahoo.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Richard Cc: emacs-orgmode@gnu.org Am Dienstag, 25. Juni 2013, 12:34:12 schrieb Nicolas Nicolas Richard: > AW writes: > > I'm using the minor mode recentf to get a list of recently opened files. > > But the list is cluttered with files like *.out, *.log and whatever. > > Variable recentf-exclude is the answer. > I have this : > (setq recentf-exclude '( > "/.emacs.bmk$" > "\\.ido.last$" ; ido mode (emacs) > "session\\.[a-f0-9]*$" ; emacs > "~$" ; emacs (and others) backup > "\\.log$" ; LaTeX > "\\.pdfsync$" ; LaTeX > "\\.toc" ; LaTeX > "\\.aux$" ; LaTeX > "/Dropbox/" ; avoid opening dropbox files, there is > probably a local mirror "bssm2011-dropbox" ; symbolic link to dropbox > "/COMMIT_EDITMSG$" > "/tmp/" > ".el.gz$" > )) > > but obviously you want to adjust that to your situation. If you really > only want org and tex files, you should ignore anything that doesn't end > in org or tex, i.e. > > (setq recentf-exclude '( ; if filename... > "[^gx]$" ; doesn't end in gx > "[^e]x$" ; or ends in x but not ex > "[^r]g$" ; or ends in g but not rg > "[^t]ex$"; or ends in ex but not tex > "[^o]rg$" ; or ends in rg but not org > )) ; ...then exclude > N. Thank you very much. Your way to exclude only some disturbing files seems much better to me. But I fail to exclude in Emacs 24.3 under Windows 7 lines in recentf like this: c:/Users/aw/AppData/Local/Temp/diary1234ABc The filename is always "diary" + 4 digits + letters (2-4 letters) So I wrote: (setq recentf-exclude '( "/diary[0-9]\{4\}[a-zA-Z]\{2,4\}$" )) but without success, all the lines of my temp-diaries still appear in recentf. Probably I should start the regex with something different than "/", but I tried everything I could think of, e.g. "\\", "c:/Users/aw/AppData/Local/Temp/", without "$" at the end... As I'm running out of ideas, maybe you could give me a hint again. Regards, Alexander