* [PATCH] Consider verse/quote environments that end at eob.
@ 2010-06-15 15:20 David Maus
2010-06-15 15:20 ` [PATCH] Consider " David Maus
0 siblings, 1 reply; 3+ messages in thread
From: David Maus @ 2010-06-15 15:20 UTC (permalink / raw)
To: emacs-orgmode
Attached patch fixes an error when exporting a region with a verse or
quote block at the end. During preparation with
`org-export-mark-blockquote-verse-center' such a block ends at
end-of-buffer, i.e. without a newline after the #+end_ declaration.
`org-export-mark-blockquote-verse-center' assumes the end of the block
to be at the end of the line with the #+end_ declaration + 1, what
causes `delete-region' to fail when there this position is invalid.
Available at
git://github.com/dmj/dmj-org-mode.git quickfix
David Maus (1):
Consider environments that end at eob.
lisp/org-exp.el | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] Consider environments that end at eob.
2010-06-15 15:20 [PATCH] Consider verse/quote environments that end at eob David Maus
@ 2010-06-15 15:20 ` David Maus
2010-06-16 14:09 ` Bastien
0 siblings, 1 reply; 3+ messages in thread
From: David Maus @ 2010-06-15 15:20 UTC (permalink / raw)
To: emacs-orgmode
* org-exp.el (org-export-mark-blockquote-verse-center):
Consider environments that end at eob.
---
lisp/org-exp.el | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 915e1f5..502f253 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -1567,7 +1567,7 @@ These special cookies will later be interpreted by the backend."
(setq beg (match-beginning 0)
beg1 (1+ (match-end 0)))
(when (re-search-forward (concat "^[ \t]*#\\+end_" type "\\>.*") nil t)
- (setq end (1+ (point-at-eol))
+ (setq end (+ (point-at-eol) (if (looking-at "\n$") 1 0))
end1 (1- (match-beginning 0)))
(setq content (org-remove-indentation (buffer-substring beg1 end1)))
(setq content (concat "ORG-" (upcase t1) "-START\n"
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Consider environments that end at eob.
2010-06-15 15:20 ` [PATCH] Consider " David Maus
@ 2010-06-16 14:09 ` Bastien
0 siblings, 0 replies; 3+ messages in thread
From: Bastien @ 2010-06-16 14:09 UTC (permalink / raw)
To: David Maus; +Cc: emacs-orgmode
David Maus <dmaus@ictsoc.de> writes:
> * org-exp.el (org-export-mark-blockquote-verse-center):
> Consider environments that end at eob.
Applied, thanks.
--
Bastien
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-16 14:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-15 15:20 [PATCH] Consider verse/quote environments that end at eob David Maus
2010-06-15 15:20 ` [PATCH] Consider " David Maus
2010-06-16 14:09 ` Bastien
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.