lux <l...@shellcodes.org> writes: >> However, for example, (shell-quote-argument "-enhance -strip") will >> return "-enhance\\ -strip", which is not what we want. >> >> Similar problem with other instances of `shell-command' in Org where >> header args supply command line arguments. Like in :cmdline. >> > > I think there is only a need to deal with the problem of `\\ ', for > example: > > (string-replace "\\ " " " (shell-quote-argument im-in-options))
No. Quoting will also affect '"' and other '\'. We must not try to be smart here. It will miss edge cases and be fragile in general. > Any better suggestions? Thanks. I am afraid that we cannot make things universally safe here without breaking changes. The best way will be treating :cmd and similar header args as unsafe and include them into the planned safety prompt system we discussed in https://orgmode.org/list/87edsd5o89.fsf@localhost -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>