From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonas Bernoulli Subject: Re: Something like #+BIND but for the destination buffer Date: Sat, 14 Jan 2017 18:47:40 +0100 Message-ID: References: <874m1krwk5.fsf@nicolasgoaziou.fr> <877f5xaedv.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1140e7e63213a40546118ddd Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cSSQs-0001Yy-MO for emacs-orgmode@gnu.org; Sat, 14 Jan 2017 12:48:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cSSQr-0001Gp-NN for emacs-orgmode@gnu.org; Sat, 14 Jan 2017 12:48:02 -0500 Received: from mail-io0-x22b.google.com ([2607:f8b0:4001:c06::22b]:35231) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cSSQr-0001Gj-Gw for emacs-orgmode@gnu.org; Sat, 14 Jan 2017 12:48:01 -0500 Received: by mail-io0-x22b.google.com with SMTP id j18so65865913ioe.2 for ; Sat, 14 Jan 2017 09:48:01 -0800 (PST) In-Reply-To: <877f5xaedv.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: Org-Mode mailing list , "Charles C. Berry" --001a1140e7e63213a40546118ddd Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I did notice myself that the two-space indentation for blocks that are part of a list element are reserved and also that one can do what you are suggesting here to keep the code-block as part of the list item while at the same time not get those two extra spaces. (By the way, I don't like that work-around.) However for me that's what happened for example blocks only. For source blocks I got an additional five spaces, for which I found no explanation. (The only indentation in the Org source before the code-block lines are the two part-of-a-list-element spaces.) On Sat, Jan 14, 2017 at 3:46 PM, Nicolas Goaziou wrote: > Hello, > > Jonas Bernoulli writes: > > > This seemed promising at first but let to all kinds of strange behavior= . > > Code-blocks that are part of a list item turned out to particularly > > painful, as here "Finally, you can use =E2=80=98-i=E2=80=99 to preserve= the indentation > of > > a specific code block" means that an additional five (if I remember > > correctly) spaces appear out of nowhere (only for code-blocks, > > example-blocks behaved as expected (or at least in an reasonable > > way)). > > With -i, indentation is taken from column 0, so the five spaces didn't > come out of nowhere, but probably from the indentation you gave to the > contents of the source block, which is not necessary. E.g., > > - Some list item > > #+BEGIN_SRC emacs-lisp -i > This is the code, and it will not break list > #+END_SRC > > > Regards, > > -- > Nicolas Goaziou > --001a1140e7e63213a40546118ddd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I did notice myself that the two-space indentation for blo= cks that are part of a list element are reserved and also that one can do w= hat you are suggesting here to keep the code-block as part of the list item= while at the same time not get those two extra spaces. (By the way, I don&= #39;t like that work-around.)

However for me that's = what happened for example blocks only. For source blocks I got an additiona= l five spaces, for which I found no explanation. (The only indentation in t= he Org source before the code-block lines are the two part-of-a-list-elemen= t spaces.)

On Sat, Jan 14, 2017 at 3:46 PM, Nicolas Goaziou <= ;mail@nicolasgo= aziou.fr> wrote:
Hello,

Jonas Bernoulli <jonasbernou= lli@gmail.com> writes:

> This seemed promising at first but let to all = kinds of strange behavior.
> Code-blocks that are part of a list item turned out to particularly > painful, as here "Finally, you can use =E2=80=98-i=E2=80=99 to pr= eserve the indentation of
> a specific code block" means that an additional five (if I rememb= er
> correctly) spaces appear out of nowhere (only for code-blocks,
> example-blocks behaved as expected (or at least in an reasonable
> way)).

With -i, indentation is taken from column 0, so the five spaces didn= 't
come out of nowhere, but probably from the indentation you gave to the
contents of the source block, which is not necessary. E.g.,

- Some list item

=C2=A0 #+BEGIN_SRC emacs-lisp -i
This is the code, and it will not break list
=C2=A0 #+END_SRC


Regards,

--
Nicolas Goaziou

--001a1140e7e63213a40546118ddd--