* Possible to rebind C-m to a function? (like any other control key combo?) @ 2008-11-28 7:30 seberino 2008-11-28 9:42 ` Xend 2008-11-28 14:04 ` Xah Lee 0 siblings, 2 replies; 8+ messages in thread From: seberino @ 2008-11-28 7:30 UTC (permalink / raw) To: help-gnu-emacs There seems to be some special use for C-m as I cannot rebind it to a function of my choosing like start-kbd-macro. Is there anyway to make C-m into a "normal" combo I can bind like all the others? chris ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Possible to rebind C-m to a function? (like any other control key combo?) 2008-11-28 7:30 Possible to rebind C-m to a function? (like any other control key combo?) seberino @ 2008-11-28 9:42 ` Xend 2008-11-28 14:04 ` Xah Lee 1 sibling, 0 replies; 8+ messages in thread From: Xend @ 2008-11-28 9:42 UTC (permalink / raw) To: help-gnu-emacs On Nov 28, 3:30 pm, "seber...@spawar.navy.mil" <seber...@spawar.navy.mil> wrote: > There seems to be some special use for C-m as I cannot rebind it to a > function of my choosing like start-kbd-macro. > > Is there anyway to make C-m into a "normal" combo I can bind like all > the others? > > chris you can try "(global-set-key (kbd "C-m") function)"???? ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Possible to rebind C-m to a function? (like any other control key combo?) 2008-11-28 7:30 Possible to rebind C-m to a function? (like any other control key combo?) seberino 2008-11-28 9:42 ` Xend @ 2008-11-28 14:04 ` Xah Lee 2008-11-28 19:43 ` seberino 1 sibling, 1 reply; 8+ messages in thread From: Xah Lee @ 2008-11-28 14:04 UTC (permalink / raw) To: help-gnu-emacs On Nov 27, 11:30 pm, "seber...@spawar.navy.mil" <seber...@spawar.navy.mil> wrote: > There seems to be some special use for C-m as I cannot rebind it to a > function of my choosing like start-kbd-macro. > > Is there anyway to make C-m into a "normal" combo I can bind like all > the others? there are ways but that gets into pretty hairy emacs customization. Ctrl+m is same as Enter in emacs. Best to avoid rebinding it. Similar is Ctrl+i and Tab key. The reason it's like that is because emacs's history, namely the ascii. Note also, by default, starting/ending keyboard macro is F2 and F3. For a visual layout, see: • Emacs's Keybinding Layout http://xahlee.org/emacs/emacs_kb_shortcuts.html Xah ∑ http://xahlee.org/ ☄ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Possible to rebind C-m to a function? (like any other control key combo?) 2008-11-28 14:04 ` Xah Lee @ 2008-11-28 19:43 ` seberino 2008-11-28 20:18 ` Joost Diepenmaat ` (3 more replies) 0 siblings, 4 replies; 8+ messages in thread From: seberino @ 2008-11-28 19:43 UTC (permalink / raw) To: help-gnu-emacs On Nov 28, 6:04 am, Xah Lee <xah...@gmail.com> wrote: > On Nov 27, 11:30 pm, "seber...@spawar.navy.mil" > > <seber...@spawar.navy.mil> wrote: > > There seems to be some special use for C-m as I cannot rebind it to a > > function of my choosing like start-kbd-macro. > > > Is there anyway to make C-m into a "normal" combo I can bind like all > > the others? > > there are ways but that gets into pretty hairy emacs customization. > > Ctrl+m is same as Enter in emacs. Best to avoid rebinding it. > Similar is Ctrl+i and Tab key. Thanks. If someone had done the work already I'd still like to do it. Why? C-i is sooo natural for an insert function and C-m is sooo natural for a macro function. Chris ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Possible to rebind C-m to a function? (like any other control key combo?) 2008-11-28 19:43 ` seberino @ 2008-11-28 20:18 ` Joost Diepenmaat 2008-11-28 23:08 ` Andreas Politz ` (2 subsequent siblings) 3 siblings, 0 replies; 8+ messages in thread From: Joost Diepenmaat @ 2008-11-28 20:18 UTC (permalink / raw) To: help-gnu-emacs "seberino@spawar.navy.mil" <seberino@spawar.navy.mil> writes: > Thanks. If someone had done the work already I'd still like to do it. > Why? C-i is sooo natural for an insert function and C-m is sooo > natural for a macro function. I think Xah already alluded to the reasons: C-i is TAB in most terminals, and C-m is ENTER. -- Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Possible to rebind C-m to a function? (like any other control key combo?) 2008-11-28 19:43 ` seberino 2008-11-28 20:18 ` Joost Diepenmaat @ 2008-11-28 23:08 ` Andreas Politz 2008-11-29 18:31 ` Kevin Rodgers [not found] ` <mailman.1512.1227983509.26697.help-gnu-emacs@gnu.org> 3 siblings, 0 replies; 8+ messages in thread From: Andreas Politz @ 2008-11-28 23:08 UTC (permalink / raw) To: help-gnu-emacs seberino@spawar.navy.mil wrote: > On Nov 28, 6:04 am, Xah Lee <xah...@gmail.com> wrote: >> On Nov 27, 11:30 pm, "seber...@spawar.navy.mil" >> >> <seber...@spawar.navy.mil> wrote: >>> There seems to be some special use for C-m as I cannot rebind it to a >>> function of my choosing like start-kbd-macro. >>> Is there anyway to make C-m into a "normal" combo I can bind like all >>> the others? >> there are ways but that gets into pretty hairy emacs customization. >> >> Ctrl+m is same as Enter in emacs. Best to avoid rebinding it. >> Similar is Ctrl+i and Tab key. > > Thanks. If someone had done the work already I'd still like to do it. > Why? C-i is sooo natural for an insert function and C-m is sooo > natural for a macro function. > > Chris > You can do it, at least in a windowed emacs: (global-set-key [return] #'(lambda nil (interactive) (message "This is RETURN."))) (global-set-key [13] #'(lambda nil (interactive) (message "This is C-m."))) ;; undo (progn (global-unset-key [return]) (global-set-key [13] 'newline)) The problem, I think, is that most libraries end up binding C-m and not [return] (likewise for C-i and [tab]). So you have to always rebind after some mode has stolen the C-m key (to [return]). -ap ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Possible to rebind C-m to a function? (like any other control key combo?) 2008-11-28 19:43 ` seberino 2008-11-28 20:18 ` Joost Diepenmaat 2008-11-28 23:08 ` Andreas Politz @ 2008-11-29 18:31 ` Kevin Rodgers [not found] ` <mailman.1512.1227983509.26697.help-gnu-emacs@gnu.org> 3 siblings, 0 replies; 8+ messages in thread From: Kevin Rodgers @ 2008-11-29 18:31 UTC (permalink / raw) To: help-gnu-emacs seberino@spawar.navy.mil wrote: > Why? C-i is sooo natural for an insert function and C-m is sooo > natural for a macro function. `C-c i' and `C-c m' might be better: ,---- File: emacs, Node: Rebinding, Next: Init Rebinding, Prev: Minibuffer Maps, Up: Key Bindings | | The two-character keys consisting of `C-c' followed by a letter are | reserved for user customizations. Lisp programs are not supposed to | define these keys, so the bindings you make for them will be available | in all major modes and will never get in the way of anything. `---- -- Kevin Rodgers Denver, Colorado, USA ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <mailman.1512.1227983509.26697.help-gnu-emacs@gnu.org>]
* Re: Possible to rebind C-m to a function? (like any other control key combo?) [not found] ` <mailman.1512.1227983509.26697.help-gnu-emacs@gnu.org> @ 2008-11-29 20:39 ` Xah Lee 0 siblings, 0 replies; 8+ messages in thread From: Xah Lee @ 2008-11-29 20:39 UTC (permalink / raw) To: help-gnu-emacs On Nov 29, 10:31 am, Kevin Rodgers <kevin.d.rodg...@gmail.com> wrote: > seber...@spawar.navy.mil wrote: > > Why? C-i is sooo natural for an insert function and C-m is sooo > > natural for a macro function. > > `C-c i' and `C-c m' might be better: > > ,---- File: emacs, Node: Rebinding, Next: Init Rebinding, Prev: > Minibuffer Maps, Up: Key Bindings > | > | The two-character keys consisting of `C-c' followed by a letter are > | reserved for user customizations. Lisp programs are not supposed to > | define these keys, so the bindings you make for them will be available > | in all major modes and will never get in the way of anything. > `---- This, although being emacs's canon, but perhaps it is not a good thing to spread, because C-c is the modern standard for Coping text, used by Windows, Mac, Linux. Emacs 23 by default now supports text selection highlighting, although not CUA mode. Spreading C-c will make it more painful if emacs is to change on this in the future. just today i'm reaing about Google Chrome. http://en.wikipedia.org/wiki/Google_Chrome you can see that there are a lot innovations, which by definition means a lot of breaking “old ways”. Emacs is pretty much remained the old ways all the way back to 1980s. Some of the old ways are technically superior, but not all. Xah ∑ http://xahlee.org/ ☄ ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-11-29 20:39 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-11-28 7:30 Possible to rebind C-m to a function? (like any other control key combo?) seberino 2008-11-28 9:42 ` Xend 2008-11-28 14:04 ` Xah Lee 2008-11-28 19:43 ` seberino 2008-11-28 20:18 ` Joost Diepenmaat 2008-11-28 23:08 ` Andreas Politz 2008-11-29 18:31 ` Kevin Rodgers [not found] ` <mailman.1512.1227983509.26697.help-gnu-emacs@gnu.org> 2008-11-29 20:39 ` Xah Lee
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).