From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Rettke Subject: Re: org-babel-detangle issue on 9.1.14 Date: Thu, 4 Oct 2018 10:19:00 -0500 Message-ID: References: <833272723.4259898.1538636915102.ref@mail.yahoo.com> <833272723.4259898.1538636915102@mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g85PZ-0001j7-BO for emacs-orgmode@gnu.org; Thu, 04 Oct 2018 11:19:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g85PV-0002pY-CL for emacs-orgmode@gnu.org; Thu, 04 Oct 2018 11:19:33 -0400 Received: from mail-lj1-f171.google.com ([209.85.208.171]:34076) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g85PV-0002ok-34 for emacs-orgmode@gnu.org; Thu, 04 Oct 2018 11:19:29 -0400 Received: by mail-lj1-f171.google.com with SMTP id f8-v6so8760810ljk.1 for ; Thu, 04 Oct 2018 08:19:28 -0700 (PDT) In-Reply-To: <833272723.4259898.1538636915102@mail.yahoo.com> 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: bknotwell@yahoo.com Cc: Org-mode On Thu, Oct 4, 2018 at 2:09 AM Brad Knotwell wrote: > I've been playing with org-babel-detangle and I've noticed something that's either a bug or a limitation. It's confusing enough that > it's worth writing down if it's expected. Basically, it doesn't work if there are variables defined in the begin_src header. I've > attached an example below. The first one won't detangle and the last two will. That is expected behavior. Org can only detangle the content of source blocks. It can't deduce how that source code got in there. Maybe this example says it better: #+begin_src sh sh :tangle hw.sh :var x=(random) :shebang #!/bin/sh :comments link echo $x #+end_src Tangles to #!/bin/sh # [[file:~/tmp/test.org::org_gcr_2018-10-04T08-35-43-05-00_cosmicality_CCEACAA2-A6B3-4FDD-9259-7F633316F0CE][org_gcr_2018-10-04T08-35-43-05-00_cosmicality_CCEACAA2-A6B3-4FDD-9259-7F633316F0CE]] x='422131055910453451' echo $x # org_gcr_2018-10-04T08-35-43-05-00_cosmicality_CCEACAA2-A6B3-4FDD-9259-7F633316F0CE ends here