From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Johnson Newsgroups: gmane.emacs.help Subject: Re: Find bindings for all modes Date: Thu, 30 Oct 2014 10:25:15 -0800 Organization: AkWebsoft Message-ID: <20141030182515.GI7374@mail.akwebsoft.com> References: <878ujy71ob.fsf@robertthorpeconsulting.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1414773263 11725 80.91.229.3 (31 Oct 2014 16:34:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Oct 2014 16:34:23 +0000 (UTC) To: Help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 31 17:34:19 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XkF9W-0006aO-E3 for geh-help-gnu-emacs@m.gmane.org; Fri, 31 Oct 2014 17:34:18 +0100 Original-Received: from localhost ([::1]:39056 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkF9V-0006Z4-Q1 for geh-help-gnu-emacs@m.gmane.org; Fri, 31 Oct 2014 12:34:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkEEE-0005TG-R5 for Help-gnu-emacs@gnu.org; Fri, 31 Oct 2014 11:36:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XjuPR-0003QJ-1B for Help-gnu-emacs@gnu.org; Thu, 30 Oct 2014 14:25:25 -0400 Original-Received: from 191-232-4-64.mtaonline.net ([64.4.232.191]:59885 helo=tj49.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjuPQ-0003Pu-KJ for Help-gnu-emacs@gnu.org; Thu, 30 Oct 2014 14:25:20 -0400 Original-Received: by tj49.com (Postfix, from userid 501) id 720BF51D0644; Thu, 30 Oct 2014 10:25:15 -0800 (AKDT) Mail-Followup-To: Help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <878ujy71ob.fsf@robertthorpeconsulting.com> User-Agent: Mutt/1.4.2.3i X-detected-operating-system: by eggs.gnu.org: Mac OS X 10.x X-Received-From: 64.4.232.191 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:100658 Archived-At: * Robert Thorpe [141029 18:23]: > I'd begin by asking: why do you want terminal mode? The normal purpose > of terminals these days is SSHing into remote computers. Tim, why do > you need terminal mode if you don't work in a team environment? It is a given that I will be using SSH and terminal mode in both the host and the clients. > There are advantages to redefining basic keys like C-j, C-l, C-o, etc as > prefix keys. But, it's tricky, it's not like normal key bindings. Lots > of Emacs modes assume those keys are unchanged. For example, > list-buffer binds C-o to Buffer-menu-switch-other-window. If you rebind > C-o globally and you want Buffer-menu-switch-other-window then you're > going to have to bind it to something else in buffer menus. The same > goes for many other modes. If you read through the archives of this > list you'll see people often get bitten by this. If you've a good bit > of experience with elisp then that helps. AFAIK Emmanuel Berg, who > often comments here, has done this. The current keymaps have been used for years in gui mode. The new prefixes are : C-j, C-u and C-]. And there *have* been problems which have been worked out ... > Tim, have you tried god-mode or evil? They may be more useful for > dealing with limited hand mobility. Say what? :) Never heard of them. I will be googling them as soon as I finish this message. Feel free to elaborate if you have the time and inclination. <....> > Using C-c X type keys is easy. You can do something like: > (global-set-key (kbd "C-c a") 'previous-buffer) > Or, you can use local-set-key. See: > (info "(emacs) Rebinding") Thanks for the tip on 'info. I am currently rewriting my binding code so that I can set a global variable that will enable the C-j, C-l etc binding OR C-c j, C-c l etc. Let way I can compare effects on my hands. <...> > Tim's plan to change C-j, C-l, C-o, etc is > more difficult, almost every mode changes those. Indeed. You're absolutely correct, although I have already worked out many of those issues. The tradeoff is that with using control-C (see https://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html and the following statement "Don't define C-c letter as a key in Lisp programs. Sequences consisting of C-c and a letter (either upper or lower case) are reserved for users; they are the only sequences reserved for users") I would have to reach down more with my index finger but I wouldn't have to worry about collisions and I would have the potential of shorter sequences with more keymaps. We've wandered far from the original question, but I have learned much. Robert, thanks for your concise explanations and for being so patient with my unorthodox approach. regards -- Tim tim at tee jay forty nine dot com or akwebsoft dot com http://www.akwebsoft.com, http://www.tj49.com