From: Dominique Dhumieres (Dominique.Dhumieres@LPS.ENS.FR)
Date: 19 Aug 99, 23:53 EST
From: Dominique Dhumieres <Dominique.Dhumieres@LPS.ENS.FR>
Subject: Re: "Save as" key-binding, "smart quotes"
B.Philip Jonsson wrote:
> Would it be possible to implement WindowsExtendedLatin-1-to-Mac character
> set translation in Alpha/tcl? I guess it would, since HTML mode can
> translate Mac<->HTML, but would someone be willing to do the work?
>
> I have a table listing the two charsets side by side, but I can't write the
> code...
If you want that for tomorrow, have a look to the package 'latexAccents.tcl'
(the old or the new one) to have some idea on how to do it. If you can wait
for some time (I'll be far from any computer next week), you can send me
the two charsets. If I do it, I'ld like to do it also for Iso-latin-1 and for
the 'MIME' (?) encoding (when you get stuff like =E0 and so on). So if anyone
can send me the information, I'll appreciate. Last point, what are the
translations supposed to do with the characters which exist only in one
encoding (1/2 for instance)?
> According to "List All Bindings" there is:
>
> Bind 's' <cz> menu::generalProc "File" "saveUnmodified"
>
> I would like to have this linked to "Save as" instead. How do?
You can try one of the following possibilities:
add in your 'prefs.tcl' file (Config->Preferences->Edit Prefs File)
menu::replaceWith File [list "<S<B<O/SsaveUnmodified" ] \
items "<S<U<O/SsaveUnmodified"
menu::replaceWith File [list "<SsaveAs..." ] \
items "<S<B<O/SsaveAs..."
where '...' should be replaced by the 'ellipsis' character (ascii decimal
201 or hexa x0C9, opt+; on an US keyboard).
This will bind "saveUnmodified" to 's' <cs> and do the binding you want
for "saveAs...". The drawback is that you'll add a line 'Save A Copy As...'
to your 'File' menu which will toggle with 'Rename To...' when you press
the shift key (see 'Dynamic menus' in the new Johan's manual).
Instead you can add
menu::replaceWith File [list "<S<B<O/SsaveUnmodified" ] \
items "<S<B<O/SsaveAs..."
menu::replaceWith File [list "<SsaveACopyAs..." "<S<UrenameTo..." \
"<ssaveAs..." ] \
items "<SsaveUnmodified" "<S<UrenameTo..." "<SsaveACopyAs..."
Again don't forget to replace the '...' (six of them) by the 'ellipsis'
character. Now the drawback is that the item 'Save As' is replaced by
'Save A Copy As' and 'Save As' is available only through the binding you
want or through the dynamical menu (you have to press the control key).
> Also: can I get text mode to use and balance Mac's "smart
> quotes" (xD2-xD5)?
As far I can see, the pairs used by the 'balance' command are hard-coded.
Would it be possible in Alpha 8 to be able to add pairs to those built in?
(for instance <>, \le\ge, "smart single quotes" and so on).
Dominique d'Humieres
Laboratoire de Physique de l'ENS,
24, rue Lhomond, 75231 Paris cedex 05, FRANCE
tel. 33 1 44 32 38 01
fax. 33 1 44 32 34 33
e-mail: dominiq@physique.ens.fr