all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Grant Rettke <gcr@wisdomandwonder.com>
To: bknotwell@yahoo.com
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: org-babel-detangle issue on 9.1.14
Date: Thu, 4 Oct 2018 10:19:00 -0500	[thread overview]
Message-ID: <CAAjq1mdfSAP6aYfimtf1GUCBu687y2wgokPPdMU2rR6eovbaSw@mail.gmail.com> (raw)
In-Reply-To: <833272723.4259898.1538636915102@mail.yahoo.com>

On Thu, Oct 4, 2018 at 2:09 AM Brad Knotwell <bknotwell@yahoo.com> 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

  reply	other threads:[~2018-10-04 15:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <833272723.4259898.1538636915102.ref@mail.yahoo.com>
2018-10-04  7:08 ` org-babel-detangle issue on 9.1.14 Brad Knotwell
2018-10-04 15:19   ` Grant Rettke [this message]
2018-10-04 15:51     ` Brad Knotwell
2018-10-05 20:06       ` Grant Rettke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAjq1mdfSAP6aYfimtf1GUCBu687y2wgokPPdMU2rR6eovbaSw@mail.gmail.com \
    --to=gcr@wisdomandwonder.com \
    --cc=bknotwell@yahoo.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.