* TeX input method
@ 2006-10-02 19:40 Stefan Monnier
2006-10-03 13:17 ` David Kastrup
0 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2006-10-02 19:40 UTC (permalink / raw)
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}" ?ℤ)
("--" ?–)
("---" ?—)
- ("~" ? ) ; nbsp
+ ("\\\\" ?\\)
+ ("\\ " ? ) ;; ("~" ? ) ; nbsp ; Hijacking ~ would be too annoying.
("\\mu" ?μ)
("\\rho" ?ρ)
("\\mathscr{I}" ?ℐ) ; 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 ß can be input 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 @@
(quail-define-rules
("!`" ?¡)
- ("{\\pounds}" ?£) ("\\pounds" ?£)
- ("{\\S}" ?§) ("\\S" ?§)
+ ("\\pounds" ?£) ;; ("{\\pounds}" ?£)
+ ("\\S" ?§) ;; ("{\\S}" ?§)
("\\\"{}" ?¨)
- ("{\\copyright}" ?©) ("\\copyright" ?©)
+ ("\\copyright" ?©) ;; ("{\\copyright}" ?©)
("$^a$" ?ª)
("\\={}" ?¯)
("$\\pm$" ?±) ("\\pm" ?±)
("$^2$" ?²)
("$^3$" ?³)
("\\'{}" ?´)
- ("{\\P}" ?¶) ("\\P" ?¶)
+ ("\\P" ?¶) ;; ("{\\P}" ?¶)
;; Fixme: Yudit has the equivalent of ("\\cdot" ?⋅), for U+22C5, DOT
;; OPERATOR, whereas · is MIDDLE DOT. JadeTeX translates both to
;; \cdot.
@@ -71,8 +71,8 @@
("\\~{A}" ?Ã) ("\\~A" ?Ã)
("\\\"{A}" ?Ä) ("\\\"A" ?Ä)
("\\\k{A}" ?Ą)
- ("{\\AA}" ?Å) ("\\AA" ?Å)
- ("{\\AE}" ?Æ) ("\\AE" ?Æ)
+ ("\\AA" ?Å) ;; ("{\\AA}" ?Å)
+ ("\\AE" ?Æ) ;; ("{\\AE}" ?Æ)
("\\c{C}" ?Ç) ("\\cC" ?Ç)
("\\`{E}" ?È) ("\\`E" ?È)
("\\'{E}" ?É) ("\\'E" ?É)
@@ -93,14 +93,14 @@
("\\\"{O}" ?Ö) ("\\\"O" ?Ö)
("\\\k{O}" ?Ǫ)
("$\\times$" ?×) ("\\times" ?×)
- ("{\\O}" ?Ø) ("\\O" ?Ø)
+ ("\\O" ?Ø) ;; ("{\\O}" ?Ø)
("\\`{U}" ?Ù) ("\\`U" ?Ù)
("\\'{U}" ?Ú) ("\\'U" ?Ú)
("\\^{U}" ?Û) ("\\^U" ?Û)
("\\\"{U}" ?Ü) ("\\\"U" ?Ü)
("\\\k{U}" ?Ų)
("\\'{Y}" ?Ý) ("\\'Y" ?Ý)
- ("{\\ss}" ?ß) ("\\ss" ?ß)
+ ("\\ss" ?ß) ;; ("{\\ss}" ?ß)
("\\`{a}" ?à) ("\\`a" ?à)
("\\'{a}" ?á) ("\\'a" ?á)
@@ -108,8 +108,8 @@
("\\~{a}" ?ã) ("\\~a" ?ã)
("\\\"{a}" ?ä) ("\\\"a" ?ä)
("\\\k{a}" ?ą)
- ("{\\aa}" ?å) ("\\aa" ?å)
- ("{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{\\OE}" ?Œ)
+ ("\\oe" ?œ) ;; ("{\\oe}" ?œ)
("\\'{R}" ?Ŕ) ("\\'R" ?Ŕ)
("\\'{r}" ?ŕ) ("\\'r" ?ŕ)
("\\c{R}" ?Ŗ) ("\\cR" ?Ŗ)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: TeX input method
2006-10-02 19:40 TeX input method Stefan Monnier
@ 2006-10-03 13:17 ` David Kastrup
2006-10-03 13:50 ` Stefan Monnier
0 siblings, 1 reply; 13+ messages in thread
From: David Kastrup @ 2006-10-03 13:17 UTC (permalink / raw)
Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> 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.
That is strictly wrong, since `\ ' means a breakable space of standard
width in TeX.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: TeX input method
2006-10-03 13:17 ` David Kastrup
@ 2006-10-03 13:50 ` Stefan Monnier
2006-10-03 13:56 ` David Kastrup
0 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2006-10-03 13:50 UTC (permalink / raw)
Cc: emacs-devel
>> 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.
> That is strictly wrong, since `\ ' means a breakable space of standard
> width in TeX.
It's not strictly wrong because: the TeX input method != the TeX language.
BTW, do you have a counter suggestion for how to deal with the inconvenience
of mapping ~ to nbsp?
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: TeX input method
2006-10-03 13:50 ` Stefan Monnier
@ 2006-10-03 13:56 ` David Kastrup
2006-10-03 14:29 ` Stefan Monnier
0 siblings, 1 reply; 13+ messages in thread
From: David Kastrup @ 2006-10-03 13:56 UTC (permalink / raw)
Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> something going on (because of the underscored text, and the echo area
>>> output). I suggest to leave ~ alone and use `\ SPC' for nbsp.
>
>> That is strictly wrong, since `\ ' means a breakable space of standard
>> width in TeX.
>
> It's not strictly wrong because: the TeX input method != the TeX
> language.
We have already had people who use the input method data to convert
some input language to utf-8 and back. Diverting too far from the
language is probably not a good idea.
> BTW, do you have a counter suggestion for how to deal with the
> inconvenience of mapping ~ to nbsp?
Not right now.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: TeX input method
2006-10-03 13:56 ` David Kastrup
@ 2006-10-03 14:29 ` Stefan Monnier
2006-10-04 2:55 ` Kenichi Handa
0 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2006-10-03 14:29 UTC (permalink / raw)
Cc: emacs-devel
>>>> something going on (because of the underscored text, and the echo area
>>>> output). I suggest to leave ~ alone and use `\ SPC' for nbsp.
>>
>>> That is strictly wrong, since `\ ' means a breakable space of standard
>>> width in TeX.
>>
>> It's not strictly wrong because: the TeX input method != the TeX
>> language.
> We have already had people who use the input method data to convert
> some input language to utf-8 and back. Diverting too far from the
> language is probably not a good idea.
>> BTW, do you have a counter suggestion for how to deal with the
>> inconvenience of mapping ~ to nbsp?
> Not right now.
So in essence you consider it more important to stick as close as possible
to TeX for those potential users who may want to abuse the input method as
a sort of coding-system, even if if means annoying the actual daily users of
this input method?
In this case I think we should "fix" the TeX input method to be more like
TeX? E.g. map `SPC SPC SPC ...' to " "?
More seriously: the TeX input method is really not like TeX. It's only
using TeX as a basis so that people who know TeX get the benefit of reusing
the same names for the same chars.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: TeX input method
2006-10-03 14:29 ` Stefan Monnier
@ 2006-10-04 2:55 ` Kenichi Handa
2006-10-05 5:30 ` Miles Bader
0 siblings, 1 reply; 13+ messages in thread
From: Kenichi Handa @ 2006-10-04 2:55 UTC (permalink / raw)
Cc: emacs-devel
In article <jwvmz8dxz0v.fsf-monnier+emacs@gnu.org>, Stefan Monnier <monnier@iro.umontreal.ca> writes:
> So in essence you consider it more important to stick as close as possible
> to TeX for those potential users who may want to abuse the input method as
> a sort of coding-system, even if if means annoying the actual daily users of
> this input method?
> In this case I think we should "fix" the TeX input method to be more like
> TeX? E.g. map `SPC SPC SPC ...' to " "?
> More seriously: the TeX input method is really not like TeX. It's only
> using TeX as a basis so that people who know TeX get the benefit of reusing
> the same names for the same chars.
I tend to agree with that. An input method should be
designed to make inputting the most convenient. It may be
ok to use a data of some input method as a sort of
coding-system, but that priority should be lower than the
original intention of an input method.
So, the only question is whether Stefan's change is worth
breaking backward compatiblity or not.
---
Kenichi Handa
handa@m17n.org
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: TeX input method
2006-10-04 2:55 ` Kenichi Handa
@ 2006-10-05 5:30 ` Miles Bader
2006-10-05 7:26 ` David Kastrup
0 siblings, 1 reply; 13+ messages in thread
From: Miles Bader @ 2006-10-05 5:30 UTC (permalink / raw)
Cc: Stefan Monnier, emacs-devel
Kenichi Handa <handa@m17n.org> writes:
> So, the only question is whether Stefan's change is worth
> breaking backward compatiblity or not.
Why not have "tex-discreet" and "tex-pedantic" input methods, the latter
being the current input method, and the former being Stefan's slightly
modified version. The name "tex" could be an alias for one of those
(which one I don't know, but I tend towards the former).
[I agree with Stefan that the tex input method is a convenient thing to
turn on for getting random weird characters, and that I'd prefer that it
be unintrusive more than it be strictly the same as tex in all those
weird corner cases.]
-Miles
--
I'd rather be consing.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: TeX input method
2006-10-05 5:30 ` Miles Bader
@ 2006-10-05 7:26 ` David Kastrup
2006-10-05 13:39 ` Stefan Monnier
2006-10-05 13:59 ` Stefan Monnier
0 siblings, 2 replies; 13+ messages in thread
From: David Kastrup @ 2006-10-05 7:26 UTC (permalink / raw)
Cc: emacs-devel, Stefan Monnier, Kenichi Handa
Miles Bader <miles.bader@necel.com> writes:
> Kenichi Handa <handa@m17n.org> writes:
>> So, the only question is whether Stefan's change is worth
>> breaking backward compatiblity or not.
>
> Why not have "tex-discreet" and "tex-pedantic" input methods, the latter
> being the current input method, and the former being Stefan's slightly
> modified version. The name "tex" could be an alias for one of those
> (which one I don't know, but I tend towards the former).
>
> [I agree with Stefan that the tex input method is a convenient thing to
> turn on for getting random weird characters, and that I'd prefer that it
> be unintrusive more than it be strictly the same as tex in all those
> weird corner cases.]
Well, I have to agree with Stefan that the sequences starting with {
seem somewhat pointless for an input encoding. But ~ is a different
beast.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: TeX input method
2006-10-05 7:26 ` David Kastrup
@ 2006-10-05 13:39 ` Stefan Monnier
2006-10-05 13:59 ` Stefan Monnier
1 sibling, 0 replies; 13+ messages in thread
From: Stefan Monnier @ 2006-10-05 13:39 UTC (permalink / raw)
Cc: Kenichi Handa, emacs-devel, Miles Bader
> Well, I have to agree with Stefan that the sequences starting with {
> seem somewhat pointless for an input encoding.
OK, thanks. I'll install that part.
> But ~ is a different beast.
The main problem for me with this is that it was difficult to figure out why
~ didn't work the way I expected it (it didn't occur to me at first that it
was linked to the input method). E.g. C-h k ~ told me something like:
(translated from ~ ) is bound to self-insert-command
...
then I looked for some weird key-mapping in key-translation-map and
function-key-map. I know it wasn't my brightest moment, but still: this is
the only part of the TeX input method which remaps a single key rather than
a key-sequence.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: TeX input method
2006-10-05 7:26 ` David Kastrup
2006-10-05 13:39 ` Stefan Monnier
@ 2006-10-05 13:59 ` Stefan Monnier
2006-10-05 14:19 ` David Kastrup
1 sibling, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2006-10-05 13:59 UTC (permalink / raw)
Cc: Kenichi Handa, emacs-devel, Miles Bader
> But ~ is a different beast.
Then what about changing the
~ ->
into
~~ ->
or
~ ->
~~ -> ~
At least this way, the user will get the usual underlining as well as
echo-area feedback so she knows what's going on and the NBSP will be
reachable with ~ so the user's expectation that it works like TeX won't be
too far off.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: TeX input method
2006-10-05 13:59 ` Stefan Monnier
@ 2006-10-05 14:19 ` David Kastrup
2006-10-05 14:52 ` Stefan Monnier
0 siblings, 1 reply; 13+ messages in thread
From: David Kastrup @ 2006-10-05 14:19 UTC (permalink / raw)
Cc: Kenichi Handa, emacs-devel, Miles Bader
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> But ~ is a different beast.
>
> Then what about changing the
>
> ~ ->
> into
> ~~ ->
> or
> ~ ->
> ~~ -> ~
>
> At least this way, the user will get the usual underlining as well
> as echo-area feedback so she knows what's going on and the NBSP will
> be reachable with ~ so the user's expectation that it works like TeX
> won't be too far off.
I think I would prefer the second variant. It seems closer to the
usual accent behavior.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: TeX input method
2006-10-05 14:19 ` David Kastrup
@ 2006-10-05 14:52 ` Stefan Monnier
2006-10-06 8:16 ` Kim F. Storm
0 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2006-10-05 14:52 UTC (permalink / raw)
Cc: Kenichi Handa, emacs-devel, Miles Bader
>>>>> "David" == David Kastrup <dak@gnu.org> writes:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> But ~ is a different beast.
>>
>> Then what about changing the
>>
>> ~ ->
>> into
>> ~~ ->
>> or
>> ~ ->
>> ~~ -> ~
>>
>> At least this way, the user will get the usual underlining as well
>> as echo-area feedback so she knows what's going on and the NBSP will
>> be reachable with ~ so the user's expectation that it works like TeX
>> won't be too far off.
> I think I would prefer the second variant.
OK would others object?
> It seems closer to the usual accent behavior.
[ I presume you think of a latin-prefix style input-method ]
Odd, I'd think the opposite: with accents, after hitting the accent key, the
accent char is displayed as is (i.e. after hitting just ~, an underlined ~
would be displayed) and if the following key is not one of the special ones,
the accent stays as a normal char.
The first variant behaves like that. The second behaves more like the
" -> `` thingy of LaTeX-mode.
I myself prefer the first variant, because it's less intrusive, but if
people prefer the second (which is closer to the current behavior), I can
live it.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2006-10-06 8:16 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-02 19:40 TeX input method Stefan Monnier
2006-10-03 13:17 ` David Kastrup
2006-10-03 13:50 ` Stefan Monnier
2006-10-03 13:56 ` David Kastrup
2006-10-03 14:29 ` Stefan Monnier
2006-10-04 2:55 ` Kenichi Handa
2006-10-05 5:30 ` Miles Bader
2006-10-05 7:26 ` David Kastrup
2006-10-05 13:39 ` Stefan Monnier
2006-10-05 13:59 ` Stefan Monnier
2006-10-05 14:19 ` David Kastrup
2006-10-05 14:52 ` Stefan Monnier
2006-10-06 8:16 ` Kim F. Storm
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.