From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Dahl Subject: Re: org-babel prepends <> expansions with the prefix of the <>? Can this be turned off? Date: Tue, 25 Feb 2020 09:11:53 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:38486) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6UNz-00006t-Mw for emacs-orgmode@gnu.org; Tue, 25 Feb 2020 02:12:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6UNy-0004yi-N3 for emacs-orgmode@gnu.org; Tue, 25 Feb 2020 02:12:07 -0500 Received: from mail-io1-xd29.google.com ([2607:f8b0:4864:20::d29]:33096) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6UNy-0004ya-J1 for emacs-orgmode@gnu.org; Tue, 25 Feb 2020 02:12:06 -0500 Received: by mail-io1-xd29.google.com with SMTP id z8so1189132ioh.0 for ; Mon, 24 Feb 2020 23:12:06 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" Cc: emacs-orgmode@gnu.org 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 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 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 > > #<> > > #+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 > >