emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tom Gillespie <tgbugs@gmail.com>
To: Timothy <tecosaur@gmail.com>
Cc: sebastien.miquel@posteo.eu, emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: [Feature request] String escaped noweb expansion
Date: Sun, 2 May 2021 11:34:22 -0700	[thread overview]
Message-ID: <CA+G3_PO6OSLRgo2QkfCh9LGAf9u2i0bURTGuLQrA0XdWVx73UA@mail.gmail.com> (raw)
In-Reply-To: <87fsz59fuk.fsf@gmail.com>

Hi Sebastien,
    I have encountered issues with this before when trying to noweb code
into a string that was code to be sent via ssh. I ended up switching
to use typeset -f in bash in most cases now, but that is not possible
for other languages. Some languages also have enough different types
of syntax for strings that they can work around such cases, but again,
not all do.

One potential issue with this suggestion is how it would interact with
multi-line blocks, because you can't have anything on the same
starting line as the noweb expressions since it will be repeated in
front of every subsequent line.

This would also require each org-babel lang implementation to provide
a method for correctly string-escaping the nowebbed values (in some
cases e.g. shell this is decidedly non-trivial).

With all of these things in mind, I would thus suggest not trying to
overload the noweb operator for this purpose. Having a string escaped
equivalent would be nice, but because it requires more than just a
simple copy/paste into the buffer, it seems like it probably needs
separate notation. Best,

      parent reply	other threads:[~2021-05-02 18:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-02 16:24 Sébastien Miquel
2021-05-02 17:59 ` Timothy
2021-05-02 18:16   ` Sébastien Miquel
2021-05-02 18:32     ` Timothy
2021-05-02 18:34   ` Tom Gillespie [this message]

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:

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=CA+G3_PO6OSLRgo2QkfCh9LGAf9u2i0bURTGuLQrA0XdWVx73UA@mail.gmail.com \
    --to=tgbugs@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=sebastien.miquel@posteo.eu \
    --cc=tecosaur@gmail.com \
    --subject='Re: [Feature request] String escaped noweb expansion' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).