From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Denis Bueno" Newsgroups: gmane.emacs.help Subject: Re: most recent files Date: Thu, 26 Jul 2007 08:53:15 -0600 Message-ID: References: <1B2285D5-EDE6-4609-92A1-565479446534@mac.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1185461637 17306 80.91.229.12 (26 Jul 2007 14:53:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 26 Jul 2007 14:53:57 +0000 (UTC) To: "Frank Murray" , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 26 16:53:55 2007 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 1IE4ir-0005fD-UR for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Jul 2007 16:53:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IE4ir-0008TX-Kd for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Jul 2007 10:53:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IE4iS-0008OE-Ke for help-gnu-emacs@gnu.org; Thu, 26 Jul 2007 10:53:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IE4iR-0008Nf-Mh for help-gnu-emacs@gnu.org; Thu, 26 Jul 2007 10:53:24 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IE4iR-0008Nb-GZ for help-gnu-emacs@gnu.org; Thu, 26 Jul 2007 10:53:23 -0400 Original-Received: from mm04snlnto.sandia.gov ([132.175.109.21] helo=sentry.sandia.gov) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IE4iQ-0006Zs-PG for help-gnu-emacs@gnu.org; Thu, 26 Jul 2007 10:53:23 -0400 Original-Received: from [134.253.164.148] by sentry.sandia.gov with ESMTP (SMTP Relay 01 (Email Firewall v6.3.1)); Thu, 26 Jul 2007 08:53:15 -0600 X-Server-Uuid: 6CEB1540-FE13-491B-9872-FD67060ED864 Original-Received: from ES21SNLNT.srn.sandia.gov ([134.253.164.104]) by ES24SNLNT.srn.sandia.gov with Microsoft SMTPSVC(6.0.3790.3959); Thu, 26 Jul 2007 08:53:15 -0600 Original-Received: from 134.253.202.158 ([134.253.202.158]) by ES21SNLNT.srn.sandia.gov ([134.253.164.116]) with Microsoft Exchange Server HTTP-DAV ; Thu, 26 Jul 2007 14:53:15 +0000 User-Agent: Microsoft-Entourage/11.3.3.061214 Thread-Topic: most recent files Thread-Index: AcfPlLHk8KLs1DuHEdyLWwAX8tQlcQ== In-Reply-To: <1B2285D5-EDE6-4609-92A1-565479446534@mac.com> X-OriginalArrivalTime: 26 Jul 2007 14:53:15.0514 (UTC) FILETIME=[B232EDA0:01C7CF94] X-TMWD-Spam-Summary: TS=20070726145316; SEV=2.2.2; DFV=B2007072611; IFV=2.0.4,4.0-9; AIF=B2007072611; RPD=5.02.0125; ENG=IBF; RPDID=7374723D303030312E30413031303230372E34364138423535442E303030432C73733D312C6667733D30; CAT=NONE; CON=NONE X-MMS-Spam-Filter-ID: B2007072611_5.02.0125_4.0-9 X-WSS-ID: 6AB66AD11V81962806-01-01 X-detected-kernel: Windows 2000 SP4, XP SP1+ 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 Xref: news.gmane.org gmane.emacs.help:46093 Archived-At: On 07/25/2007 21:17, "Frank Murray" wrote: > Is there a way to access or bring up quickly the x most recent files > or programs you had just been working on, > i.e., x = 10, 15, 20, ..., etc.? Although recentf-mode sounds more like what you're thinking of, I thought I'd mention something I find more useful and faster: filecache. (see (info "(emacs)File Name Cache")). Filecache lets you complete the entire path to a file based solely on the filename. So if /path/to/foo/c/foo.c is in the cache, when you type C-x C-f foo. C-TAB -- the minibuffer will complete the path to /path/to/foo/c/foo.c no matter what your current directory is. Moreover, if there are multiple files of the same name, it shows you all the possibilities. To achieve something very similar to what you're looking for, I add files to the file cache as I visit and save them. This way any time I visit or save a file, I can kill the buffer and know that the file will be easy to access later with C-x C-f. In my .emacs: (require 'filecache) ;; Add files to the cache as I edit them. (defun file-cache-add-buffer-file () "Add the file name associated with the current buffer to the file cache." (let ((name (buffer-file-name))) (if (and name (file-exists-p name) (file-readable-p name)) (file-cache-add-file name)))) (add-hook 'find-file-hook 'file-cache-add-buffer-file) (add-hook 'after-save-hook 'file-cache-add-buffer-file) -Denis