From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: TheLonelyStar Newsgroups: gmane.emacs.help Subject: Re: Looking up and CALLING a key binding Date: Tue, 6 Jan 2009 07:14:40 -0800 (PST) Message-ID: <21312291.post@talk.nabble.com> References: <21291485.post@talk.nabble.com> <5e307aad-4ae3-4527-8fef-cee66fd9c2aa@o40g2000prn.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1231254971 2614 80.91.229.12 (6 Jan 2009 15:16:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 Jan 2009 15:16: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 Tue Jan 06 16:17:21 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 1LKDft-0006RK-71 for geh-help-gnu-emacs@m.gmane.org; Tue, 06 Jan 2009 16:16:57 +0100 Original-Received: from localhost ([127.0.0.1]:53678 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LKDed-0002Yr-7i for geh-help-gnu-emacs@m.gmane.org; Tue, 06 Jan 2009 10:15:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LKDdm-0002Lc-9z for help-gnu-emacs@gnu.org; Tue, 06 Jan 2009 10:14:46 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LKDdl-0002L3-HF for Help-gnu-emacs@gnu.org; Tue, 06 Jan 2009 10:14:45 -0500 Original-Received: from [199.232.76.173] (port=51920 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LKDdk-0002Kg-J7 for Help-gnu-emacs@gnu.org; Tue, 06 Jan 2009 10:14:45 -0500 Original-Received: from kuber.nabble.com ([216.139.236.158]:54605) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LKDdk-0006cu-0x for Help-gnu-emacs@gnu.org; Tue, 06 Jan 2009 10:14:44 -0500 Original-Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1LKDdg-0006oh-UV for Help-gnu-emacs@gnu.org; Tue, 06 Jan 2009 07:14:40 -0800 In-Reply-To: <5e307aad-4ae3-4527-8fef-cee66fd9c2aa@o40g2000prn.googlegroups.com> X-Nabble-From: nabble2@lonely-star.org 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:61111 Archived-At: Hi, I need this for the following two things: 1. I want to bind a key (the tab key) to a special function which can fail. If the function fails, I want to call the original binding of the key (which is differerent depending on which mode I am in). 2. I want to bind a key to the insertion of a little code snippet. i.E. { -> to { | } But since in many modes the "{" and "}" keys are bound to some special function, I want to call these keybindings for the insertions of the "{" an= d "}". Xah Lee-2 wrote: >=20 > On Jan 5, 6:00=C2=A0am, TheLonelyStar wrote: >> Hi, >> >> I know very little elisp have basicly no practical expirience with it. >> >> I know I can lookup a keybinding with lookup-key and similiar. >> But how do I look it up and call it (execute it)? >> >> Thanks! >> nathan >=20 > what exactly you want to do? >=20 > are you writing a elisp program? ... or you trying to do something in > emacs? >=20 > once you know what command the binding is associated with, you can > just call the command by typing Alt+x commandName. >=20 > if you are writing elisp... once you get the command name, say it is > forward-word, then you can run it by just (forward-word) ... some > example of your case would be good to clarify. >=20 > Xah > =E2=88=91 http://xahlee.org/ >=20 > =E2=98=84 >=20 >=20 --=20 View this message in context: http://www.nabble.com/Looking-up-and-CALLING-= a-key-binding-tp21291485p21312291.html Sent from the Emacs - Help mailing list archive at Nabble.com.