From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladimir Lomov Subject: Header ':comments noweb' mangles lines in tangled code Date: Tue, 18 Mar 2014 15:29:12 +0900 Message-ID: <20140318062912.GD6077@smoon> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59220) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPnWc-0002CD-9p for emacs-orgmode@gnu.org; Tue, 18 Mar 2014 02:29:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPnWY-0008Gs-3H for emacs-orgmode@gnu.org; Tue, 18 Mar 2014 02:29:22 -0400 Received: from mail-la0-x22d.google.com ([2a00:1450:4010:c03::22d]:57552) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPnWX-0008Gg-Pa for emacs-orgmode@gnu.org; Tue, 18 Mar 2014 02:29:18 -0400 Received: by mail-la0-f45.google.com with SMTP id hr17so4429538lab.18 for ; Mon, 17 Mar 2014 23:29:16 -0700 (PDT) Received: from smoon ([141.105.52.108]) by mx.google.com with ESMTPSA id jh4sm6444053lbb.26.2014.03.17.23.29.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Mar 2014 23:29:15 -0700 (PDT) Content-Disposition: inline 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.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: General discussions about Org-mode Hello, consider the following example Org document: ------------------------------ 8< ------------------------------ #+TITLE: Example #+AUTHOR: Vladimir Lomov * How ~comments~ interferes with ~noweb~ #+NAME: code1 #+BEGIN_SRC sh var1 #+END_SRC #+NAME: code2 #+BEGIN_SRC sh [[ -t ${SHELL} ]] #+END_SRC #+BEGIN_SRC sh :noweb yes :tangle ex-sh.sh <> = <> <> && { echo "HELLO..." } #+END_SRC ** Now ~comments~ is on At first, ~comments~ is ~link~ #+BEGIN_SRC sh :noweb yes :tangle ex-c:link.sh :comments link <> = <> <> && { echo "HELLO..." } #+END_SRC Then ~comments~ is ~org~ #+BEGIN_SRC sh :noweb yes :tangle ex-c:org.sh :comments org <> = <> <> && { echo "HELLO..." } #+END_SRC Now ~comments~ is ~both~ #+BEGIN_SRC sh :noweb yes :tangle ex-c:both.sh :comments both <> = <> <> && { echo "HELLO..." } #+END_SRC And finally, ~comments~ is ~noweb~ #+BEGIN_SRC sh :noweb yes :tangle ex-c:noweb.sh :comments noweb <> = <> <> && { echo "HELLO..." } #+END_SRC ------------------------------ 8< ------------------------------ All combinations except ':comments noweb' give expected results, while the last one produces a file with mangled lines, --------------------- 8< ex-c:noweb.sh 8< ---------------------- # [[file:ex.org::*Now%20~comments~%20is%20on][Now\ ~comments~\ is\ on:4]] # [[file:~/tmp/ex.org::*How%20~comments~%20interferes%20with%20~noweb~][code1]] var1 # code1 ends here = # [[file:~/tmp/ex.org::*How%20~comments~%20interferes%20with%20~noweb~][code1]] <> = var1 <> = # code1 ends here # [[file:~/tmp/ex.org::*How%20~comments~%20interferes%20with%20~noweb~][code2]] [[ -t ${SHELL} ]] # code2 ends here && { echo "HELLO..." } # Now\ ~comments~\ is\ on:4 ends here ------------------------------ 8< ------------------------------ Is it expected behaviour meaning a limitation of ':comments noweb' or a bug? I'm using Org mode: Org-mode version 8.2.5h (release_8.2.5h-777-g5d8cc3 @/usr/share/emacs/site-lisp/org/) --- WBR, Vladimir Lomov -- My mother was a test tube; my father was a knife. -- Friday