[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: org-export-sweave

From: Austin Frank
Subject: [Orgmode] Re: org-export-sweave
Date: Mon, 22 Sep 2008 18:18:00 -0400
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (darwin)

On Thu, Sep 18 2008, Carsten Dominik wrote:

> These regular expressions are incorrect. \\s- is the way to denote
> whitespace.  However, since that also includes newlines, I prefer to
> write "[ \t]" in such cases.


Thanks for the tip.  I now to get dumped into r-mode correctly when I
hit C-c ' inside the regions defined in the attached patch.  There's one
annoying quirk left, though.

When coming out of r-mode by hitting C-c ' in the Org Edit Src Example
buffer, the line that ends the example (#+latex:  \end{Scode}) is
concatenated to the last line of the source code, regardless of how many
new lines are included at the end of the source code in the temporary

   #+latex: \begin{Scode}
   a <- 3
   #+latex: \end{Scode}

goes to

   #+latex: \begin{Scode}
   a <- 3#+latex: \end{Scode}

Any suggestions on how to preserve the formatting of the end marker?


diff --git a/lisp/org.el b/lisp/org.el
index 3143e13..75f25f8 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5562,6 +5562,8 @@ the language, a switch telling of the content should be 
in a single line."
           ("^#\\+begin_example.*\n" "^#\\+end_example" "fundamental")
           ("^#\\+html:" "\n" "html" single-line)
           ("^#\\+begin_html.*\n" "\n#\\+end_html" "html")
+           ("^[ \t]*\\\\begin{scode}\\({.*}\\)?\\s-+" "^[ 
\t]*\\\\end{scode}\\({.*}\\)?\\s-+" "r")
+          ("^#\\+latex:[ \t]*\\\\begin{scode}\\({.*}\\)?\\s-+" "^#\\+latex:[ 
\t]*\\\\end{scode}\\({.*}\\)?\\s-+" "r")
           ("^#\\+begin_latex.*\n" "\n#\\+end_latex" "latex")
           ("^#\\+latex:" "\n" "latex" single-line)
           ("^#\\+begin_ascii.*\n" "\n#\\+end_ascii" "fundamental")
Austin Frank
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc

reply via email to

[Prev in Thread] Current Thread [Next in Thread]