emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Johannes Dahl <muusik@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-babel prepends <<noweb>> expansions with the prefix of the <<tag>>? Can this be turned off?
Date: Tue, 25 Feb 2020 09:00:13 +0200	[thread overview]
Message-ID: <CAHuokSajt=x2eWx=WFQcj4itMoNmRoEkN3O2gFxv+bPX++H5rw@mail.gmail.com> (raw)
In-Reply-To: <CA+A2iZakT25oEQgW-es-vvoBuV=onPt36-QpedKg9SQXo2CVZg@mail.gmail.com>

Hi,

That's a fun coincidence, I ran into this behaviour a couple of days
ago as well. For anyone wondering why one would want to comment out
their noweb tags but still expect them to result in uncommented code
expansion: if one is to edit a source block containing Noweb tags, the
emacs mode for that programming language might interpret those tags in
an unexpected way and give a messy result, e.g. in my case with
LilyPond, mess up the indentation of the rest of the code block.

Luckily, Noweb tag syntax is configurable using
org-babel-noweb-wrap-start and org-babel-noweb-wrap-end. Thus, the way
I worked around this was to define, for the file containing LilyPond
code blocks, org-babel-noweb-wrap-start as "%<<", % being LilyPond's
comment symbol. But I still wonder if there is a better way.

Cheers,
Johannes

On Tue, 25 Feb 2020 at 04:10, Vladimir Nikishkin <lockywolf@gmail.com> wrote:
>
> Hello, everyone
>
> I have the following case:
>
> #+name: test1
> #+begin_src shell
> LINE to comment
> LINE to not comment
> #+end_src
>
> #+begin_src shell
>   #<<test1>>
> #+end_src
>
> When I expand it, I get:
> #LINE to comment
> #LINE to not comment
>
> That's not entirely what I want. Can this behaviour be switched off somehow?
>
> --
> Yours sincerely, Vladimir Nikishkin
>

  reply	other threads:[~2020-02-25  7:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25  2:09 org-babel prepends <<noweb>> expansions with the prefix of the <<tag>>? Can this be turned off? Vladimir Nikishkin
2020-02-25  7:00 ` Johannes Dahl [this message]
2020-02-25  7:11   ` Johannes Dahl
2020-09-07  4:33 ` Bastien
2020-09-10  9:21   ` Vladimir Nikishkin

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

  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='CAHuokSajt=x2eWx=WFQcj4itMoNmRoEkN3O2gFxv+bPX++H5rw@mail.gmail.com' \
    --to=muusik@gmail.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 public inbox

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

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).