From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] fix bug in org-exp-blocks, removing src code indentation Date: Tue, 18 Aug 2009 06:36:07 +0100 Message-ID: <1D40F5EE-3FC1-4755-A36D-7BE4EB5AB1D2@gmail.com> References: Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MdHN2-0007bi-2i for emacs-orgmode@gnu.org; Tue, 18 Aug 2009 01:36:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MdHMx-0007aj-93 for emacs-orgmode@gnu.org; Tue, 18 Aug 2009 01:36:31 -0400 Received: from [199.232.76.173] (port=54180 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MdHMw-0007ae-Tm for emacs-orgmode@gnu.org; Tue, 18 Aug 2009 01:36:27 -0400 Received: from mail-bw0-f218.google.com ([209.85.218.218]:44463) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MdHMw-0006cr-DL for emacs-orgmode@gnu.org; Tue, 18 Aug 2009 01:36:26 -0400 Received: by bwz18 with SMTP id 18so2570720bwz.31 for ; Mon, 17 Aug 2009 22:36:15 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: Org Mode 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. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode