From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Recent documents: Emacs and GNOME integration Date: Sat, 13 May 2006 00:51:45 -0400 Message-ID: References: <1147396844.567992.55920@i40g2000cwc.googlegroups.com> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1147495926 16061 80.91.229.2 (13 May 2006 04:52:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 13 May 2006 04:52:06 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 13 06:52:03 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Fem6i-0002k7-67 for ged-emacs-devel@m.gmane.org; Sat, 13 May 2006 06:52:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fem6h-0000zD-H9 for ged-emacs-devel@m.gmane.org; Sat, 13 May 2006 00:51:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fem6V-0000yN-6a for emacs-devel@gnu.org; Sat, 13 May 2006 00:51:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fem6U-0000yB-Lv for emacs-devel@gnu.org; Sat, 13 May 2006 00:51:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fem6U-0000y8-J4 for emacs-devel@gnu.org; Sat, 13 May 2006 00:51:46 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fem8N-0002LN-Kq for emacs-devel@gnu.org; Sat, 13 May 2006 00:53:43 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1Fem6T-0002Ny-Pd; Sat, 13 May 2006 00:51:45 -0400 Original-To: "Piotr Zielinski" In-reply-to: <1147396844.567992.55920@i40g2000cwc.googlegroups.com> (piotr.zielinski@gmail.com) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:54358 Archived-At: 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.