From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Newsgroups: gmane.emacs.help Subject: Re: ergonomic keybindings in text mode Date: Mon, 30 Jun 2008 08:38:09 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <4868a10b$0$27448$9b4e6d93@newsspool4.arcor-online.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1214840468 19716 80.91.229.12 (30 Jun 2008 15:41:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Jun 2008 15:41:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 30 17:41:53 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KDLVZ-0004aP-HH for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Jun 2008 17:41:37 +0200 Original-Received: from localhost ([127.0.0.1]:40980 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KDLUj-0002X0-8t for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Jun 2008 11:40:45 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!w1g2000prd.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 74 Original-NNTP-Posting-Host: 24.6.97.120 Original-X-Trace: posting.google.com 1214840289 9671 127.0.0.1 (30 Jun 2008 15:38:09 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 30 Jun 2008 15:38:09 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: w1g2000prd.googlegroups.com; posting-host=24.6.97.120; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.1 Safari/525.18, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:159807 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:55159 Archived-At: hi Markus, are you using qwerty or dvorak? i use dvorak so i'm not sure what some of the special modes effects the qwerty ergo keymap. But for dvorak for example, shell mode and shell-command rebind M-r, which under the dvorak ergo map should be forward-word. For modes that rebind your shortcuts, you can force them back like this: (add-hook 'comint-mode-hook (lambda () (define-key comint-mode-map (kbd "M-r") 'forward-word) (define-key comint-mode-map (kbd "M-s")" 'isearch-forward) ) ) The comint-mode is used by shell and shell-command and other shell related modes for keybinding. So, the above rebind them. In general, you need to find out the mode name. Suppose the mode name is xyz, then typically xyz-hook is its hook function name and xyz-map is its keymap. Basically, each emacs mode may define its own keymap, and if they do, they over-ride any global maps by design. So a hook is needed to reclaim your keybindings. You'll have to do this for every mode that took your keybindings. Almost all major or minor modes will have its own keymaps (most of them will have lots of bindings in the C-c C-=E2=80=B9key=E2=80=BA space). H= owever, fortunately they seldomly use the M-=E2=80=B9key=E2=80=BA space, which the e= rgo map is based on. Thanks for trying out the ergonomic keybindings. :) Xah =E2=88=91 http://xahlee.org/ =E2=98=84 On Jun 30, 2:02 am, Markus Grunwald wrote: > Hello, > > Recently, I read in this group about a more ergonomic keylayout for emacs:= http://xahlee.org/emacs/ergonomic_emacs_keybinding.html > Since I had Problems with my joints for a long time, I decided to try it. > But I have one slight problem: text-mode changes a lot of bindings that I > would like to have. text-mode-hook does not look suspicious: > > text-mode-hook is a variable defined in `text-mode.el'. > Its value is > ((lambda nil > (auto-fill-mode 1) > (abbrev-mode 1) > (message "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D = text-mode-hook =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D"= )) > text-mode-hook-identify) > > What can I do about it ? The only thing that came to my mind is to re-bind= > all keys in text-mode-hook but this does not seem elegant to me... > > TIA, > Markus