From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Re: [Babel] Small problem with tangling Date: Thu, 14 Oct 2010 17:17:40 -0600 Message-ID: <87mxqg8iuj.fsf@gmail.com> References: <80mxqirxf1.fsf@mundaneum.com> <87mxqinmff.fsf@gmail.com> <80aamhfcni.fsf@mundaneum.com> <87zkugg9m8.fsf@gmail.com> <804ocolsx4.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=42733 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P6X3U-00077A-H5 for emacs-orgmode@gnu.org; Thu, 14 Oct 2010 19:17:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P6X3T-0006LQ-9v for emacs-orgmode@gnu.org; Thu, 14 Oct 2010 19:17:48 -0400 Received: from mail-yw0-f41.google.com ([209.85.213.41]:37578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P6X3T-0006LM-6N for emacs-orgmode@gnu.org; Thu, 14 Oct 2010 19:17:47 -0400 Received: by ywh1 with SMTP id 1so137968ywh.0 for ; Thu, 14 Oct 2010 16:17:46 -0700 (PDT) In-Reply-To: <804ocolsx4.fsf@mundaneum.com> (=?utf-8?Q?=22S=C3=A9bastien?= Vauban"'s message of "Thu, 14 Oct 2010 17:01:43 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?utf-8?Q?S=C3=A9bastien?= Vauban Cc: emacs-orgmode@gnu.org Hi Seb, I fully agree with your point, I believe I've just pushed up a fix for this issue. This commit includes a short function with a long name `ob-tangle/no-excessive-id-insertion-on-tangle' in test-ob-tangle.el. Best -- Eric S=C3=A9bastien Vauban writes: > Hi Eric, > > "Eric Schulte" wrote: >> S=C3=A9bastien Vauban writes: >>> "Eric Schulte" wrote: >>>>> [...] empty first line that's always inserted at the beginning of the >>>>> file. What should I do to get rid of that first *empty* line? >>>> >>>> The following inhibits the insertion of blank lines on tangling. >>>> >>>> (setq org-babel-tangle-pad-newline nil) >>> >>> Of course, that does work as expected. Thanks for the tip. >>> >>> Another side-question about a little annoyance: when having just one src >>> block to tangle in a big file, and when tangling it, Org(-Babel?) does >>> first add IDs everywhere in my file, one for every section. >>> >>> Could we get rid of that? I don't even understand why one would be need= ed, >>> though I could easily "accept" (;-)) to see an ID created in the sectio= ns >>> containing elements to tangle. >> >> This is caused by the tangling code calling `org-store-link' on every co= de >> block, which is useful because we sometimes want to store links in the >> tangled code for jumping back from the code to the relevant place in the >> original org-mode file. > > I understand the need for creating links automatically to sections which = host > code blocks. > > However, I don't understand that tangling the *only* code block I have in= an > entire Org file does add ID in *every* section. Shouldn't it be limited to > sections hosting code blocks in general (in particular, IMHO, it should e= ven > be limited to the only sections that contain blocks to *tangle*)? > > >> `org-store-link' is called interactively, and it will insert ID values >> according to the value of `org-link-to-org-use-id', which defaults to >> `create-if-interactive-and-no-custom-id'. I suppose you could change the >> value of this variable which should avoid the insertion of custom IDs. > > I have the same value as you. > > I could try every of them, but -- from the doc -- I don't see any better > option for this. I want IDs to be created! It's only I'd like them to be > created for sections that need it... > > Best regards, > Seb