From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Thorpe Newsgroups: gmane.emacs.help Subject: Re: Find bindings for all modes Date: Thu, 30 Oct 2014 02:04:52 +0000 Message-ID: <878ujy71ob.fsf@robertthorpeconsulting.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1414634774 13958 80.91.229.3 (30 Oct 2014 02:06:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Oct 2014 02:06:14 +0000 (UTC) Cc: Help-gnu-emacs@gnu.org To: Tim Johnson , John Mastro Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 30 03:06:07 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 1Xjf7g-0000Mq-Qv for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Oct 2014 03:06:00 +0100 Original-Received: from localhost ([::1]:50097 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xjf7g-0005TX-3I for geh-help-gnu-emacs@m.gmane.org; Wed, 29 Oct 2014 22:06:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xjf6l-0004hu-3M for Help-gnu-emacs@gnu.org; Wed, 29 Oct 2014 22:05:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xjf6e-0001hU-1Q for Help-gnu-emacs@gnu.org; Wed, 29 Oct 2014 22:05:03 -0400 Original-Received: from outbound-smtp01.blacknight.com ([81.17.249.7]:58193) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xjf6d-0001hN-P1 for Help-gnu-emacs@gnu.org; Wed, 29 Oct 2014 22:04:55 -0400 Original-Received: from mail.blacknight.com (pemlinmail04.blacknight.ie [81.17.254.17]) by outbound-smtp01.blacknight.com (Postfix) with ESMTP id 7C042C02F1 for ; Thu, 30 Oct 2014 02:02:18 +0000 (UTC) Original-Received: (qmail 14637 invoked from network); 30 Oct 2014 02:04:54 -0000 Original-Received: from unknown (HELO RTLaptop) (rt@robertthorpeconsulting.com@[109.79.141.164]) by 81.17.254.9 with ESMTPSA (DHE-RSA-AES128-SHA encrypted, authenticated); 30 Oct 2014 02:04:54 -0000 In-Reply-To: (message from John Mastro on Wed, 29 Oct 2014 16:05:14 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 81.17.249.7 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:100655 Archived-At: Tim Johnson writes: > 1)I am new to terminal mode (need it for ssh connections to my main > machine from netbooks) > 2)I have a limited knowledge of emacs. > 3)I do not work in a team environment > 4)I have limited movement in my hands and painful arthritis in my > thumbs, thus I seek quick sequences and short reaches. > Functionally, my hands are semi-crippled. > 5)I use a happy hacker keyboard on my mac, where the control key is > in the same place as the caps lock on convention keyboards and I > set up all my other computers with caps lock and control swapped. John Mastro writes: > My goal is to have a general-purpose prefix key on the right hand side > of the keyboard, to complement C-c. I think I understand both of your requirements better now. I'll reply to you both at once if you don't mind. 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's not really very useful otherwise. If you have several computers of your own then you can network them better using VNC, Samba, scp, Rsync and/or other programs. SSH and Telnet are the basics of networking used connection are very slow or if the sysadmin prohibits anything else. If you want the look of terminal mode you can approximate that with themes. 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. Tim, have you tried god-mode or evil? They may be more useful for dealing with limited hand mobility. Tim Johnson writes: > I didn't know that C-c x was available in that fashion. Thanks, a > do you have URLs or Help for further docs on this? 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") John Mastro writes: > Keys that are unbound by default are an understandably attractive > option for mode authors. On the other hand, no mode that I know of > rebinds C-h, so I only deal with the issue once. Also, these are all > either pinky keys, off the home row, or both. Mode authors should be using C-c C-X, that's the prefix keymap they're supposed to use. I haven't seen any that use C-'#.,;= , but I don't use many non-built-in modes. It's probably easier to make external modes behave than it is to deal with the many internal ones that assume things about keymaps. That said, John's redefining of C-h is probably ok, not many modes tinker with that. Tim's plan to change C-j, C-l, C-o, etc is more difficult, almost every mode changes those. BR, Robert Thorpe