From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: [Fwd: getting the "real" command in the `pre-command-hook'?!] Date: Fri, 30 Jan 2004 14:19:46 -0700 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <401ACA72.3030802@yahoo.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000908030801050703000808" X-Trace: sea.gmane.org 1075497683 6166 80.91.224.253 (30 Jan 2004 21:21:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 30 Jan 2004 21:21:23 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 30 22:21:15 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Amg4c-0003en-00 for ; Fri, 30 Jan 2004 22:21:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Amg3l-0005Ah-TX for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Jan 2004 16:20:17 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Amg3i-0005AO-KE for bug-gnu-emacs@prep.ai.mit.edu; Fri, 30 Jan 2004 16:20:14 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Amg3C-0004yA-NR for bug-gnu-emacs@prep.ai.mit.edu; Fri, 30 Jan 2004 16:20:13 -0500 Original-Received: from [130.59.10.2] (helo=chx400.switch.ch) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1Amg3C-0004xe-BD for bug-gnu-emacs@prep.ai.mit.edu; Fri, 30 Jan 2004 16:19:42 -0500 Original-Received: from mail.fu-berlin.de ([160.45.11.165]) by chx400.switch.ch with esmtp (Exim 3.20 #1) id 1Amg3A-0002WE-00 for gnu-emacs-bug@moderators.isc.org; Fri, 30 Jan 2004 22:19:40 +0100 Original-Received: by mail.fu-berlin.de (Smail3.2.0.98) from Curry.ZEDAT.FU-Berlin.DE (160.45.10.36) with esmtp id ; Fri, 30 Jan 2004 22:19:40 +0100 (MET) Original-Received: by Curry.ZEDAT.FU-Berlin.DE (Smail3.2.0.98) from news.fu-berlin.de with bsmtp id ; Fri, 30 Jan 2004 22:19:39 +0100 (MET) Original-To: gnu-emacs-bug@moderators.isc.org Original-Path: 170.207.51.80!not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 86 X-Orig-NNTP-Posting-Host: 170.207.51.80 X-Orig-X-Trace: news.uni-berlin.de 1075497579 28857283 170.207.51.80 ([82742]) User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:6831 This is a multi-part message in MIME format. --------------000908030801050703000808 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit I think this is a bug. In GNU Emacs 21.3.1 (i386-pc-solaris2.7, X toolkit), I did this in the *scratch* buffer: (add-hook 'pre-command-hook (lambda () (message "pre-command-hook: %s, %s" last-command this-command))) And then typed: M-x list-buffers RET C-x b Which generated this in the *Messages* buffer: pre-command-hook: eval-print-last-sexp, execute-extended-command pre-command-hook: execute-extended-command, self-insert-command pre-command-hook: self-insert-command, self-insert-command [11 times] pre-command-hook: self-insert-command, minibuffer-complete-and-exit pre-command-hook: list-buffers, switch-to-buffer Note that there is no "minibuffer-complete-and-exit, list-buffers" entry. Fexecute_extended_command sets Vthis_command (but not Vlast_command) before calling the Lisp function (list-buffers in this example) via Fcommand_execute, but neither one of them runs the pre-command-hook (or post-command-hook) Lisp functions. -- Kevin Rodgers --------------000908030801050703000808 Content-Type: message/rfc822; name="getting the "real" command in the `pre-command-hook'?!" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="getting the "real" command in the `pre-command-hook'?!" Path: uni-berlin.de!fu-berlin.de!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsoutpeer00.lnd.ops.eu.uu..net!lnewsinpeer01.lnd.ops.eu.uu.net!emea.uu.net!news.sdm.de!not-for-mail From: Klaus Berndl Newsgroups: gnu.emacs.help Subject: getting the "real" command in the `pre-command-hook'?! Date: 29 Jan 2004 09:53:14 +0100 Organization: "sd&m AG, Muenchen, Germany" Sender: berndl@SACHRANG Message-ID: NNTP-Posting-Host: sachrang.muc.sdm.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.sdm.de 1075366393 23434 193.102.181.40 (29 Jan 2004 08:53:13 GMT) X-Complaints-To: usenet@news.sdm.de NNTP-Posting-Date: Thu, 29 Jan 2004 08:53:13 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Xref: uni-berlin.de gnu.emacs.help:129468 Hi, Regardless which interactive command XXX i call via M-x XXX RET i always get `minibuffer-complete-and-exit' as content of `this-command' in the `pre-command-hook' direct before running XXX. Sure, this is not against the documentation of `this-command' but now I'm wondering how can i get the name "XXX" in the `pre-command-hook' direct before XXX runs? Seems that `this-command' is not what i need ;-) With other words: I need the symbol-name of the current running command in the `pre-command-hook' and i need the REAL command not the minibuffer-exiting-command! Thanks a lot in advance for any help, Klaus -- Klaus Berndl mailto: klaus.berndl@sdm.de sd&m AG http://www.sdm.de software design & management Carl-Wery-Str. 42, 81739 Muenchen, Germany Tel +49 89 63812-392, Fax -220 --------------000908030801050703000808 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bug-gnu-emacs mailing list Bug-gnu-emacs@gnu.org http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs --------------000908030801050703000808--