From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: [PATCH] comments exporting
Date: Mon, 14 Jun 2010 22:07:35 +0200 [thread overview]
Message-ID: <87iq5ltm2g.wl%n.goaziou@gmail.com> (raw)
In-Reply-To: <87mxuxiixc.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1123 bytes --]
>>>>> Eric Schulte writes:
> A potentially related issue,
> The following org-mode snippet doesn't export correctly to latex,
> presumably because of protection issues similar to those addressed in
> your patch. Any ideas?
> --8<---------------cut here---------------start------------->8---
> ** comments not commented
> # $some stuff
> # some more stuff$ -- I should be a comment line
> --8<---------------cut here---------------end--------------->8---
Yes.
Actually, the latex stuff is processed before taking care of comments
(one of the last actions in every exporter). So the $...$ snippet is
matched by org-latex and protected.
This patch removes protection check from comment deletion : something
in comment must not be exported anyway. I don't see any corner case
right now.
>> This patch looks great. Since it's >10 lines long, I must ask if you've
>> signed the FSF papers for contributions to Emacs? If not is that
>> something you're willing to do?
I have sent the signed papers last Wednesday (I had to since my patch
for org-babel-asymptote). I'm now waiting for their mail.
Regards,
--
Nicolas
[-- Attachment #2: 0001-Fix-comments-export-in-latex.patch --]
[-- Type: application/octet-stream, Size: 1456 bytes --]
From 39ba2f56b2e865c3c73352184aa9b7e891e09a5c Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Mon, 14 Jun 2010 21:54:08 +0200
Subject: [PATCH] Fix comments export in latex.
* lisp/org-exp.el: comment regexp now matches documentation. No more
protection check when deleting comments before export.
---
lisp/org-exp.el | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 915e1f5..25ec663 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -1637,7 +1637,7 @@ table line. If it is a link, add it to the line containing the link."
"Remove comments, or convert to backend-specific format.
COMMENTSP can be a format string for publishing comments.
When it is nil, all comments will be removed."
- (let ((re "^\\(#\\|[ \t]*#\\+\\)\\(.*\n?\\)")
+ (let ((re "^\\(#\\|[ \t]*#\\+ \\)\\(.*\n?\\)")
pos)
(goto-char (point-min))
(while (or (looking-at re)
@@ -1649,9 +1649,8 @@ When it is nil, all comments will be removed."
(match-beginning 0) (match-end 0) '(org-protected t))
(replace-match (format commentsp (match-string 2)) t t))
(goto-char (1+ pos))
- (org-if-unprotected
- (replace-match "")
- (goto-char (max (point-min) (1- pos))))))))
+ (replace-match "")
+ (goto-char (max (point-min) (1- pos)))))))
(defun org-export-mark-radio-links ()
"Find all matches for radio targets and turn them into internal links."
--
1.7.1
[-- Attachment #3: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next prev parent reply other threads:[~2010-06-14 20:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-13 23:25 [PATCH] lists and exportation to latex Nicolas Goaziou
2010-06-14 7:40 ` Nicolas Goaziou
2010-06-14 17:32 ` Eric Schulte
2010-06-14 18:10 ` Eric Schulte
2010-06-14 20:07 ` Nicolas Goaziou [this message]
2010-06-14 21:36 ` [PATCH] comments exporting Eric Schulte
2010-06-15 13:03 ` Nicolas Goaziou
2010-06-15 15:48 ` Eric Schulte
2010-06-15 16:32 ` Nicolas Goaziou
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87iq5ltm2g.wl%n.goaziou@gmail.com \
--to=n.goaziou@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=schulte.eric@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.