[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Recent documents: Emacs and GNOME integration
From: |
Richard Stallman |
Subject: |
Re: Recent documents: Emacs and GNOME integration |
Date: |
Sat, 13 May 2006 00:51:45 -0400 |
I'm not sure whether this has been already done, but here's a short
piece of elisp that adds every file open in emacs to the system-wide
list of recently used files. It will work for systems using Recent File
Storage Specification [1], such as GNOME [2]. Hopefully, GNOME Deskbar
Applet [3] will soon be able to use that list, giving you something
close to a system-wide equivalent of the excellent iswitchb mode [4].
(defun local-add-file-to-recent ()
(when buffer-file-name
(start-process "addtorecent.py" nil "addtorecent.py"
(concat "file://" buffer-file-name)
"text/plain")))
(add-hook 'find-file-hook 'local-add-file-to-recent)
That is quite clear and simple. But we would like to make it work
totally automatically, which means, Emacs needs to decide automatically
whether to do this or not.
How should Emacs decide that?
Would testing the existence of the executable addtorecent.py
in PATH be the right criterion?
Is there an Emacs package for xml manipulation (adding new nodes,
etc.)?
Recently-used.el [7] works in the opposite direction: it makes the
system-wide list of recently used files available to Emacs.
That could be a superior method, esp. if it allows Emacs to easily
determine whether this list exists on your machine. I expect it to
be more efficient also, but maybe addtorecent.py is fast enough.
- Re: Recent documents: Emacs and GNOME integration,
Richard Stallman <=
- Re: Recent documents: Emacs and GNOME integration, Mathias Dahl, 2006/05/17
- Re: Recent documents: Emacs and GNOME integration, Piotr Zielinski, 2006/05/17
- Re: Recent documents: Emacs and GNOME integration, Richard Stallman, 2006/05/17
- Re: Recent documents: Emacs and GNOME integration, Kevin Rodgers, 2006/05/24
- Re: Recent documents: Emacs and GNOME integration, Richard Stallman, 2006/05/24
- Re: Recent documents: Emacs and GNOME integration, Bill Wohler, 2006/05/25
- Re: Recent documents: Emacs and GNOME integration, Kevin Rodgers, 2006/05/26
- Re: Recent documents: Emacs and GNOME integration, Stuart D. Herring, 2006/05/30