From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Matthias Newsgroups: gmane.emacs.help Subject: Re: Wait for a specific command call Date: 21 Nov 2004 08:35:37 +0100 Organization: !%$#%$#%!! Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1101022570 30694 80.91.229.6 (21 Nov 2004 07:36:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 21 Nov 2004 07:36:10 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 21 08:36:05 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CVmGS-0004cR-00 for ; Sun, 21 Nov 2004 08:36:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CVmPR-0003NJ-MN for geh-help-gnu-emacs@m.gmane.org; Sun, 21 Nov 2004 02:45:21 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.stueberl.de!teaser.fr!freenix!uvsq.fr!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 29 Original-NNTP-Posting-Host: fermat.math.uvsq.fr Original-X-Trace: io.uvsq.fr 1101022537 20937 193.51.32.1 (21 Nov 2004 07:35:37 GMT) Original-X-Complaints-To: Newsmaster@uvsq.fr Original-NNTP-Posting-Date: Sun, 21 Nov 2004 07:35:37 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-Xref: shelby.stanford.edu gnu.emacs.help:126781 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:22181 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:22181 Kai Grossjohann wrote: > (...) Why do you want to do this? I have (thanks to people posting in this newsgroup) a command (called `list-desktop-buffers') which displays names of buffers that will be saved by `desktop-save'. The list is displayed using `list-buffers', so that one can delete, save, etc any of those buffers. Now I want this list to be displayed when exiting emacs; the editor should also wait for a confirmation coming from the user. So, I need to add a modified version of my command to the list `kill-emacs-query-functions'. E.g. the following: (defun desktop-save-query-function () (list-desktop-buffers) (yes-or-no-p "Reopen displayed buffers in next session? ")) (add-to-list 'kill-emacs-query-functions 'desktop-save-query-function) But there I lost the hability to edit the list of buffers. In other words, my initial question was: how to make desktop-save-query-function select the *Buffer List* buffer and exit (returning true) when the user quit its window (by pressing the `q' key or using the mouse)? -- Matthias