emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Austin Frank <austin.frank@gmail.com>
To: Carsten Dominik <dominik@uva.nl>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-export-sweave
Date: Mon, 22 Sep 2008 18:18:00 -0400	[thread overview]
Message-ID: <m0od2fzuxz.fsf@gmail.com> (raw)
In-Reply-To: B85465EE-1160-46BB-9558-AD021AC8F21B@uva.nl

[-- Attachment #1: Type: text/plain, Size: 900 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-sweave.patch --]
[-- Type: text/x-patch, Size: 741 bytes --]

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")

[-- Attachment #3: Type: text/plain, Size: 100 bytes --]


   
-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc

[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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

  reply	other threads:[~2008-09-22 22:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-01 13:19 org-export-sweave Austin Frank
2008-09-16 12:41 ` org-export-sweave Carsten Dominik
2008-09-17 18:44   ` org-export-sweave Austin Frank
2008-09-18  8:58     ` org-export-sweave Carsten Dominik
2008-09-22 22:18       ` Austin Frank [this message]
2008-09-23  6:14         ` org-export-sweave Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m0od2fzuxz.fsf@gmail.com \
    --to=austin.frank@gmail.com \
    --cc=dominik@uva.nl \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).