GNU bug report logs - #8551
making Emacs remember a key binding to 'other-window

Previous Next

Package: emacs;

Reported by: Kevin Michael Simonson <simonsonkm <at> familysearch.org>

Date: Mon, 25 Apr 2011 17:42:02 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Kevin Michael Simonson'" <simonsonkm <at> familysearch.org>, <8551 <at> debbugs.gnu.org>
Cc: help-gnu-emacs <at> gnu.org
Subject: bug#8551: making Emacs remember a key binding to 'other-window
Date: Mon, 25 Apr 2011 11:50:45 -0700
> 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)





This bug report was last modified 14 years and 89 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.