* recentf.el and listing recently visited files
@ 2003-03-14 19:21 Javier Oviedo
2003-03-15 0:43 ` Sandip Chitale
0 siblings, 1 reply; 8+ messages in thread
From: Javier Oviedo @ 2003-03-14 19:21 UTC (permalink / raw)
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: recentf.el and listing recently visited files
2003-03-14 19:21 recentf.el and listing recently visited files Javier Oviedo
@ 2003-03-15 0:43 ` Sandip Chitale
2003-03-17 15:26 ` Javier Oviedo
0 siblings, 1 reply; 8+ messages in thread
From: Sandip Chitale @ 2003-03-15 0:43 UTC (permalink / raw)
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: recentf.el and listing recently visited files
@ 2003-03-16 12:43 Hans Larsen
0 siblings, 0 replies; 8+ messages in thread
From: Hans Larsen @ 2003-03-16 12:43 UTC (permalink / raw)
Hi,
I replaced recentf.el by session.el long time ago.
Cheers
-Hans
Date: Fri, 14 Mar 2003 14:21:20 -0500
From: "Javier Oviedo" <email_joviedo@yahoo.com>
To: help-gnu-emacs@gnu.org
Subject: recentf.el and listing recently visited files
Message-ID: <b4ta0u$t55$1@tilde.itg.ti.com>
Precedence: list
Message: 8
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: recentf.el and listing recently visited files
2003-03-15 0:43 ` Sandip Chitale
@ 2003-03-17 15:26 ` Javier Oviedo
2003-03-17 16:40 ` Klaus Berndl
2003-03-17 20:25 ` Sandip Chitale
0 siblings, 2 replies; 8+ messages in thread
From: Javier Oviedo @ 2003-03-17 15:26 UTC (permalink / raw)
Sandip,
Thanks for your reply. I tried your functions but they don't seem handle the
cases that I want covered.
What I have noticed is that when I close emacs, the recentf-list
updates....the list gets written. I noticed a undesirable behavior with
this. Let say that I have two emacs session open. In one I open foo.c and in
the other I open bar.c (both happen to be in the same directory). When I
close the session with foo.c I then see foo.c added to the recentf-list. I
then close the second session with bar.c and I see bar.c written to the list
but I no longer see foo.c. It seems to have been deleted from the list.
First, I think that once a file is written, it should be saved. Is it
possible to have the list update as soon as any file is opened in any emacs
window? Once the list has updated, any emacs window should be able to now
see the new recently visited file.
Do you functions handle this case?
Thanks for your help.
"Sandip Chitale" <sandipchitale@yahoo.com> wrote in message
news:b607d812.0303141643.761485a5@posting.google.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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: recentf.el and listing recently visited files
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
1 sibling, 2 replies; 8+ messages in thread
From: Klaus Berndl @ 2003-03-17 16:40 UTC (permalink / raw)
On Mon, 17 Mar 2003, Javier Oviedo wrote:
> Sandip,
>
> Thanks for your reply. I tried your functions but they don't seem handle
> the cases that I want covered.
>
> What I have noticed is that when I close emacs, the recentf-list
> updates....the list gets written. I noticed a undesirable behavior with
> this. Let say that I have two emacs session open. In one I open foo.c and
> in the other I open bar.c (both happen to be in the same directory). When I
> close the session with foo.c I then see foo.c added to the recentf-list. I
> then close the second session with bar.c and I see bar.c written to the
> list but I no longer see foo.c. It seems to have been deleted from the
> list.
>
> First, I think that once a file is written, it should be saved. Is it
> possible to have the list update as soon as any file is opened in any emacs
> window? Once the list has updated, any emacs window should be able to now
> see the new recently visited file.
Yes, recentf.el works not well in scenarios where more than one Emacs-instance
is opened - in such a scenario always that one "wins" (means overwrites the
recentf-file) which is closed at last.
recentf.el is designed to work well with one emacs-instance - IMHO a scenario
which you should follow. IMHO there are not really many reasons why to use
more than one Emacs instance because you can use several frames and for
command-line using you can use gnuclient etc....
To handle a recent-file-list correct with more than one independent
Emacs-instances could be done as follows:
After every new file opening this must be written down to the file and every
emacs-instance has to react to this event - could be done maybe with the
mechanisms of auto-revert-mode....in general it seems to so easy...
BTW: I suppose that you meant in your first posting not "Emacs windows" but
"Emacs instances", right?!
Klaus
> Do you functions handle this case?
>
> Thanks for your help.
>
>
> "Sandip Chitale" <sandipchitale@yahoo.com> wrote in message
> news:b607d812.0303141643.761485a5@posting.google.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.
--
Klaus Berndl mailto: klaus.berndl@sdm.de
sd&m AG http://www.sdm.de
software design & management
Thomas-Dehler-Str. 27, 81737 München, Germany
Tel +49 89 63812-392, Fax -220
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: recentf.el and listing recently visited files
2003-03-17 16:40 ` Klaus Berndl
@ 2003-03-17 16:50 ` Klaus Berndl
2003-03-17 17:52 ` Javier Oviedo
1 sibling, 0 replies; 8+ messages in thread
From: Klaus Berndl @ 2003-03-17 16:50 UTC (permalink / raw)
On 17 Mar 2003, Klaus Berndl wrote:
> On Mon, 17 Mar 2003, Javier Oviedo wrote:
>
> > Sandip,
> >
> > Thanks for your reply. I tried your functions but they don't seem handle
> > the cases that I want covered.
> >
> > What I have noticed is that when I close emacs, the recentf-list
> > updates....the list gets written. I noticed a undesirable behavior with
> > this. Let say that I have two emacs session open. In one I open foo.c and
> > in the other I open bar.c (both happen to be in the same directory). When
> > I close the session with foo.c I then see foo.c added to the
> > recentf-list. I then close the second session with bar.c and I see bar.c
> > written to the list but I no longer see foo.c. It seems to have been
> > deleted from the list.
> >
> > First, I think that once a file is written, it should be saved. Is it
> > possible to have the list update as soon as any file is opened in any
> > emacs window? Once the list has updated, any emacs window should be able
> > to now see the new recently visited file.
>
> Yes, recentf.el works not well in scenarios where more than one
> Emacs-instance is opened - in such a scenario always that one "wins" (means
> overwrites the recentf-file) which is closed at last.
>
> recentf.el is designed to work well with one emacs-instance - IMHO a
> scenario which you should follow. IMHO there are not really many reasons
> why to use more than one Emacs instance because you can use several frames
> and for command-line using you can use gnuclient etc....
>
> To handle a recent-file-list correct with more than one independent
> Emacs-instances could be done as follows: After every new file opening this
> must be written down to the file and every emacs-instance has to react to
> this event - could be done maybe with the mechanisms of
> auto-revert-mode....in general it seems to so easy...
^^
I meant NOT
>
> BTW: I suppose that you meant in your first posting not "Emacs windows" but
> "Emacs instances", right?!
>
> Klaus
>
> > Do you functions handle this case?
> >
> > Thanks for your help.
> >
> >
> > "Sandip Chitale" <sandipchitale@yahoo.com> wrote in message
> > news:b607d812.0303141643.761485a5@posting.google.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.
--
Klaus Berndl mailto: klaus.berndl@sdm.de
sd&m AG http://www.sdm.de
software design & management
Thomas-Dehler-Str. 27, 81737 München, Germany
Tel +49 89 63812-392, Fax -220
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: recentf.el and listing recently visited files
2003-03-17 16:40 ` Klaus Berndl
2003-03-17 16:50 ` Klaus Berndl
@ 2003-03-17 17:52 ` Javier Oviedo
1 sibling, 0 replies; 8+ messages in thread
From: Javier Oviedo @ 2003-03-17 17:52 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 5507 bytes --]
Klaus,
Yes, I meant instances...thanks for the correction. I think that I will
follow your advice.
"Klaus Berndl" <klaus.berndl@sdm.de> wrote in message
news:ud6kqrlos.fsf@sdm.de...
> On Mon, 17 Mar 2003, Javier Oviedo wrote:
>
> > Sandip,
> >
> > Thanks for your reply. I tried your functions but they don't seem
handle
> > the cases that I want covered.
> >
> > What I have noticed is that when I close emacs, the recentf-list
> > updates....the list gets written. I noticed a undesirable behavior with
> > this. Let say that I have two emacs session open. In one I open foo.c
and
> > in the other I open bar.c (both happen to be in the same directory).
When I
> > close the session with foo.c I then see foo.c added to the
recentf-list. I
> > then close the second session with bar.c and I see bar.c written to the
> > list but I no longer see foo.c. It seems to have been deleted from the
> > list.
> >
> > First, I think that once a file is written, it should be saved. Is it
> > possible to have the list update as soon as any file is opened in any
emacs
> > window? Once the list has updated, any emacs window should be able to
now
> > see the new recently visited file.
>
> Yes, recentf.el works not well in scenarios where more than one
Emacs-instance
> is opened - in such a scenario always that one "wins" (means overwrites
the
> recentf-file) which is closed at last.
>
> recentf.el is designed to work well with one emacs-instance - IMHO a
scenario
> which you should follow. IMHO there are not really many reasons why to use
> more than one Emacs instance because you can use several frames and for
> command-line using you can use gnuclient etc....
>
> To handle a recent-file-list correct with more than one independent
> Emacs-instances could be done as follows:
> After every new file opening this must be written down to the file and
every
> emacs-instance has to react to this event - could be done maybe with the
> mechanisms of auto-revert-mode....in general it seems to so easy...
>
> BTW: I suppose that you meant in your first posting not "Emacs windows"
but
> "Emacs instances", right?!
>
> Klaus
>
> > Do you functions handle this case?
> >
> > Thanks for your help.
> >
> >
> > "Sandip Chitale" <sandipchitale@yahoo.com> wrote in message
> > news:b607d812.0303141643.761485a5@posting.google.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.
>
> --
> Klaus Berndl mailto: klaus.berndl@sdm.de
> sd&m AG http://www.sdm.de
> software design & management
> Thomas-Dehler-Str. 27, 81737 München, Germany
> Tel +49 89 63812-392, Fax -220
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: recentf.el and listing recently visited files
2003-03-17 15:26 ` Javier Oviedo
2003-03-17 16:40 ` Klaus Berndl
@ 2003-03-17 20:25 ` Sandip Chitale
1 sibling, 0 replies; 8+ messages in thread
From: Sandip Chitale @ 2003-03-17 20:25 UTC (permalink / raw)
Oh...I see. What you want is synchronization of
changes to the recentf-save-file.
No, my functions do not do that.
What you want may be slightly more difficult.
I do not know if emacs has an efficient mechanism
(i.e. not based on polling) to monitor changes to files on disk.
One approach may be:
1. Before showing the entries to the user the recentf package could
check the timestamp of the recentf-save-file. If
it is later than the time it was last read it could reread the file.
2. Similarly Before writing out the entries to the recentf-save-file
the entries of the current session should be merged with what is
on the disk.
-sandip
"Javier Oviedo" <email_joviedo@yahoo.com> wrote in message news:<b54pbl$e61$1@tilde.itg.ti.com>...
> Sandip,
>
> Thanks for your reply. I tried your functions but they don't seem handle the
> cases that I want covered.
>
> What I have noticed is that when I close emacs, the recentf-list
> updates....the list gets written. I noticed a undesirable behavior with
> this. Let say that I have two emacs session open. In one I open foo.c and in
> the other I open bar.c (both happen to be in the same directory). When I
> close the session with foo.c I then see foo.c added to the recentf-list. I
> then close the second session with bar.c and I see bar.c written to the list
> but I no longer see foo.c. It seems to have been deleted from the list.
>
> First, I think that once a file is written, it should be saved. Is it
> possible to have the list update as soon as any file is opened in any emacs
> window? Once the list has updated, any emacs window should be able to now
> see the new recently visited file.
>
> Do you functions handle this case?
>
> Thanks for your help.
>
>
> "Sandip Chitale" <sandipchitale@yahoo.com> wrote in message
> news:b607d812.0303141643.761485a5@posting.google.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.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-03-17 20:25 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-14 19:21 recentf.el and listing recently visited files Javier Oviedo
2003-03-15 0:43 ` Sandip Chitale
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
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.