all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: TheLonelyStar <nabble2@lonely-star.org>
To: Help-gnu-emacs@gnu.org
Subject: Re: Looking up and CALLING a key binding
Date: Tue, 6 Jan 2009 07:14:40 -0800 (PST)	[thread overview]
Message-ID: <21312291.post@talk.nabble.com> (raw)
In-Reply-To: <5e307aad-4ae3-4527-8fef-cee66fd9c2aa@o40g2000prn.googlegroups.com>


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 "{" and
"}".


Xah Lee-2 wrote:
> 
> On Jan 5, 6:00 am, TheLonelyStar <nabb...@lonely-star.org> 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
> 
> what exactly you want to do?
> 
> are you writing a elisp program? ... or you trying to do something in
> emacs?
> 
> once you know what command the binding is associated with, you can
> just call the command by typing Alt+x commandName.
> 
> 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.
> 
>   Xah
> ∑ http://xahlee.org/
> 
> ☄
> 
> 

-- 
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.





  reply	other threads:[~2009-01-06 15:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.4013.1231164018.26697.help-gnu-emacs@gnu.org>
2009-01-06  1:13 ` Looking up and CALLING a key binding Xah Lee
2009-01-06 15:14   ` TheLonelyStar [this message]
2009-01-06 15:20     ` Lennart Borgman
     [not found]   ` <mailman.4126.1231254888.26697.help-gnu-emacs@gnu.org>
2009-01-07 18:08     ` Xah Lee
2009-01-08 15:31       ` Kevin Rodgers
2009-01-06 14:56 ` OtherMichael
2009-01-05 14:00 TheLonelyStar
2009-01-06 14:22 ` Kevin Rodgers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21312291.post@talk.nabble.com \
    --to=nabble2@lonely-star.org \
    --cc=Help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.