From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tim Johnson Newsgroups: gmane.emacs.help Subject: Overriding major mode key bindings Date: Sun, 4 Sep 2016 16:02:21 -0800 Organization: AkWebsoft Message-ID: <20160905000221.GA12566@mail.akwebsoft.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1473082549 26121 195.159.176.226 (5 Sep 2016 13:35:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 5 Sep 2016 13:35:49 +0000 (UTC) User-Agent: Mutt/1.7.0 (2016-08-17) To: Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 05 15:35:45 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bgu3k-0005My-DU for geh-help-gnu-emacs@m.gmane.org; Mon, 05 Sep 2016 15:35:36 +0200 Original-Received: from localhost ([::1]:54693 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgu3i-0002dp-8a for geh-help-gnu-emacs@m.gmane.org; Mon, 05 Sep 2016 09:35:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51622) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bghMx-00031h-Iv for Help-gnu-emacs@gnu.org; Sun, 04 Sep 2016 20:02:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bghMp-0001G6-0e for Help-gnu-emacs@gnu.org; Sun, 04 Sep 2016 20:02:31 -0400 Original-Received: from tjohnson.mtaonline.net ([64.4.232.191]:37947) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bghMo-0001Ei-O5 for Help-gnu-emacs@gnu.org; Sun, 04 Sep 2016 20:02:26 -0400 Original-Received: by linus.johnson.com (Postfix, from userid 1000) id CE75720078B; Sun, 4 Sep 2016 16:02:21 -0800 (AKDT) Mail-Followup-To: Emacs Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 64.4.232.191 X-Mailman-Approved-At: Mon, 05 Sep 2016 09:34:37 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:111263 Archived-At: using GNU Emacs 24.3. on ubuntu 14.04 I have keybindings established using 'global-set-key. Some are being clobbered by a major mode (python and elpy). I've tried the following with a mode-hook function: 1) unsetting those key sequences or 2) defining those key sequences as 'nil 3) remapping the mode functions to a keymap of my own device: i.e. a C-c n prefix. 1) and 2) fail to override the elpy bindings 3) works. After some research, it looks like what I really should do is to create my own minor mode and and bind the keys the I want to "protect" to that minor mode. See http://emacs.stackexchange.com/questions/352/how-to-override-major-mode-bindings/358#358 Am I on the right track? I am soliciting a second opinion. If that's the way to go, I'm game to procede... thanks -- Tim http://www.akwebsoft.com, http://www.tj49.com