From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: bug#8551: making Emacs remember a key binding to 'other-window Date: Mon, 25 Apr 2011 11:50:45 -0700 Message-ID: References: <3679AE44D8C04547A4F3EB83E7790562A8B3FE561E@MBX01.ldschurch.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1303757469 1933 80.91.229.12 (25 Apr 2011 18:51:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 25 Apr 2011 18:51:09 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "'Kevin Michael Simonson'" , <8551@debbugs.gnu.org> Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 25 20:51:04 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QEQsB-00059b-DH for geh-help-gnu-emacs@m.gmane.org; Mon, 25 Apr 2011 20:51:03 +0200 Original-Received: from localhost ([::1]:40115 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEQsA-0002ui-Uw for geh-help-gnu-emacs@m.gmane.org; Mon, 25 Apr 2011 14:51:02 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:43116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEQs6-0002uc-D2 for help-gnu-emacs@gnu.org; Mon, 25 Apr 2011 14:50:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QEQs5-0004aK-2b for help-gnu-emacs@gnu.org; Mon, 25 Apr 2011 14:50:58 -0400 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:20906) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEQs4-0004a9-To for help-gnu-emacs@gnu.org; Mon, 25 Apr 2011 14:50:57 -0400 Original-Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p3PIojnI019252 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 25 Apr 2011 18:50:46 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id p3PIoiBR017710 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 25 Apr 2011 18:50:44 GMT Original-Received: from abhmt014.oracle.com (abhmt014.oracle.com [141.146.116.23]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p3PIoheM027740; Mon, 25 Apr 2011 13:50:44 -0500 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 25 Apr 2011 11:50:43 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <3679AE44D8C04547A4F3EB83E7790562A8B3FE561E@MBX01.ldschurch.org> Thread-Index: AcwDbjtE6U28zWlNTQSGZPpku7e+AQACfWaQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 X-Source-IP: rcsinet15.oracle.com [148.87.113.117] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090209.4DB5C286.0145:SCFMA4539811,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 148.87.113.121 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:80838 Archived-At: > 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@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)