The World


Sometimes we forget that despite what observation of the emacs-devel mailing list might suggest[1], Emacs core contributors are aware that there is something outside the ecosystem controlled by GNU.

I’ve found the most apparent proof for this fact when strolling through tramp-sh.el for debugging the tramp-open-connection-setup-interactive-shell function.

;; IRIX64 bash expands "!" even when in single quotes.  This
;; destroys our shell functions, we must disable it.  See
;; <>.

How unexpected to not only see a fair amount of commentary explaining the probing done, but even a URL backing up one of the applied hacks. I personally wouldn’t have bothered as IRIX is an obsolete operating system and support for it will be removed in a future Emacs Release[2], however the TRAMP developers either haven’t got the memo yet or think otherwise (which is understandable, while they may not want to use obsolete operating systems, they might need to).

Another proof for my heretic theory can be found in subr.el in the sources of shell-quote-argument, the gate keeper of everything that wants to interact with shells in an orderly manner:

;; First, quote argument so that CommandLineToArgvW will
;; understand it.  See
;; After we perform that level of quoting, escape shell
;; metacharacters so that cmd won't mangle our argument.  If the
;; argument contains no double quote characters, we can just
;; surround it with double quotes.  Otherwise, we need to prefix
;; each shell metacharacter with a caret.

MSDN for Windows references? Very good!

[1]See the LLDB support discussion which is based on the assumption that inclusion of such code could only happen in Emacs and the GNU ELPA package repository.
[2]See the 25.1 NEWS