On 9 Apr 2010, at 11:29, David Chappaz wrote:
>
> Eric Ludlam wrote:
>> Hi,
>>
>> I'm not sure why adding "-n" to your emacsclient script causes it
>> to not be found. If the problem is related to the space in the
>> command, a simple workaround is to create a shell script like this:
>>
>> myemacsclient.sh
>> --------------
>> #!/bin/sh
>> emacsclient -n $*
>> --------------
>>
>> And then use that shell script instead.
>>
>
>
> I have encountered the same problem on windows, where adding "-n" to
> the emacsclient options causes it not to be found, most likely due
> to the space in the command.
> The workaround I have found on windows is to change startup.m as
> follows:
>
> if (ispc)
> emacsinit('"emacsclient --alternate-editor emacs -n"');
> else
> emacsinit;
> end
>
> Notice the double quotes within the single quotes... I haven't tried
> it on linux, but Eric's suggestion should certainly work.
>
> As far as the links for error messages are concerned, I'm also
> experiencing problems, with all matlab releases (R2006a, R2008a,
> R2009a).
> In particular error messages of the kind:
>
> ??? Error: File: myscript.m Line: 57 Column: 15
>
> do not seem to be covered by the regexp.
>
> But great work, Eric ! You don't know how much I value what you've
> done, but I really, really regret Mathworks' decision to have
> dropped EmacsLink support...
>
> Cheers,
> David.
>
>
Hi all,
Sorry for the late reply, I have been busy and didn't want to report
back before I had done my best to make both solutions work. I could
not make your solution work David but Eric's shell script did the job.
For os x users with the same problem:
I created the shell script described above
Added the folder to the search path
Changed the file permission
Added these lines:
% Personal change to handle the space in emacsclient -n
% -------------------------------------------------------
clientcommand = 'myEmacsclient.sh';
% -------------------------------------------------------
in the emacsinit file located in /some/path/matlab-emacs/toolbox/ just
above the line
com.mathworks.services.Prefs.setStringPref('EditorOtherEditor',
clientcommand);
I should mention that there are still problems with the all the links
(If i find a solution i will post it), but the edit command now works
as it should.
Cheers
Daniel
|