From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas Neuss Newsgroups: gmane.emacs.help Subject: Re: Rebinding keys Date: Mon, 25 Mar 2013 22:48:16 +0100 Message-ID: <87fvzji21r.fsf@scipolis.de> References: <87boa7k23g.fsf@scipolis.de> <87k3ovic99.fsf@scipolis.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1364274625 24052 80.91.229.3 (26 Mar 2013 05:10:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Mar 2013 05:10:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 26 06:10:52 2013 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 1UKM9r-0002zx-Fu for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Mar 2013 06:10:51 +0100 Original-Received: from localhost ([::1]:42797 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKM9T-0003Yh-D1 for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Mar 2013 01:10:27 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!news.dfncis.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 66 Original-X-Trace: news.dfncis.de j/s8VPIC7GHgIr1FlCLpbQWl4N1ZpNQfRZP7Xrw1F88S9B Cancel-Lock: sha1:Aoq07zQDO6Jt4ViEVPA9HG3PG+w= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Original-Xref: usenet.stanford.edu gnu.emacs.help:197482 X-Mailman-Approved-At: Tue, 26 Mar 2013 01:09:55 -0400 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:89754 Archived-At: Peter Münster writes: > On Mon, Mar 25 2013, Nicolas Neuss wrote: > >>> Why is (insert "]") more useful than "ä"? >> >> I often write English texts. > > Thanks. So kind of "if LaTeX then English, else German". > (Be aware, that you'll need to change your habits when LaTeXing German > texts... ;) Not really. See below. > If you ever need such special key-mappings outside of emacs, I recommend > xmodmap. Yes. Maybe I wasn't clear enough, but on my Linux laptop I do the same with my .xmodmap containing the following: --8<---------------cut here---------------start------------->8--- keycode 47 = bracketleft braceleft odiaeresis Odiaeresis odiaeresis Odiaeresis keycode 48 = bracketright braceright adiaeresis Adiaeresis adiaeresis Adiaeresis keycode 34 = backslash asciitilde udiaeresis Udiaeresis udiaeresis Udiaeresis keycode 115 = Alt_L --8<---------------cut here---------------end--------------->8--- [You see, that I can obtain the German umlaute as a two-key combination with Alt-R. So I lose a little bit of typing speed with those, but \~{}[] (which are frequently used in LaTeX with any language) are single-key characters and faster to type.] However, I (or, more precisely, my son) has got a Macintosh Power Book and wants to use Aquamacs. Since, the .xmodmap technique does not work (I still have to try the suggestion with Ukulele), I reverted to redefining keys in Emacs as a first remedy. > For example, I use the following script for switching between > French and German: > > #!/bin/bash > > # change between french and german keyboard > > DIR=~/.fvwm > FLAG=$DIR/french > FRENCH=$DIR/Xmodmap.french > GERMAN=$DIR/Xmodmap.german > > if [ "$1" = german ] || [ -f $FLAG -a -z "$1" ]; then > xmodmap $GERMAN > rm -f $FLAG > else > xmodmap $FRENCH > touch $FLAG > fi OK, that's probably a good idea. Thanks for the feedback, Nicolas