emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Tangling flow control


From: Philip Hudson
Subject: Re: [O] Tangling flow control
Date: Wed, 9 Nov 2016 22:59:23 +0000

On 9 November 2016 at 21:41, Charles C. Berry <address@hidden> wrote:
> The org src block is just a container. Its body is a src block template that
> gets copied into the variable `tmpl', which if filled and placed in file can
> be tangled.

That makes sense, but it seems to conflict with what you illustrate:

#+RESULTS:
#+BEGIN_src org
,#+BEGIN_SRC shell :tangle abc.sh
ls -lt my-dir
,#+END_SRC
#+END_src

I'd expect/want:

#+RESULTS:
#+BEGIN_SRC shell :tangle abc.sh
ls -lt my-dir
#+END_SRC

Wouldn't I?


> Alternatively, you can eval (setq tmpl "<template string>") somewhere (maybe
> in a local variables block), where the <template string> part is the
> template.
>
> But it seems easier to edit the template as an org src block - C-c ' puts
> your template in an OrgSrc buffer, then moving point to a src block and
> typing M-x org-edit-src-code puts its body in another OrgSrc buffer where
> you can edit it in the shell-mode or whatever mode.
>
> Also, I suppose that template should have been an ssh-config src block to
> conform with your earlier posting. But I think you get the idea.

Yes, that's no problem, I adapt it mutatis mutandum.

-- 
Phil Hudson                  http://hudson-it.ddns.net
Pretty Good Privacy (PGP) ID: 0x887DCA63



reply via email to

[Prev in Thread] Current Thread [Next in Thread]