I'm primarily a Linux user who recently acquired a MacBook Air and I'm currently desperately trying to find out whether there's an equivalent for Linux's desktop definition files, where you can define an application by its command line invocation, with an optional placeholder for the file that X11 will pass to it when a file of file type associated with that application is double-clicked.
E.g. on Linux, I can set
.txt files to be opened with a specific command line invocation of
emacsclient like so:
emacsclient -c -a "" %f
%f is the placeholder that will get replaced by the path to the actual file you double-click on. (In general, Linux file managers allow you to specify this command line in the File info window.)
Is there any simple way to achieve this on OS X? I've tried tinkering with AppleScript, as well as Google around for a solution, but to no avail. I probably still need to build up my Apple-technology-related knowledge and vocabulary, so as to be able to ask the right questions with the right words -- so please bear with me...