From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: [BUG] R src blocks untabify literal constant TABs Date: Fri, 25 Sep 2015 12:25:38 -0700 Message-ID: References: <87r3low81u.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="0-1015572486-1443209139=:2073" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfYdP-0006So-3f for emacs-orgmode@gnu.org; Fri, 25 Sep 2015 15:26:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfYdL-00040y-Tt for emacs-orgmode@gnu.org; Fri, 25 Sep 2015 15:26:19 -0400 Received: from iport-acv2-out.ucsd.edu ([132.239.0.174]:36522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfYdL-000409-G2 for emacs-orgmode@gnu.org; Fri, 25 Sep 2015 15:26:15 -0400 In-Reply-To: <87r3low81u.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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou Cc: Org-Mode mailing list This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1015572486-1443209139=:2073 Content-Type: text/plain; format=flowed; charset=US-ASCII On Thu, 24 Sep 2015, Nicolas Goaziou wrote: > Hello, > > "Charles C. Berry" writes: > >> On Tue, 22 Sep 2015, Charles C. Berry wrote: >> >> Just to tie this up, this is an issue with `org-src-preserve-indentation', >> see >> >> (info "(org) Editing source code") >> >> for the best documentation. I found the "replace sequences of spaces with >> tab characters" for nil values confusing. The opposite is happening in >> this example. > > Would you want to write a documentation patch about it? > Attached is a patch. I think it is an improvement, but `org-src-preserve-indentation' behaves differently according to context, which makes it hard to document succinctly. In brief: Setting to `t' or `nil' will keep or allow removal of tabs in these functions: org-babel-parse-src-block-match org-babel-haskell-export-to-lhs org-babel-spec-to-string org-src--edit-element org-edit-src-code but have no effect on embedded tabs in org-babel-exp-process-buffer org-export-unravel-code org-element-src-block-interpreter org-element-example-block-interpreter org-fixup-indentation Also, as briefly noted in the doc/org.texi part of the patch global indent/outdent operations (e.g. org-metaright on a heading) are affected. This might make sense but sometimes the results surprise me. HTH, Chuck --0-1015572486-1443209139=:2073 Content-Type: text/plain; charset=US-ASCII; name=0001-org-src-preserve-indentation-docstring-and-info-fixe.patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: org-src-preserve-indentation docs patch Content-Disposition: attachment; filename=0001-org-src-preserve-indentation-docstring-and-info-fixe.patch RnJvbSAxMmE5MTJlOWNiYzFiMmI0NzU2MzJkZDcyNGNhNTVhZjU0YjU2MjM2 IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogQ2hhcmxlcyBCZXJy eSA8Y2NiZXJyeUB1Y3NkLmVkdT4NCkRhdGU6IEZyaSwgMjUgU2VwIDIwMTUg MTI6MDI6MzIgLTA3MDANClN1YmplY3Q6IFtQQVRDSF0gb3JnLXNyYy1wcmVz ZXJ2ZS1pbmRlbnRhdGlvbjogZG9jc3RyaW5nIGFuZCBpbmZvIGZpeGVzDQoN CmRvYy9vcmcudGV4aTogVGhlIGBMaXRlcmFsIGV4YW1wbGVzJyBub2RlIG1l bnRpb25zIHRoZSBlZmZlY3Qgb2YgdGhlDQoJICAgICAgYC1pJyBzd2l0Y2gg b24gZW1iZWRkZWQgdGFicy4NCg0KCSAgICAgIFRoZSBgRWRpdGluZyBzb3Vy Y2UgY29kZScgbm9kZSBjb3JyZWN0bHkgc3RhdGVzIHRoYXQNCgkgICAgICBz ZXR0aW5nIGBvcmctc3JjLXByZXNlcnZlLWluZGVudGF0aW9uJyB0byBgdCcg cHJldmVudHMN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