[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Warn about shell-expansion in the docstring of org-latex-to-html-con
From: |
Max Nikulin |
Subject: |
Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command |
Date: |
Wed, 13 Mar 2024 21:27:16 +0700 |
User-agent: |
Mozilla Thunderbird |
On 12/03/2024 20:03, Ihor Radchenko wrote:
Max Nikulin writes:
It is trivial to cause shell failure when single quotes are used around
%i. I am in doubts concerning double quotes. Perhaps stripping them is
more reliable.
May you list the cases to you propose to recognize?
Sun, 25 Feb 2024 17:41:43 +0700
https://list.orgmode.org/6e49c590-ad27-4fb0-b1f2-6a89c60a0b58@gmail.com
- '%i' and "%i" in any position including e.g. --option='%i' and
protocol:"%i"
- 'something%i' and "something%i" surrounded by spaces or at the end of
command but with no spaces in "something". It should be applied to %%%i,
but not to %%i.
- I would explicitly stress that quotes causes undefined or even
dangerous behavior. See e.g. the last paragraph
https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s07.html
In ORG-NEWS?
Since quotes were recommended in the manual and the docscring, it is
better to say there that they lead to undefined behavior. ORG-NEWS is to
make the change visible for those who have read docs earlier.
- I expected it as bugfix.
It is a breaking change.
Also, only users who customized the variable may be prone to unexpected
shell expansion. So, I do not see it as a critical bug.
Hence, not for bugfix.
I am still in doubts. I have no idea how much users need ODT export with
math and rely on the backend shipped with Org. All of them have to
customize the user option and those who added %i with quotes have risk
to get incorrect output. If quotes around %i are stripped then the
change is not breaking one for most of them.
Moreover, it
does not work in a container where git is not installed:
...
Debugger entered--Lisp error: (file-missing "Searching for program" "No
such file or directory" "git")
with emacs -Q?
emacs -Q --batch --eval '(find-file-noselect "not-found.txt" t)'
Starting new Ispell process ispell with default dictionary... \
Error enabling Flyspell mode:
(Searching for program No such file or directory ispell)
Error: (file-missing "Searching for program" "No such file or directory"
"git")
Emacs-28.2
ispell error is due to my .dir-locals-2.el
(text-mode . ((mode . flyspell)))
bug to get the git error it is enough to create .git subdirectory.
- Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command, Max Nikulin, 2024/03/05
- Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command, Ihor Radchenko, 2024/03/08
- Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command, Max Nikulin, 2024/03/09
- Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command, Ihor Radchenko, 2024/03/12
- Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command,
Max Nikulin <=
- Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command, Ihor Radchenko, 2024/03/15
- Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command, Max Nikulin, 2024/03/18
- Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command, Ihor Radchenko, 2024/03/19
- Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command, Ihor Radchenko, 2024/03/19
- Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command, Max Nikulin, 2024/03/19
- Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command, Ihor Radchenko, 2024/03/19
- fixup! and git, Max Nikulin, 2024/03/19
- Re: fixup! and git, Ihor Radchenko, 2024/03/19
- Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command, Ihor Radchenko, 2024/03/31