[Mac OS X TeX] Re: emacs 21.1
Enrico Franconi
franconi at cs.man.ac.uk
Sat Feb 23 04:22:23 EST 2002
On February 22, Joshua S. Hodas writes:
> Could you post the code of the core of this script (the part that
> handles the drag and drop) in the meantime? I'd just like to see how
> the unix/applescript integration is handled in a simple code
> example. That will be enough to get me started.
--- This makes use of the 'OSX PowerAddOns Lite.osax' scripting addition
on open names
set file_list to ""
repeat with filename in names
set file_list to file_list & "\"" & convert_filepath(filename) & "\" "
end repeat
try
Shell "tcsh -c '/Applications/Emacs.app/Contents/MacOS/Emacs -l ~/.emacs-21-dist " & file_list & " &';kill -9 " & (Get My PID)
on error
quit
end try
end open
on run
try
Shell "tcsh -c '/Applications/Emacs.app/Contents/MacOS/Emacs -l ~/.emacs-21-dist &';kill -9 " & (Get My PID)
on error
quit
end try
end run
on convert_filepath(this_filepath)
set this_filepath to this_filepath as string
set AppleScript's text item delimiters to ":"
set the path_segments to every text item of this_filepath
set AppleScript's text item delimiters to "/"
set this_filepath to "/" & (the path_segments as string)
set AppleScript's text item delimiters to ""
return this_filepath
end convert_filepath
--
Enrico Franconi - franconi at cs.man.ac.uk
University of Manchester - http://www.cs.man.ac.uk/~franconi/
Department of Computer Science - Phone: +44 (161) 275 6170
Manchester M13 9PL, UK - Fax: +44 (161) 275 6204
-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <info at email.esm.psu.edu> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <info at email.esm.psu.edu> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------
More information about the MacOSX-TeX
mailing list