all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: sandipchitale@yahoo.com (Sandip Chitale)
Subject: Re: recentf.el and listing recently visited files
Date: 14 Mar 2003 16:43:04 -0800	[thread overview]
Message-ID: <b607d812.0303141643.761485a5@posting.google.com> (raw)
In-Reply-To: b4ta0u$t55$1@tilde.itg.ti.com

Javier,

I had hacked the recentf.el so that it takes into account
the file-name-history variable. Thus all files opened using
the find-file (and it's variants) also get added to the
recent files list.

My changes were top of the following version of recentf.el :

;; Author: David Ponce <david@dponce.com>
;; Created: July 19 1999
;; Keywords: customization

Here are the changed defuns:

(defun recentf-add-file (filename)
  "Add or move FILENAME at the beginning of `recentf-list'.
Does nothing if FILENAME matches one of the `recentf-exclude' regexps."
  (let ((filename (expand-file-name filename)))
    (when (recentf-include-p filename)
      (setq recentf-list (cons filename (delete filename recentf-list)))
      (setq file-name-history (cons filename (delete filename file-name-history)))
      (setq recentf-update-menu-p t))))
:
:
(defun recentf-find-file (filename)
  "Edit file FILENAME using `find-file'.
If FILENAME is not readable it is removed from `recentf-list'."
  (if (file-readable-p filename)
      (progn
	(find-file filename)
	(setq file-name-history (cons filename file-name-history))
	)
    (progn
      (message "File `%s' not found." filename)
      (setq recentf-list (delete filename recentf-list))
      (setq recentf-update-menu-p t))))
:
:
(defun recentf-add-file (filename)
  "Add or move FILENAME at the beginning of `recentf-list'.
Does nothing if FILENAME matches one of the `recentf-exclude' regexps."
  (let ((filename (expand-file-name filename)))
    (when (recentf-include-p filename)
      (setq recentf-list (cons filename (delete filename recentf-list)))
      (setq file-name-history (cons filename (delete filename file-name-history)))
      (setq recentf-update-menu-p t))))

HTH,
sandip

"Javier Oviedo" <email_joviedo@yahoo.com> wrote in message news:<b4ta0u$t55$1@tilde.itg.ti.com>...
> Hello all:
> 
> I really like recentf.el and use it quite frequently. I do however have a
> few questions:
> 1. Would it be possible to make entries timeout after some period of time?
> After a few days or something like that, the list would drop files.
> 
> 2. How does the recentf-list update? Is it possible to have recentf-list
> update whenever a new file is opened regardless of which emacs window it is
> opened in?
> 
> Example: I have one emacs window open. I then open a second emacs window for
> some temporary work. I would like the recentf-list to update and show the
> file(from second window) in the original window list. Is this possible?
> 
> 
> 
> Thanks In Advance.

  reply	other threads:[~2003-03-15  0:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-14 19:21 recentf.el and listing recently visited files Javier Oviedo
2003-03-15  0:43 ` Sandip Chitale [this message]
2003-03-17 15:26   ` Javier Oviedo
2003-03-17 16:40     ` Klaus Berndl
2003-03-17 16:50       ` Klaus Berndl
2003-03-17 17:52       ` Javier Oviedo
2003-03-17 20:25     ` Sandip Chitale
  -- strict thread matches above, loose matches on Subject: below --
2003-03-16 12:43 Hans Larsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b607d812.0303141643.761485a5@posting.google.com \
    --to=sandipchitale@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.