emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] fix bug in org-exp-blocks, removing src code indentation
Date: Tue, 18 Aug 2009 06:36:07 +0100	[thread overview]
Message-ID: <1D40F5EE-3FC1-4755-A36D-7BE4EB5AB1D2@gmail.com> (raw)
In-Reply-To: <m2r5va88sl.fsf@gmail.com>

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

      reply	other threads:[~2009-08-18  5:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-17 20:49 [PATCH] fix bug in org-exp-blocks, removing src code indentation Eric Schulte
2009-08-18  5:36 ` Carsten Dominik [this message]

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=1D40F5EE-3FC1-4755-A36D-7BE4EB5AB1D2@gmail.com \
    --to=carsten.dominik@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 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).