From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] org.el: Preserve indentation of manually indented lines in example blocks. Date: Tue, 09 Aug 2011 11:18:27 +0200 Message-ID: <878vr3lz8c.fsf@gmail.com> References: <87sjpbmyb1.fsf@gmail.com> <87obzzmt2p.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:53959) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqiSf-0004Op-0g for emacs-orgmode@gnu.org; Tue, 09 Aug 2011 05:18:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QqiSd-00017x-1E for emacs-orgmode@gnu.org; Tue, 09 Aug 2011 05:18:56 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:37659) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqiSc-00017R-T2 for emacs-orgmode@gnu.org; Tue, 09 Aug 2011 05:18:54 -0400 Received: by wyi11 with SMTP id 11so253242wyi.0 for ; Tue, 09 Aug 2011 02:18:54 -0700 (PDT) In-Reply-To: ("Valentin =?utf-8?Q?W=C3=BCstholz=22's?= message of "Tue, 9 Aug 2011 07:42:46 +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: Valentin =?utf-8?Q?W=C3=BCstholz?= Cc: emacs-orgmode Hello, Valentin W=C3=BCstholz writes: > Sure. At least four use cases come to my mind for this: (a) literal > console output, (b) blocks of pseudo code (can't really use SRC blocks > since there is no actual language for this), (c) blocks of source code > in experimental or little known programming languages (ditto), and (d) > sketches of mathematical proofs or computations where you don't want > to mess with LaTeX typesetting (yet). I see (even though #d sounds strange). >>> What potential hassle were you thinking of? >> >> Being left with no more literal markup automatically indented. It's not >> that your idea is bad, but there could be users appreciating the current >> feature. > > I certainly thought about existing users, which is why by default > lines are is still indented like before. If you care about automatic > indentation, your example blocks are already indented like the > delimiters and the new behaviour keeps it just like that. If you > previously chose to indent you blocks differently, the new behaviour > will respect that decision by not messing with your indentation. Both situations are different from an user perspective. With the current behaviour, the only annoyance you encounter is that you cannot indent the whole buffer (or a region containing the block) automatically. But nothing prevents you from writing (and exporting) arbitrarily indented code. Sure, you won't get any indenting help in the process but it's the same as in your proposal. So all you have to do is basically refraining from using a global indentation tool. In your proposal, you still can write text with no indenting help. You can now indent the whole buffer, too. But there's one major problem. Suppose that you paste some badly indented text (from an external source) into an example block. You want to indent it properly... but it's now impossible. You have to fix indentation manually, line by line. To sum it up, in the first case, you only loose the ability to indent the whole buffer in one go (which isn't as bad as it sounds, since you can achieve that differently). In the second case, you get limited in your actions as you completely loose the ability to indent examples. I still think that's not fair. >> Perhaps this could be applied to verse blocks instead. > > As far as I recall verse blocks are treated somewhat differently from > example blocks by the exporter (e.g. verse vs verbatim in LaTeX). Indeed, but I think verses are closer to free text than examples and, as such, may not be subject to automatic indentation. Regards, --=20 Nicolas Goaziou