On Tue, 8 Apr 2008, Christiaan Hofman wrote: ... >> 1. Skim -> Emacs >> >> If Aquamacs is not started up, but Skim is opened with a file.pdf, >> does >> Shift + Cmd + Click over a point in Skim starts up Emacs, and also >> loading >> the file.tex over the corresponding line? >> >> With my download of the latest Spring Carbon Emacs, if Emacs hasn't >> been >> started, nothing happens. If Emacs is opened, and running, not >> necessary >> with file.tex, then Shift + Cmd + Click, loads file.tex over the >> corresponding line. >> > > No, it doesn't, AFAIK. This is a limitation of the setup in (Carbon) > Emacs, because it communicates through a server, but for the server to > run you first need to launch Emacs. IMHO that's a bit stupid. > > To work around that, you could write your own script that makes sure > Emacs runs and then calls the server (emacsclient). You could then set > that as the script in the Skim preferences instead of directly calling > emacsclient. I think something like the script below may work (save it > to file, make it executable, and call it with arguments '%line > "%file"'). > > #\!/bin/bash > line=$1 > file="$2" > osascript -e "tell application \"Emacs\" to activate" > /Applications/Emacs.app/Contents/MacOS/bin/emacsclient --no-wait + > $line "$file"
I have created a file skimemacs.sh, with the above content (the last three lines are perhaps just one, since I do not know the syntax of osasscript, I tried the combinations as one line or as two separate) and saved it: ~/bin$ ls -l skimemacs.sh -rwxr-xr-- 1 rosi rosi 165 Apr 8 15:05 skimemacs.sh Then, in Skim > Preferences > Sync [Preset] Custom [Command] skimemacs.sh [Arguments] --no-wait +%line "%file" I also tried alternatively the combinations with and without the ".sh" and "--no-wait". None of these made Skim -> Emacs working anymore. Perhaps I messed up something. So, I reversed Skim's Preferences to Emacs default. Roussanka ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Skim-app-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/skim-app-users
