3 ms·
I read the Emacs thread. Say what you want about the FSF as a whole, or even Emacs policy as a whole. But this is at another level. The proposal was to remov
by comex 4y ago
I read the Emacs thread. Say what you want about the FSF as a whole, or even Emacs policy as a whole. But this is at another level. The proposal was to remove the function ns-do-applescript, which runs an AppleScript script using the C API, because AppleScript is proprietary and thus bad. I can sort of understand that. What I can't understand is the suggested replacement: to run the same AppleScript scripts using a shell command.
And I don't mean something like "well, we won't endorse any use of AppleScript, but 'run shell command' is a general-purpose interface and we can't stop users from using it for AppleScript if they really want to". I could understand that. No, there are uses of AppleScript in Lisp code within the Emacs repo itself (not a separate package repository or something). The thread discussed one such use, which fetches the user's contact list using AppleScript. This was considered completely fine. Fetching the user's contact list, as a high-level feature, is supported on free operating systems, so it's okay to also implement it for non-free operating systems, even if that requires using a proprietary OS-specific API, in this case AppleScript. All fine. But for some reason, it was considered essential to do this using a shell command instead of a C API.
There was even a post suggesting that ns-do-applescript be reimplemented on top of the shell command instead of the C API. In this case, Emacs would still be offering its users a built-in API to run AppleScript scripts, just… in Lisp code instead of C! Because that's so different!
- kazinator 4y agoMaybe Emacs has to link with a particular library in order to have that API? So the part I don't understand is why the GPL exception wouldn't apply, if it is a system library that is going to be there on any Apple box. Emacs integrates a lot of various Mac-specific API's. https://git.savannah.gnu.org/cgit/emacs.git/tree/src/nsfns.m https://git.savannah.gnu.org/cgit/emacs.git/tree/src/nsfns.m ... and other "ns" files. These would fall under that GPL exception. It's the same like, say, GTK+ having to use a Win32 API to be able to do its job of opening a window and painting into it. I see that Emacs' w32fns.c source file uses ShellExecuteEx. Why not insist that CMD.EXE has to be spawned to run stuff.