From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "B. T. Raven" Newsgroups: gmane.emacs.help Subject: Re: recentf exclude question Date: Thu, 10 Sep 2009 12:39:42 -0500 Message-ID: References: <_Kmdna1L97JMhjXXnZ2dnUVZ_jqdnZ2d@sysmatrix.net> <5YqdnQ4NdMGpzDXXnZ2dnUVZ_sSdnZ2d@sysmatrix.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1252604648 22616 80.91.229.12 (10 Sep 2009 17:44:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Sep 2009 17:44:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 10 19:44:01 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mlngf-00014l-En for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Sep 2009 19:44:01 +0200 Original-Received: from localhost ([127.0.0.1]:37829 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mlnge-0003vV-Sl for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Sep 2009 13:44:00 -0400 Original-Path: news.stanford.edu!usenet.stanford.edu!news.glorb.com!news2.glorb.com!nx01.iad01.newshosting.com!209.197.12.246.MISMATCH!nx02.iad01.newshosting.com!newshosting.com!216.196.98.140.MISMATCH!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.posted.cpinternet!news.posted.cpinternet.POSTED!not-for-mail Original-NNTP-Posting-Date: Thu, 10 Sep 2009 12:39:36 -0500 User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) Original-Newsgroups: gnu.emacs.help In-Reply-To: X-No-Archive: yes Original-Lines: 59 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 64.61.220.17 Original-X-Trace: sv3-oFBLrDSXUfb49i5u3L7d4boAgnOkXFsIJ8S1PcIFtx9y+t1gYiBSr6b9Ot4M1HbkG/zigq7ilEWZjdi!LgL0hPjvYsimUMvfbQqVjmqBn1CZO9CnUTe+nro2dEHal1JXYFB5rF5cLLquq2RnSbzwcV0dLE5G!h22pObUhf4rdAD4Egw== Original-X-Complaints-To: abuse@cpinternet.com X-DMCA-Complaints-To: abuse@cpinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 Original-Xref: news.stanford.edu gnu.emacs.help:172901 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-Gmane-Expiry: 2009-09-24 Xref: news.gmane.org gmane.emacs.help:68033 Archived-At: Andreas Politz wrote: > "B. T. Raven" writes: > >> Andreas Politz wrote: >>> "B. T. Raven" 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 Thanks, Peter and Andreas. This expression filters out what I want to ignore: (setq recentf-exclude nil recentf-keep '("\\.t\\(ex\\|xt\\)\\'" "\\.emacs\\'")) If I do this through Custom I guess I don't need (and can't use the bar expression) the escape mechanism to prevent inappropriate interpretation by the lisp reader. Do I just set recentf-exclude to nil and use the three strings ".txt" ".tex" and ".emacs" in Customize or can the same regexps in the setq be used there too? Ed