all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Key binding
@ 2002-11-24 21:22 Florian Lindner
  2002-11-25  9:48 ` Kai Großjohann
  0 siblings, 1 reply; 21+ messages in thread
From: Florian Lindner @ 2002-11-24 21:22 UTC (permalink / raw)


Hi!
I try to bind the shell-command function to the C-c v key (in pascal-mode)
The command should execute a file after compilation.

(define-key pascal-mode-map "\C-c\v" '(shell-command 
(file-name-sans-extension (buffer-file-name))))

But this somehow don't work...
Thx,
Florian

^ permalink raw reply	[flat|nested] 21+ messages in thread
* key binding
@ 2003-11-27  5:35 Jason
  2003-11-27  6:52 ` Eli Zaretskii
       [not found] ` <mailman.699.1069919563.399.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 21+ messages in thread
From: Jason @ 2003-11-27  5:35 UTC (permalink / raw)


How to bind f5 to debug command(e.g gdb) and f7 to compile command(e.g
compile)?
Thanks.
                        Jason

^ permalink raw reply	[flat|nested] 21+ messages in thread
* key binding
@ 2014-02-04 22:18 Mickey Ferguson
  2014-02-05  1:53 ` Stefan Monnier
  0 siblings, 1 reply; 21+ messages in thread
From: Mickey Ferguson @ 2014-02-04 22:18 UTC (permalink / raw)
  To: Emacs Help (help-gnu-emacs@gnu.org)

I want to bind the key sequence Esc-F3 (or Alt-F3) to the function I have defined that will compare windows, ignoring whitespace.  The lambda that I've defined works fine.  I found the following lisp line of code that will make this key mapping:

(global-set-key (kbd "<escape><f3>") (lambda () (interactive)
                                       (compare-windows t)))

Unfortunately, it has the side effect of killing the other Esc-<something> types of commands.  For example, I frequently use Esc-> and Esc-< to move to the end of beginning of a buffer, and they no longer work.  I've confirmed that this one line is the culprit by commenting out the command, keeping the rest of my initialization intact, and all is well.  So can anyone else suggest how I can safely map the Esc-F3 (Alt-F3) key combination?  Replies to Mickey (dot) Ferguson (at) CassidianCommunications (dot) com.



^ permalink raw reply	[flat|nested] 21+ messages in thread
* RE: key binding
@ 2014-02-05 20:12 Mickey Ferguson
  0 siblings, 0 replies; 21+ messages in thread
From: Mickey Ferguson @ 2014-02-05 20:12 UTC (permalink / raw)
  To: Emacs Help (help-gnu-emacs@gnu.org)

Stefan Monnier wrote:

>Post by Mickey Ferguson
>(global-set-key (kbd "<escape><f3>") (lambda () (interactive)
>(compare-windows t)))

>Try
>(global-set-key [M-f3] (lambda () (interactive) (compare-windows t)))
>or
>(global-set-key [?\e f3] (lambda () (interactive) (compare-windows t)))

>The problem with your binding is that it uses the `escape' event.
>This event is normally unbound and turned (via function-key-map) into an
>ESC event (the "ASCII char 27 known as 'escape'") to which lots of
>things are bound. This mapping is because ESC is what is received in
>a text terminal when you press the `escape' key, so some code somewhere
>needs to "unify" the ESC char (from the tty) and the `escape' event
>(from the GUI library).

Thanks, Stefan.  The latter suggestion worked.  And since my problem is
now solved, I'm happy!  :-)  And thanks also for the great explanation of
what was wrong with my original attempt.  A lot of stuff I didn't know.



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2014-02-05 20:12 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-24 21:22 Key binding Florian Lindner
2002-11-25  9:48 ` Kai Großjohann
2002-11-25 17:18   ` Florian Lindner
2002-11-25 17:47     ` Kai Großjohann
2002-11-25 21:48       ` Florian Lindner
2002-11-25 17:51     ` Kevin Rodgers
2002-11-25 21:49       ` Florian Lindner
2002-11-25 22:51         ` Kevin Rodgers
2002-11-25 23:04           ` fabrice bauzac
2002-11-26 16:25           ` Florian Lindner
2002-11-26 16:32             ` Kester Clegg
2002-11-26 17:45               ` Kai Großjohann
  -- strict thread matches above, loose matches on Subject: below --
2003-11-27  5:35 key binding Jason
2003-11-27  6:52 ` Eli Zaretskii
     [not found] ` <mailman.699.1069919563.399.help-gnu-emacs@gnu.org>
2003-11-27  7:43   ` Jason
2003-11-27 14:23     ` Eli Zaretskii
     [not found]     ` <mailman.726.1069946597.399.help-gnu-emacs@gnu.org>
2003-11-28  0:27       ` Jason
2003-11-28  3:53   ` leo
2014-02-04 22:18 Mickey Ferguson
2014-02-05  1:53 ` Stefan Monnier
2014-02-05 20:12 Mickey Ferguson

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.