emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] [PATCH] fix bug in org-exp-blocks, removing src code inden


From: Carsten Dominik
Subject: Re: [Orgmode] [PATCH] fix bug in org-exp-blocks, removing src code indentation
Date: Tue, 18 Aug 2009 06:36:07 +0100

Applied, thanks.

- Carsten

On Aug 17, 2009, at 9:49 PM, Eric Schulte wrote:

Hi,

Please apply the attached patch which replaces `indent-region' with
`indent-code-rigidly' in org-exp-blocks.  This fixes the problem of
indentation being removed from source-code blocks.

Thanks -- Eric

diff --git a/lisp/org-exp-blocks.el b/lisp/org-exp-blocks.el
index 6025ce7..8df0ac1 100644
--- a/lisp/org-exp-blocks.el
+++ b/lisp/org-exp-blocks.el
@@ -203,9 +203,8 @@ specified in BLOCKS which default to the value of
                                     ""
(apply func (save-match-data (org- remove-indentation (match-stri (split-string (match- string 3) " ")))) t t)
-                ;; indent the replaced match
- (indent-region (match-beginning 0) (match-end 0) indentation)
-                ))
+                ;; indent block
+ (indent-code-rigidly (match-beginning 0) (match-end 0) indentation)))
         (setf start (save-match-data (match-end 0))))
       (mapcar (lambda (type)
                 (interblock start (point-max) type))


_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode





reply via email to

[Prev in Thread] Current Thread [Next in Thread]