From mboxrd@z Thu Jan 1 00:00:00 1970 From: Austin Frank Subject: Re: org-export-sweave Date: Mon, 22 Sep 2008 18:18:00 -0400 Message-ID: References: <25FF1422-4BCE-4C55-B780-C8233ED9B4F7@uva.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KhtjM-0005KG-LE for emacs-orgmode@gnu.org; Mon, 22 Sep 2008 18:18:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KhtjL-0005JG-Pn for emacs-orgmode@gnu.org; Mon, 22 Sep 2008 18:18:08 -0400 Received: from [199.232.76.173] (port=36549 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KhtjL-0005J9-M9 for emacs-orgmode@gnu.org; Mon, 22 Sep 2008 18:18:07 -0400 Received: from qw-out-1920.google.com ([74.125.92.148]:8468) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KhtjL-00034j-Cy for emacs-orgmode@gnu.org; Mon, 22 Sep 2008 18:18:07 -0400 Received: by qw-out-1920.google.com with SMTP id 4so226145qwk.24 for ; Mon, 22 Sep 2008 15:18:05 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: emacs-orgmode@gnu.org --=-=-= 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. Carsten-- 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 buffer. #+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? Thanks, /au --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=org-sweave.patch 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 http://aufrank.net GPG Public Key (D7398C2F): http://aufrank.net/personal.asc --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--