emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Re: [BUG] Noweb reference eval syntax does not work
@ 2016-08-04 21:11 Karsten Schmidt
  2016-08-05  2:25 ` Charles C. Berry
  0 siblings, 1 reply; 11+ messages in thread
From: Karsten Schmidt @ 2016-08-04 21:11 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,

sorry for coming in super late to this thread, but I'd like to make a
plea to *not* deprecate the :noweb-ref header arg.

On 12 May 2016 at 19:35:15, Aaron Ecay wrote:

> To put it another way: it seems to me that the functionality of
> :noweb-ref can be reimplemented in terms of other primitives.  And given
> Nicolas’s comments about the complications and bugs it introduces, I’d
> be in favor of deprecating and eventually removing it.

I've been investing thousands of hours over the past years to author
several largish opensource projects (~40,000 SLOC total) exclusively
in org-mode, using hundreds of code blocks with :noweb-ref headers,
all of which would have to be replaced, re-tangled and the resulting
code re-tested, often manually... Maybe some of this could be
automated, but in any way it'll be a pretty large undertaking, which
I'd like to avoid, if possible...

I also think, having a feature deprecation like this should require a
major version change (depending how one interprets semantic
versioning) of org-mode (e.g v9.0.0). Already, I often struggle
convincing users of my libs that authoring libraries in org-mode is
better than in plain vanilla source code, but I think it'd be wrong to
not just force a non-standard tool, but then also specific versions of
that tool in order for people to help contributing.

Finally, and in summary, I never ever had a single issue w/
:noweb-refs and they're by far in my top 3 favourite org-mode
features... Please don't kill 'em!

Just my two pence...

K.
-- 
Karsten Schmidt
http://thi.ng | http://postspectacular.com | http://toxiclibs.org

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [BUG] Noweb reference eval syntax does not work
@ 2016-05-05 21:39 fm4d
  2016-05-08  9:26 ` Nicolas Goaziou
  0 siblings, 1 reply; 11+ messages in thread
From: fm4d @ 2016-05-05 21:39 UTC (permalink / raw)
  To: emacs-orgmode


The noweb reference syntax that should insert results of
evaluation of src block itself instead of src block as
described in `org-babel-expand-noweb-reference` does not
seems to work.


Code for replication:

* Assign 

First we assign abc:

#+begin_src python :noweb-ref assign_abc
abc = "abc" + "def"
#+end_src

* Use

Then we use it in a function:

#+begin_src python :noweb tangle :tangle noweb-test.py
def x():
  <<assign_abc>>
  return abc

print(x())
#+end_src


<<assign_abc>> does work, <assign_abc()> fails with this error:

(error "Reference ‘assign_abc’ not found in this buffer")
  signal(error ("Reference ‘assign_abc’ not found in this buffer"))
  error("Reference `%s' not found in this buffer" "assign_abc")
  org-babel-ref-resolve("assign_abc()")
  ...


I am not sure if this is a bug or I am doing something wrong,
the documentation on this feature is not very comprehensive.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-08-05  2:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-04 21:11 [BUG] Noweb reference eval syntax does not work Karsten Schmidt
2016-08-05  2:25 ` Charles C. Berry
  -- strict thread matches above, loose matches on Subject: below --
2016-05-05 21:39 fm4d
2016-05-08  9:26 ` Nicolas Goaziou
2016-05-08 12:57   ` Rasmus
2016-05-08 16:32     ` Thomas S. Dye
2016-05-11 21:34       ` Nicolas Goaziou
2016-05-11 22:40         ` Samuel Wales
2016-05-11 23:19         ` Charles C. Berry
2016-05-12 23:35     ` Aaron Ecay
2016-05-15 22:40       ` Nicolas Goaziou

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