emacs-orgmode
[Top][All Lists]
Advanced

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

Re: org-babel prepends <<noweb>> expansions with the prefix of the <<tag


From: Johannes Dahl
Subject: Re: org-babel prepends <<noweb>> expansions with the prefix of the <<tag>>? Can this be turned off?
Date: Tue, 25 Feb 2020 09:11:53 +0200

Having re-read Vladimir's original question, it looks like I may have
misunderstood it at first. Now I'm wondering: What's the use case for
referencing a code block but commenting out the first line?


On Tue, 25 Feb 2020 at 09:00, Johannes Dahl <address@hidden> wrote:
>
> 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 <address@hidden> 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 via email to

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