Passing current path to external command

Running Dopus-11 on win7 64bit

I'm attempting to add a button to a toolbar that calls an external command.

I've enabled the 'Applicaiton' toolbar, and while in customize mode, dragged a shortcut of the desired application to
the toolbar. Voila, Instant button... then selecting 'edit' from context menu on that button I see the function that is being passed to external app.
@async:C:\Users\harry\emacs\bin\runemacs.exe {filepath}

I'm assuming that '{filepath}' expands to the current directory that dopus is in.

If that is the case, then somehow emacs is not understanding it.

Emacs is a unix style text editor but understands directories and can deal with them in many ways. But, apparently does not understand the element '{filepath} ', and ends up opening in: C:\Windows\System32, no matter where dopus is currently parked.

Am I correct in thinking {filepath} expands to the path of current directory opus is in?
Is there any other way to set up that command line so that it sends the current directory path to the external application?

That's not what {filepath} does, you want {sourcepath}.

The codes are all documented in this part of the manual: gpsoft.com.au/help/opus11/in ... _codes.htm

In case Emacs does not like the directory given by parameter, you may try to change the current directory right before Emacs is launched (by an additional command "in the button").

[quote="leo"]That's not what {filepath} does, you want {sourcepath}.

The codes are all documented in this part of the manual: gpsoft.com.au/help/opus11/in ... _codes.htm[/quote]

Great help. Thank you. And just in case any other emacs users happen on this thread: As it turns out {sourcepath} or short form {s!}, doesn't quite do it either... seems it only passes the short name of directory... so {sourcepath$} with '$' at the end or short form {s}. forces the long absolute name to be passed... apparently

That's incorrect, it does not pass the short path, there is a separate pair of codes for that.

It works as per the documentation I linked to.

[quote="leo"]That's incorrect, it does not pass the short path, there is a separate pair of codes for that.

It works as per the documentation I linked to.[/quote]
Thanks,, and sorry to anyone who read my mis-information.

Your post made me go back and test some more. I see what happens here is that either one works.
Either {sourcepath} or {sourcepath$}

I must have been doing something else wrong because at first it appeared that {sourcepath} did not work. and {sourcepath$} did, so I assumed the bit for {sourcepath} that says:

`Source path, long filenames, not required.'

Was the reason.

But I see now... they both work... seemingly the same.
So what is the difference betwee {sourcepath} and {sourcepath$} then?

The difference is explained in the manual on the same page as the codes, surprisingly enough. :slight_smile: The description there is better than I could write here.

It may shock you to know that before asking I read that page from top to bottom. I understood maybe 5%. I have no idea what the difference is still so if you think that help file gives a nice understandable story about what it all means... you live in a very different environment than I do.

Surely someone can say in laymans terms what the difference is between saying:

@async:C:\User\harry\emacs\bin\runemacs.exe {s}

and

@async:C:\User\harry\emacs\bin\runemacs.exe {s!}

They both seem to work just the same far as I see.