[macemacsjp-english 179] Re: launching emacs from a symbolic link

Back to archive index

Seiji Zenitani zenit****@tkg*****
Thu Sep 8 22:06:08 JST 2005


Hi,

On 2005/09/06, at 8:52, Nadeem Faruque wrote:

> For a complicated reason I need to be able to run emacs from a a
> symbolic link at ~/emacs.
>
> This was working and I am unsure what has changed since I last used
> it (perhaps a recent security update?).
>
> The problem was present on the June release of Carbon Emacs Package,
> and isn't better with the August one.
>
> The installation works fine whether opened by clicking the icon, or
> from the Terminal:
>
>> /Applications/Emacs.app/Contents/MacOS/Emacs
>>
> works fine and launches emacs in a separate window.
>
> But when I try to use the symbolic link I run into problems.
>
>> ln -s /Applications/Emacs.app/Contents/MacOS/Emacs ~/emacs
>>
> appears to be fine, but when I try to use it I run into trouble:
>
>
>> ~/emacs
>>
> emacs opens in -nw mode (i.e. in the Terminal window) with the  
> Messages
>
> Warning: arch-dependent data dir (/Applications/Emacs.app/Contents/
> Resources/libexec/emacs/22.0.50/powerpc-apple-darwin8.2.0/) does not
> exist.
> (/Users/faruque/emacs)
> Loading disp-table...done
> byte-code: Finder got an error: Can't continue .
>
>
> NB The June release of Carbon Emacs Package was behaving the same,
> but actually tried to open the separate emacs window and then it sat
> there half-drawn.
>
> NB2 I've tried
>
>> ln /Applications/Emacs.app/Contents/MacOS/Emacs ~/emacs
>> ln -h /Applications/Emacs.app/Contents/MacOS/Emacs ~/emacs
>> ln -s /Applications/Emacs.app/Contents/MacOS/bin/emacs ~/emacs
>>
> etc but without any change

Usually emacs runs fine when one types the below command.
/somewhere/Emacs.app/Contents/MacOS/Emacs

Since Carbon Emacs is re-locatable (you can set its icon anywhere you  
would like), it searches its libraries inside the application bundle,  
based on its path (/somewhere/else/Emacs.app/Contents/MacOS/Emacs) or  
its prefix-parameter at compilation time (/Applications/Emacs.app/ 
Contents/Resources). And so Emacs might be confused when one tries to  
launch it via its symbolic link.

How about using the below script as ~/emacs or ~/emacs.sh?

#!/bin/sh
/Applications/Emacs.app/Contents/MacOS/Emacs
# end


-- Seiji



More information about the macemacsjp-english mailing list
Back to archive index