GNU bug report logs -
#8551
making Emacs remember a key binding to 'other-window
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8551 in the body.
You can then email your comments to 8551 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8551
; Package
emacs
.
(Mon, 25 Apr 2011 17:42:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Kevin Michael Simonson <simonsonkm <at> familysearch.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 25 Apr 2011 17:42:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I am often running Emacs with multiple windows. In my opinion the "C-x o" key-combination is too cumbersome, and I never use the "open-line" function "C-o" is bound to, so I'm always using "global-set-key" to bind "C-o" to "other-window". How can I put that key binding in my ".emacs" file so that this key binding is remembered and I don't have to keep executing "global-set-key" manually?
Kevin Simonson
NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
[Message part 2 (text/html, inline)]
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8551
; Package
emacs
.
(Mon, 25 Apr 2011 18:51:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 8551 <at> debbugs.gnu.org (full text, mbox):
> I am often running Emacs with multiple windows. In my opinion
> the "C-x o" key-combination is too cumbersome, and I never use
> the "open-line" function "C-o" is bound to, so I'm always using
> "global-set-key" to bind "C-o" to "other-window". How can I put
> that key binding in my ".emacs" file so that this key binding is
> remembered and I don't have to keep executing "global-set-key"
> manually? Kevin Simonson
A couple of administrative things, FYI:
* The best mailing list for questions like this is
`help-gnu-emacs <at> gnu.org' (cc'd).
* Please use plain-text, not HTML formatting, when sending mail
to either the bug list or the help list.
---
Wrt your question, here's what I would suggest:
In Emacs 22+, where (fboundp 'command-remapping) is non-nil:
(global-set-key [remap open-line] 'other-window)
In Emacs before 22 (no command remapping):
(substitute-key-definition 'open-line 'other-window global-map)
Reply sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
You have taken responsibility.
(Mon, 25 Apr 2011 19:40:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Kevin Michael Simonson <simonsonkm <at> familysearch.org>
:
bug acknowledged by developer.
(Mon, 25 Apr 2011 19:40:03 GMT)
Full text and
rfc822 format available.
Message #13 received at 8551-done <at> debbugs.gnu.org (full text, mbox):
> I am often running Emacs with multiple windows. In my opinion the "C-x o"
> key-combination is too cumbersome, and I never use the "open-line" function
> "C-o" is bound to, so I'm always using "global-set-key" to bind "C-o" to
> "other-window". How can I put that key binding in my ".emacs" file so that
> this key binding is remembered and I don't have to keep executing
> "global-set-key" manually?
I'd recommend you post such questions to gnu.emacs.help, since it's
neither a bug report, nor a feature request, but just a question.
As for answers, the Emacs manual (reachable via the Help menu, for
example) is a good way to figure it out. It has a whole section "53.4.6
Rebinding Keys in Your Init File" with examples.
So for your case, you'd do:
(global-set-key [?\C-o] 'other-window)
-- Stefan
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8551
; Package
emacs
.
(Mon, 25 Apr 2011 23:59:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 8551 <at> debbugs.gnu.org (full text, mbox):
2011/4/25 Stefan Monnier <monnier <at> iro.umontreal.ca>:
> (global-set-key [?\C-o] 'other-window)
>
Or:
(global-set-key (kbd "C-o") 'other-window)
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 24 May 2011 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 88 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.