From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Pascal J. Bourguignon" Newsgroups: gmane.emacs.help Subject: Re: Trouble binding Alt *by itself* to the execute-extended-command...(Alt-x and ESC-x work fine.) Date: Sun, 07 Jul 2013 00:16:46 +0200 Organization: Informatimago Message-ID: <877gh3wcz5.fsf@informatimago.com> References: <6a969c8d-e606-4143-afd1-83ee32c82aeb@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1373149042 24021 80.91.229.3 (6 Jul 2013 22:17:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Jul 2013 22:17:22 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 07 00:17:24 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UvanD-00033I-CN for geh-help-gnu-emacs@m.gmane.org; Sun, 07 Jul 2013 00:17:23 +0200 Original-Received: from localhost ([::1]:37716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvanC-0001Ao-UB for geh-help-gnu-emacs@m.gmane.org; Sat, 06 Jul 2013 18:17:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uvan3-0001Ai-5b for help-gnu-emacs@gnu.org; Sat, 06 Jul 2013 18:17:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uvan1-0006LT-Sk for help-gnu-emacs@gnu.org; Sat, 06 Jul 2013 18:17:13 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:33112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uvan1-0006LP-Ld for help-gnu-emacs@gnu.org; Sat, 06 Jul 2013 18:17:11 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Uvamy-0002mu-OT for help-gnu-emacs@gnu.org; Sun, 07 Jul 2013 00:17:08 +0200 Original-Received: from amontsouris-651-1-8-101.w90-46.abo.wanadoo.fr ([90.46.43.101]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 07 Jul 2013 00:17:08 +0200 Original-Received: from pjb by amontsouris-651-1-8-101.w90-46.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 07 Jul 2013 00:17:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 34 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: amontsouris-651-1-8-101.w90-46.abo.wanadoo.fr Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:ZTcxMDQxZGQzNTkzMzIxZTZiOWVjY2RkYWE1MDgxNzg5NDM2NmIwMw== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:91991 Archived-At: Chris Seberino writes: > Alt-x invokes the execute-extended-command just fine. Did you do something special? Because in my emacs, A-x doesn't invoke execut-extended-command. I have to type M-x to get that. > I'd like the Alt key *by itself* to this command. > > I'm on Ubuntu 12.04. I've read a few docs on X Windows, xmodmap, xev, > Ubuntu Unity 3D but *still* can't seem to make this work. You can find interesting keysyms in /usr/include/X11/keysymdef.h You can use xmodmap to bind keycodes to the keysyms you want. And you can use global-set-key to bind keysyms to the functions you want. To replace the keysym Alt_L and Alt_R by Execute you can evaluate: (shell-command "for code in $(xmodmap -pke|awk '/= Alt/{print $2}') ; do xmodmap -e 'keycode 133 = Execute' ; done") There is already a binding from the Execute keysym to execute-extended-command in emacs-version "24.2.1" If not, you can bind it with: (global-set-key (kbd "") 'execute-extended-command) -- __Pascal Bourguignon__ http://www.informatimago.com/ A bad day in () is better than a good day in {}. You know you've been lisping too long when you see a recent picture of George Lucas and think "Wait, I thought John McCarthy was dead!" -- Dalek_Baldwin