From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brett Viren Subject: Re: Indentation messed up after example block Date: Mon, 07 Jul 2014 12:09:18 -0400 Message-ID: References: <87pphhtnt4.fsf@mailbox.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4BUO-0007ap-Ub for emacs-orgmode@gnu.org; Mon, 07 Jul 2014 12:10:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X4BUK-0000OZ-0T for emacs-orgmode@gnu.org; Mon, 07 Jul 2014 12:10:00 -0400 Received: from smtpgw.bnl.gov ([2620:10a:0:3::30]:48677 helo=iron4.sec.bnl.local) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4BUJ-0000LY-Ru for emacs-orgmode@gnu.org; Mon, 07 Jul 2014 12:09:55 -0400 In-Reply-To: <87pphhtnt4.fsf@mailbox.org> (Alexander Baier's message of "Mon, 07 Jul 2014 13:23:35 +0200") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: York Zhao Cc: emacs-orgmode --=-=-= Content-Type: text/plain Hi, Alexander Baier writes: > On 2014-07-06 20:03 York Zhao wrote: ... >> #+BEGIN_EXAMPLE >> * Example at level one >> #+END_EXAMPLE >> >> Indentation is wrong. > > The asterisk followed by a space followed by text in your example block > is recognized by org as a headline. So org thinks everything under that > headline is the body of the headline. I hit this very problem recently and first assumed it must be a bug. But, since it's documented[1] I guess it's a "feature". Although one I don't immediately see a use for. I hit this when capturing some logging info which happened to have a line starting with a triple-*. Trying to manually find such offending lines in a large EXAMPLE block is too tedious to contemplate. A better way, which is implied by that footnote, is to use Org Src buffers when entering the content of EXAMPLE blocks in the first place. I do like: C-c' Where is me pasting or typing whatever is the content of the EXAMPLE block. This will not only indent the entire block with a couple of spaces but will "escape" the problematic headline asterisk with the "special syntax" comma. -Brett. [1] http://orgmode.org/manual/Literal-examples.html#fnd-4 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlO6xi4ACgkQEixH2Z0dKCxwfQCgjWWkYtumBAMnSAyvHtPBgBIy wfEAoJu2Q4yug6HphS/msO1vyVz2zfAF =ksuW -----END PGP SIGNATURE----- --=-=-=--