From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: TeX input method Date: Mon, 02 Oct 2006 15:40:47 -0400 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1159881287 18693 80.91.229.2 (3 Oct 2006 13:14:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 3 Oct 2006 13:14:47 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 03 15:14:41 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GUk64-00082A-Tw for ged-emacs-devel@m.gmane.org; Tue, 03 Oct 2006 15:14:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GUk64-000084-5n for ged-emacs-devel@m.gmane.org; Tue, 03 Oct 2006 09:14:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GUk5o-00006L-NT for emacs-devel@gnu.org; Tue, 03 Oct 2006 09:13:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GUk5n-00005k-Qs for emacs-devel@gnu.org; Tue, 03 Oct 2006 09:13:52 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GUk5n-00005V-JG for emacs-devel@gnu.org; Tue, 03 Oct 2006 09:13:51 -0400 Original-Received: from [132.204.255.112] (helo=alfajor.home) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GUkC0-0004aA-N1 for emacs-devel@gnu.org; Tue, 03 Oct 2006 09:20:16 -0400 Original-Received: by alfajor.home (Postfix, from userid 20848) id 114401CC7A; Mon, 2 Oct 2006 15:40:48 -0400 (EDT) Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:60389 Archived-At: I like the TeX input method and tend to turn it on in ever more buffers. But as I do that I start to bump into cases where it annoys me. Overall it's a pretty discrete input method, but I recently got annoyed by some of the keys it uses. I'm sure other people have other pet peeves, but here are my two main problems and suggestion to fix each. - First problem: ~ is mapped to the non-breaking space. It actually took me a while to understand why my ~ key didn't insert a tilde: TeX usually only fiddles with key sequences, so you get to see visually that thjere's something going on (because of the underscored text, and the echo area output). I suggest to leave ~ alone and use `\ SPC' for nbsp. But then inserting \ can become a bit cumbersome (although C-q \ still works), so maybe this should be complemented by a mapping from `\ \' -> \. Here is the patch hunk I'm using right now in latin-ltx.el for that: @@ -901,7 +901,8 @@ ("\\Bbb{Z}" ?=E2=84=A4) ("--" ?=E2=80=93) ("---" ?=E2=80=94) - ("~" ?=C2=A0) ; nbsp + ("\\\\" ?\\) + ("\\ " ?=C2=A0) ;; ("~" ?=C2=A0) ; nbsp ; Hijacking ~ would be to= o annoying. ("\\mu" ?=CE=BC) ("\\rho" ?=CF=81) ("\\mathscr{I}" ?=E2=84=90) ; moment of inertia - Second problem: the TeX input method uses a leading { even though it's not necessary: all the corresponding chars can be input with a simpler key-sequence (just skip the { and }). E.g. the german =C3=9F can be inpu= t with `{ \ s s }' or with `\ s s'. So I think we should remove those redundant key-sequences and thus free the { key. See attached patch for that. Stefan --- orig/leim/quail/latin-ltx.el +++ mod/leim/quail/latin-ltx.el @@ -45,17 +45,17 @@ =20 (quail-define-rules ("!`" ?=C2=A1) - ("{\\pounds}" ?=C2=A3) ("\\pounds" ?=C2=A3) - ("{\\S}" ?=C2=A7) ("\\S" ?=C2=A7) + ("\\pounds" ?=C2=A3) ;; ("{\\pounds}" ?=C2=A3) + ("\\S" ?=C2=A7) ;; ("{\\S}" ?=C2=A7) ("\\\"{}" ?=C2=A8) - ("{\\copyright}" ?=C2=A9) ("\\copyright" ?=C2=A9) + ("\\copyright" ?=C2=A9) ;; ("{\\copyright}" ?=C2=A9) ("$^a$" ?=C2=AA) ("\\=3D{}" ?=C2=AF) ("$\\pm$" ?=C2=B1) ("\\pm" ?=C2=B1) ("$^2$" ?=C2=B2) ("$^3$" ?=C2=B3) ("\\'{}" ?=C2=B4) - ("{\\P}" ?=C2=B6) ("\\P" ?=C2=B6) + ("\\P" ?=C2=B6) ;; ("{\\P}" ?=C2=B6) ;; Fixme: Yudit has the equivalent of ("\\cdot" ?=E2=8B=85), for U+22C5, = DOT ;; OPERATOR, whereas =C2=B7 is MIDDLE DOT. JadeTeX translates both to ;; \cdot. @@ -71,8 +71,8 @@ ("\\~{A}" ?=C3=83) ("\\~A" ?=C3=83) ("\\\"{A}" ?=C3=84) ("\\\"A" ?=C3=84) ("\\\k{A}" ?=C4=84) - ("{\\AA}" ?=C3=85) ("\\AA" ?=C3=85) - ("{\\AE}" ?=C3=86) ("\\AE" ?=C3=86) + ("\\AA" ?=C3=85) ;; ("{\\AA}" ?=C3=85) + ("\\AE" ?=C3=86) ;; ("{\\AE}" ?=C3=86) ("\\c{C}" ?=C3=87) ("\\cC" ?=C3=87) ("\\`{E}" ?=C3=88) ("\\`E" ?=C3=88) ("\\'{E}" ?=C3=89) ("\\'E" ?=C3=89) @@ -93,14 +93,14 @@ ("\\\"{O}" ?=C3=96) ("\\\"O" ?=C3=96) ("\\\k{O}" ?=C7=AA) ("$\\times$" ?=C3=97) ("\\times" ?=C3=97) - ("{\\O}" ?=C3=98) ("\\O" ?=C3=98) + ("\\O" ?=C3=98) ;;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4=AD) =20 ("\\.{I}" ?=C4=B0) ("\\.I" ?=C4=B0) - ("{\\i}" ?=C4=B1) ("\\i" ?=C4=B1) + ("\\i" ?=C4=B1) ;; ("{\\i}" ?=C4=B1) ("\\^{J}" ?=C4=B4) ("\\^J" ?=C4=B4) ("\\^{\\j}" ?=C4=B5) ("\\^j" ?=C4=B5) ("\\c{K}" ?=C4=B6) ("\\cK" ?=C4=B6) @@ -191,8 +191,8 @@ ("\\c{L}" ?=C4=BB) ("\\cL" ?=C4=BB) ("\\c{l}" ?=C4=BC) ("\\cl" ?=C4=BC) =20 - ("{\\L}" ?=C5=81) ("\\L" ?=C5=81) - ("{\\l}" ?=C5=82) ("\\l" ?=C5=82) + ("\\L" ?=C5=81) ;; ("{\\L}" ?=C5=81) + ("\\l" ?=C5=82) ;; ("{\\l}" ?=C5=82) ("\\'{N}" ?=C5=83) ("\\'N" ?=C5=83) ("\\'{n}" ?=C5=84) ("\\'n" ?=C5=84) ("\\c{N}" ?=C5=85) ("\\cN" ?=C5=85) @@ -206,8 +206,8 @@ =20 ("\\H{O}" ?=C5=90) ("\\HO" ?=C5=90) ("\\U{o}" ?=C5=91) ("\\Uo" ?=C5=91) - ("{\\OE}" ?=C5=92) ("\\OE" ?=C5=92) - ("{\\oe}" ?=C5=93) ("\\oe" ?=C5=93) + ("\\OE" ?=C5=92) ;; ("{\\OE}" ?=C5=92) + ("\\oe" ?=C5=93) ;; ("{\\oe}" ?=C5=93) ("\\'{R}" ?=C5=94) ("\\'R" ?=C5=94) ("\\'{r}" ?=C5=95) ("\\'r" ?=C5=95) ("\\c{R}" ?=C5=96) ("\\cR" ?=C5=96)