Hello,

Neil Jerram <n...@ossau.homelinux.net> writes:

> With this Org source:
>
> #+BEGIN_SRC sh
> {
>     cat <<EOF
>   failsafeInboundHostPorts:
> EOF
> }
> #+END_SRC
>
> With `C-c C-e h h', to export that as HTML, I get:
>
> Debugger entered--Lisp error: (args-out-of-range #<buffer  *temp*> 0 1)
>   parse-partial-sexp(1 0)
>   syntax-ppss(0)
>   sh--inside-noncommand-expression(0)
>   sh--inside-noncommand-expression(10)
>   sh-font-lock-open-heredoc(10 "EOF" 16)
>   sh-syntax-propertize-function(1 50)
>   syntax-propertize(50)
>   font-lock-fontify-syntactically-region(1 50 nil)
>   font-lock-default-fontify-region(1 50 nil)
>   font-lock-fontify-region(1 50 nil)
>   font-lock-default-fontify-buffer()

This issue doesn't seem related to Org. You can try inserting the code
above in an sh-mode buffer and observe that Emacs has trouble fontifying
the buffer properly.

As you noticed, inserting a space or a newline at the beginning of the
buffer seems to help.

Regards,

-- 
Nicolas Goaziou

Reply via email to