From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shaun Richardson Subject: Feature Request - Comments in noweb expansions Date: Thu, 13 Nov 2014 19:52:20 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113d5a6e85b6b30507c12c6c Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoyZC-0002j6-Vs for emacs-orgmode@gnu.org; Thu, 13 Nov 2014 12:52:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XoyZB-0005eu-Ss for emacs-orgmode@gnu.org; Thu, 13 Nov 2014 12:52:22 -0500 Received: from mail-oi0-x22b.google.com ([2607:f8b0:4003:c06::22b]:38949) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoyZB-0005dv-Nh for emacs-orgmode@gnu.org; Thu, 13 Nov 2014 12:52:21 -0500 Received: by mail-oi0-f43.google.com with SMTP id e131so10767916oig.16 for ; Thu, 13 Nov 2014 09:52:20 -0800 (PST) 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: emacs-orgmode@gnu.org --001a113d5a6e85b6b30507c12c6c Content-Type: text/plain; charset=UTF-8 Hello orgmode community! using ":comments org" as a header argument to a code block allows the header and text above the code block to be inserted into the tangled file as comments. Very awesome. This does not work for noweb reference expansions however. For example, given the following org mode file: --8<---------------cut here---------------start------------->8--- * File Description :PROPERTIES: :comments: org :tangle: file.sh :noweb: yes :END: ** A function call This is foo #+BEGIN_SRC sh :noweb-ref myfunction :tangle no hello_world() #+END_SRC ** Additional info This is bar #+BEGIN_SRC sh :noweb yes hello_person() <> #+END_SRC --8<---------------cut here---------------end--------------->8--- When I tangle the file with C-c C-v t, my expectation would be the following result. --8<---------------cut here---------------start------------->8--- # Additional info # This is bar hello_person() # A function call # This is foo hello_world() --8<---------------cut here---------------end--------------->8--- But this isn't what happens, The comment from the myfunction noweb-ref is stripped from the final result and it looks like this. --8<---------------cut here---------------start------------->8--- # Additional info # This is bar hello_person() hello_world() --8<---------------cut here---------------end--------------->8--- Is there a native way to get this behaviour or do I advise org-babel-expand-noweb-references? I am keen to hack a patch myself, would just appreciate a pointer in the right direction. (drowning in org-mode code) First time poster. -- Thanks Gambo --001a113d5a6e85b6b30507c12c6c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello orgmode community!

usi= ng ":comments org" as a header argument to a code block allows th= e header and text above the code block to be inserted into the tangled file= as comments. Very awesome.=C2=A0

This does not wo= rk for noweb reference expansions however.
For example, given the= following org mode file:
--8<---------------cut here---------= ------start------------->8---=C2=A0
* File Description
=C2=A0 :P= ROPERTIES:
=C2=A0 :comments: org
=C2=A0 :tangle: =C2=A0 file.sh
= =C2=A0 :noweb: yes
=C2=A0 :END:

** A function call
This is foo=
#+BEGIN_SRC sh :noweb-ref myfunction :tangle no
hello_world()
#+E= ND_SRC

** Additional info
This is bar
#+BEGIN_SRC sh :noweb ye= s
=C2=A0 hello_person()
=C2=A0 <<myfunction>>
#+END_SR= C
--8<---------------cut here---------------end--------------->8--= -

When I tangle the file with C-c C-v t, my expectation would = be the following result.

--8<---------------cut here------= ---------start------------->8---
# Additional info
# This is bar
hello_person()

# A function call
# This is foo

hello= _world()
--8<---------------cut here---------------end---------------= >8---

But this isn't what happens, The comment from th= e myfunction noweb-ref is stripped from the final result and it looks like = this.

--8<---------------cut here---------------start-----= -------->8---
# Additional info
# This is bar

hello_person(= )
hello_world()
--8<---------------cut here---------------end-----= ---------->8---

Is there a native way to get this behaviou= r or do I advise org-babel-expand-noweb-references?
I am ke= en to hack a patch myself, would just appreciate a pointer in the right dir= ection. (drowning in org-mode code)
First time poster.
=
--
Thanks
Gambo
--001a113d5a6e85b6b30507c12c6c--