From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: david@adboyd.com (J. David Boyd) Newsgroups: gmane.emacs.help Subject: Re: How to find commands run by menu? Date: Wed, 09 Dec 2009 13:44:43 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1260384371 14043 80.91.229.12 (9 Dec 2009 18:46:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Dec 2009 18:46:11 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 09 19:46:04 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NIRY3-0006AQ-OH for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Dec 2009 19:46:04 +0100 Original-Received: from localhost ([127.0.0.1]:50425 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIRY3-0004Ow-LX for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Dec 2009 13:46:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NIRXK-0004BC-64 for help-gnu-emacs@gnu.org; Wed, 09 Dec 2009 13:45:18 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NIRXF-00047c-3O for help-gnu-emacs@gnu.org; Wed, 09 Dec 2009 13:45:17 -0500 Original-Received: from [199.232.76.173] (port=53850 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIRXE-00047Y-WA for help-gnu-emacs@gnu.org; Wed, 09 Dec 2009 13:45:13 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:42591) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NIRXE-0005wH-A4 for help-gnu-emacs@gnu.org; Wed, 09 Dec 2009 13:45:12 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1NIRXB-0005g0-6h for help-gnu-emacs@gnu.org; Wed, 09 Dec 2009 19:45:09 +0100 Original-Received: from 198.204.74.254 ([198.204.74.254]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Dec 2009 19:45:09 +0100 Original-Received: from david by 198.204.74.254 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Dec 2009 19:45:09 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 35 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 198.204.74.254 User-Agent: Gnus/5.1299999999999999 (Gnus v5.13) Emacs/23.1 (cygwin) Cancel-Lock: sha1:QTTt9qzGVF2FGl9JGu6GBrl/dWc= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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: news.gmane.org gmane.emacs.help:70533 Archived-At: kj writes: > Is there any way to determine the exact command that gets run when > one invokes a particular menu item? > > TIA! > > kynnjo > > P.S. Here's why I want this. It's a bit convoluted. For mysterious > reasons, the latest version of Emacs on my system does not offer > any "print region" commands when run in X11 mode (these commands > do show in the File menu, but are permanently disabled, irrespective > of whether a region is defined or not). > > I determined that if instead I run Emacs in text mode, now the > menus do offer the "print region" commands. > > But I don't want to run Emacs in text mode. Therefore, I want to > be able to execute *while on X11 mode* the same commands that get > triggered when I choose (in text mode) one of the "print region" > commands from the File menu. Make sense? > > I thought that the desired commands would be ones like ps-print-region, > but the ones I've guessed produce different-looking printed results > from those obtained by using the menus under text mode, and I prefer > the latter by far. Therefore, I have to conclude that using the > menus does something more than just calling, say, ps-print-region. C-h k, then place the mouse on the appropriate menu item. When I do C-h k, then work my way down to the 'Postscript Print Buffer' item, and release the mouse button, emacs tells me that the function is (ps-print-buffer-with-faces)