all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Recent documents: Emacs and GNOME integration
Date: Sat, 13 May 2006 00:51:45 -0400	[thread overview]
Message-ID: <E1Fem6T-0002Ny-Pd@fencepost.gnu.org> (raw)
In-Reply-To: <1147396844.567992.55920@i40g2000cwc.googlegroups.com> (piotr.zielinski@gmail.com)

    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.

       reply	other threads:[~2006-05-13  4:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1147396844.567992.55920@i40g2000cwc.googlegroups.com>
2006-05-13  4:51 ` Richard Stallman [this message]
2006-05-17  7:50   ` Recent documents: Emacs and GNOME integration Mathias Dahl
2006-05-17 14:37     ` Piotr Zielinski
2006-05-17 18:50       ` Stuart D. Herring
2006-05-17 19:01         ` Stuart D. Herring
2006-05-17 23:12       ` Richard Stallman
2006-05-24 18:52         ` Kevin Rodgers
2006-05-25  0:37           ` Richard Stallman
2006-05-25 17:22             ` Bill Wohler
2006-05-26 18:54               ` Kevin Rodgers
2006-05-30 15:46                 ` Stuart D. Herring
     [not found]                   ` <20060530163850.34480.qmail@web51010.mail.yahoo.com>
2006-05-30 18:28                     ` Stuart D. Herring
     [not found]                       ` <20060530195948.37508.qmail@web51014.mail.yahoo.com>
2006-05-30 21:10                         ` Stuart D. Herring
2006-05-25 17:02           ` Stuart D. Herring
2006-05-17 20:08     ` Richard Stallman

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=E1Fem6T-0002Ny-Pd@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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.