Re: [O] noweb-ref within section property for emacs-lisp [9.0.3 (9.0.3-elpa @ /home/alanxoc3/.emacs.d/elpa/org-20161224/)]

2018-03-10 Thread Nicolas Goaziou
Hello,

Alan Morgan  writes:

> The bug is fairly self explanatory. noweb-ref works fine in elisp when
> the argument is put in the code block, but it doesn't work when using
> the property section things. Here is a quick example (divided by lines):
>
> --
> This code block will give me an error,
> saying that the function wasn't defined or whatever. :(
>
> #+BEGIN_SRC emacs-lisp :noweb yes
> <>
> #+END_SRC
>
>
> * Testing the noweb-ref thing
>   :PROPERTIES:
>   :header-args:emacs-lisp: :noweb-ref library
>   :END:
>
>   I want these code blocks to be put together. But it don't work bro!
>
>#+BEGIN_SRC emacs-lisp
>  (defun do-something () (print "yes"))
>#+END_SRC
>
>#+BEGIN_SRC emacs-lisp
>  (defun do-something-else () (print "no"))
>#+END_SRC
>
> --

I cannot reproduce it with a recent Org. Could you update yours and try
again? Thank you.

Regards,

-- 
Nicolas Goaziou



[O] noweb-ref within section property for emacs-lisp [9.0.3 (9.0.3-elpa @ /home/alanxoc3/.emacs.d/elpa/org-20161224/)]

2018-02-19 Thread Alan Morgan
The bug is fairly self explanatory. noweb-ref works fine in elisp when
the argument is put in the code block, but it doesn't work when using
the property section things. Here is a quick example (divided by lines):

--
This code block will give me an error,
saying that the function wasn't defined or whatever. :(

#+BEGIN_SRC emacs-lisp :noweb yes
<>
#+END_SRC

* Testing the noweb-ref thing
  :PROPERTIES:
  :header-args:emacs-lisp: :noweb-ref library
  :END:

  I want these code blocks to be put together. But it don't work bro!

   #+BEGIN_SRC emacs-lisp
 (defun do-something () (print "yes"))
   #+END_SRC

   #+BEGIN_SRC emacs-lisp
 (defun do-something-else () (print "no"))
   #+END_SRC
--
This DOES work!! But it is too much typing.

#+BEGIN_SRC emacs-lisp :noweb yes
<>
#+END_SRC

* Testing the noweb-ref thing
   #+BEGIN_SRC emacs-lisp :noweb-ref library
 (defun do-something () (print "yes"))
   #+END_SRC

   #+BEGIN_SRC emacs-lisp :noweb-ref library
 (defun do-something-else () (print "no"))
   #+END_SRC
--

As far as I could tell, the noweb-ref thing worked fine with other
languages. It was just emacs.

And here is my emacs info:

Emacs  : GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
 of 2017-12-04
Package: Org mode version 9.0.3 (9.0.3-elpa @
/home/alanxoc3/.emacs.d/elpa/org-20161224/)

current state:
==
(setq
 org-id-locations-file "/home/alanxoc3/.emacs.d/.cache/.org-id-locations"
 org-src-lang-modes '(("dot" . graphviz-dot) ("ocaml" . tuareg)
  ("elisp" . emacs-lisp) ("ditaa" . artist)
  ("asymptote" . asy) ("sqlite" . sql)
  ("calc" . fundamental) ("C" . c) ("cpp" . c++)
  ("C++" . c++) ("screen" . shell-script) ("shell" . sh)
  ("bash" . sh))
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-clock-persist-file "/home/alanxoc3/.emacs.d/.cache/org-clock-save.el"
 org-speed-command-hook '(org-speed-command-default-hook
  org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-src-tab-acts-natively t
 org-imenu-depth 8
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-log-done 'time
 org-confirm-shell-link-function 'yes-or-no-p
 org-image-actual-width nil
 org-link-translation-function 'toc-org-unhrefify
 org-present-mode-hook '(spacemacs//org-present-start)
 org-agenda-restore-windows-after-quit t
 org-default-notes-file "notes.org"
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-show-block-all append
local]
   5]
 #[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-babel-show-result-all
append local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes
 spacemacs/load-yasnippet toc-org-enable org-download-enable
 org-bullets-mode spacemacs//org-babel-do-load-languages
 spacemacs/add-org-surrounds evil-org-mode org-eldoc-load
 spacemacs//init-company-org-mode company-mode)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-present-mode-quit-hook '(spacemacs//org-present-end)
 org-download-annotate-function 'org-download-annotate-default
 org-babel-tangle-lang-exts '(("python" . "py") ("emacs-lisp" . "el")
  ("elisp" . "el"))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-startup-with-inline-images t
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-babel-after-execute-hook '(spacemacs/ob-fix-inline-images)
 org-link-parameters '(("id" :follow org-id-open)
   ("rmail" :follow org-rmail-open :store
org-rmail-store-link)
   ("mhe" :follow org-mhe-open :store org-mhe-store-link)
   ("irc" :follow org-irc-visit :store org-irc-store-link)
   ("info" :follow org-info-open :export org-info-export
:store org-info-store-link)
   ("gnus" :follow org-gnus-open :store org-gnus-store-link)
   ("docview" :follow org-docview-open :export
org-docview-export :store org-docview-store-link)
   ("bibtex" :follow