emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Carsten Dominik <carsten.dominik@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: Re: [BUG] nested blocks aren't protected on export
Date: Mon, 28 Jun 2010 12:59:16 -0700	[thread overview]
Message-ID: <87zkyf9be3.fsf@gmail.com> (raw)
In-Reply-To: <DE7399D3-4C34-48D1-85C5-4BE0996C4EDB@gmail.com> (Carsten Dominik's message of "Mon, 28 Jun 2010 18:21:31 +0200")

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

Carsten Dominik <carsten.dominik@gmail.com> writes:

[...]
>
> For now I don't see anything wrong with this.  The fastest
> way to find out is to put it into master and watch the list :-)
> Please go ahead and do that.
>

I think this patch may have uncovered a bug in the export preprocessing
which was previously being covered up by the over-eager comment pruning.

I've now got another patch [1] which fixes the bug in
`org-export-mark-blockquote-verse-center' which was leaving #+end_quote
lines littered in the pre-processed files.

If this looks good to you please do apply it, I'll run it locally in the
meantime to see if any unexpected behavior develops.

Thanks -- Eric

>
> Thanks.
>
> - Carsten

Footnotes: 
[1]  

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-exp-ensure-that-end_quote-lines-are-removed.patch --]
[-- Type: text/x-diff, Size: 1106 bytes --]

From 251647d34f599dd025bb08376c0a3eabac604c9d Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Mon, 28 Jun 2010 12:52:44 -0700
Subject: [PATCH] org-exp: ensure that #+end_quote lines are removed

* lisp/org-exp.el (org-export-mark-blockquote-verse-center): ensure
  that the end_quote line is removed during buffer preprocessing
---
 lisp/org-exp.el |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index f0c11d6..1cd8fc2 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -1569,7 +1569,8 @@ These special cookies will later be interpreted by the backend."
 	    beg1 (1+ (match-end 0)))
       (when (re-search-forward (concat "^[ \t]*#\\+end_" type "\\>.*") nil t)
 	(setq end (+ (point-at-eol) (if (looking-at "\n$") 1 0))
-	      end1 (1- (match-beginning 0)))
+	      end1 (save-excursion (goto-char (1- (match-beginning 0)))
+				   (point-at-bol)))
 	(setq content (org-remove-indentation (buffer-substring beg1 end1)))
 	(setq content (concat "ORG-" (upcase t1) "-START\n"
 			      content "\n"
-- 
1.7.0.4


[-- 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

  parent reply	other threads:[~2010-06-28 20:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-26  2:18 [BUG] nested blocks aren't protected on export Eric Schulte
2010-06-28  2:42 ` Eric Schulte
2010-06-28  6:37   ` Carsten Dominik
2010-06-28 15:04     ` Eric Schulte
2010-06-28 16:21       ` Carsten Dominik
2010-06-28 18:40         ` Eric Schulte
2010-06-28 19:59         ` Eric Schulte [this message]
2010-06-29  4:32           ` Carsten Dominik
2010-06-29  5:09             ` Eric Schulte
2010-06-28 15:07     ` Nicolas Goaziou
2010-06-28 15:30       ` Eric Schulte
2010-06-28 17:04         ` 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

  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=87zkyf9be3.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=carsten.dominik@gmail.com \
    --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).