zenitani / elisp

15 stars 10 forks source link

File names need shell escaping #2

Open boramalper opened 9 years ago

boramalper commented 9 years ago

Hello,

if you try to compile a file which has space or other special characters (such as parantheses), bash errors and compilation fails. We need to escape file names so that bash can handle them properly.

I don't know elisp, so I can't help anymore. :(

Cheers, Bora

zenitani commented 9 years ago

In the smart-compile code, we have to further escape the shell-escaped strings in an emacs-lisp manner. This will be tricky. I recommend to avoid white spaces or special characters.

boramalper commented 9 years ago

Maybe this can help? How to invoke env from eLisp and escape the path to the target program properly?

zenitani commented 9 years ago

I tried (shell-quote-argument... but it interferes with something. Does '%f' instead of %f work for you?

cweiske commented 2 years ago

No, '%f' does not help.

cweiske commented 2 years ago

What helps is \"%f\":

(add-to-list 'smart-compile-alist '("tagebuch/raw/.*\\.htm$" . "../update-file.php \"%F\""))