From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: D. Goel Newsgroups: gmane.emacs.help Subject: Re: capturing commands Date: 17 Oct 2002 11:03:56 -0400 Organization: Posted via Supernews, http://www.supernews.com Sender: help-gnu-emacs-admin@gnu.org Message-ID: <87it015cpv.fsf@computer.localdomain> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1034957425 21556 80.91.224.249 (18 Oct 2002 16:10:25 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 18 Oct 2002 16:10:25 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 182Zhc-0005aZ-00 for ; Fri, 18 Oct 2002 18:10:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 182Zi3-0006Y0-00; Fri, 18 Oct 2002 12:10:47 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-X-Complaints-To: abuse@supernews.com Original-Lines: 24 Original-Xref: shelby.stanford.edu gnu.emacs.help:106148 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2678 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2678 > i would like to know if there was some way of capturing all commands > executed while running emacs whether they be M-x yank, C-x C-s or just > hitting the right arrow key I see from other posts that there seems no built-in way to do this in general (for both keystrokes and commands). so i wonder if anyone sees any problem with this sort of approach-- (defvar command-history-my nil) (add-hook 'post-command-hook '(lambda () (push this-command command-history-my))) this seems to work for me for both the cases... hmm..except i guess when a command explicitly overrides the value of this-command..