On 2013-03-01 05:44 +0100, Daniel Dickinson wrote:

> Package: elserv
> Version: 0.4.0+0.20011203cvs-17.1
> Followup-For: Bug #701949
>
> Upon googling (well really duckduckgo) I discovered that heredocs (e.g
> the cat << EOF >path.el) are lazy evaluated in bash, which I think
> means the parentheses get evaluated before the cat, which screws up
> the heredoc (empty).

I'm not sure what you mean by "lazy evaluated", but maybe it's the fact
that the text in the heredoc is subject to parameter expansion, command
substitution and arithmetic expansion.  Those does not occur here.

> In any event replacing there heredoc with echo "
> ( setq ... )
> " >path.el works around the issue.

You would need to use single quotes then, since double quotes occur in
the text.

Does the following script work for you?  If not, can you run it under
"strace -f" to see what goes wrong?

#!/bin/bash

cat << EOF
(setq load-path (cons "." load-path) byte-compile-warnings nil)
EOF
Cheers,
       Sven

Reply via email to