[OS X TeX] Damn Applescript!
jerome.laurens at u-bourgogne.fr
Fri Sep 30 10:57:00 CEST 2005
Le 28 sept. 05, à 11:36, Stefan Walsen a écrit :
> Hi Herb,
> Herbert Schulz wrote:
>> Quite a while ago (using software time, not geological time here) I
>> put together, with a bunch of help from this list, the following
>> macro to ``Find Next "Tab"'' (where "Tab" is an embedded bullet
>> character, `•', in a command completion)
>> Recently I was asked to also delete that "Tab" character with an
>> example where that would be handy (saves pressing Del in certain
>> nested environments with my completions). I tried using the line
>> delete the selection of the front document
>> after the
>> set length...
>> line but that didn't work. I'm amazed at the strange, seemingly
>> random, syntax of Applescript but maybe that's my age showing since
>> I'm used to procedural languages (I loved C). Any help here would be
>> appreciated! Supposedly `delete' is a verb in TeXShop's Applescript
>> dictionary and I'd think that `selection of the front document' would
>> be a decent noun so...
> Well, yes, but... you don't really want to delete the selection, do
> you? you want to delete its *content*. Otherwise, the next time you
> 'set offset of selection of front document to (firstOccurrence - 1)'
> (or something similar), AppleScript says 'What selection? You mean the
> one you just deleted? That's gone.' ;)
This is not applescript, this is how applescript support is implemented
Don't blame Applescript.
A normal flow would be for end users to just suggest a "natural syntax"
to developpers, and then developpers would make the effort to render
this syntax available.
select the first word of the third paragraph
delete the selection
seems natural for a non english speaking person.
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
More information about the macostex-archives