* 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 8:23 Alan Morgan
2018-03-10 21:29 ` Nicolas Goaziou
0 siblings, 1 reply; 2+ messages in thread
From: Alan Morgan @ 2018-02-19 8:23 UTC (permalink / raw)
To: emacs-orgmode
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
<<library>>
#+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
<<library>>
#+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 org-bibtex-open :store
org-bibtex-store-link)
("bbdb" :follow org-bbdb-open :export org-bbdb-export
:complete org-bbdb-complete-link :store
org-bbdb-store-link)
("w3m" :store org-w3m-store-link) ("file+sys")
("file+emacs")
("orgit-rev" :store orgit-rev-store :follow
orgit-rev-open :export orgit-rev-export)
("orgit-log" :store orgit-log-store :follow
orgit-log-open :export orgit-log-export)
("orgit" :store orgit-status-store :follow
orgit-status-open :export orgit-status-export)
("ipynb" :follow ein:org-open :help-echo
"Open ipython notebook." :store ein:org-store-link)
("doi" :follow org--open-doi-link)
("elisp" :follow org--open-elisp-link)
("file" :complete org-file-complete-link)
("ftp" :follow
(lambda (path) (browse-url (concat "ftp:" path))))
("help" :follow org--open-help-link)
("http" :follow
(lambda (path) (browse-url (concat "http:" path))))
("https" :follow
(lambda (path) (browse-url (concat "https:" path))))
("mailto" :follow
(lambda (path) (browse-url (concat "mailto:" path))))
("message" :follow
(lambda (path) (browse-url (concat "message:" path))))
("news" :follow
(lambda (path) (browse-url (concat "news:" path))))
("shell" :follow org--open-shell-link))
org-babel-load-languages '((shell . t) (python . t) (dot . t) (emacs-lisp . t))
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
org-confirm-babel-evaluate nil
)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: 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 8:23 noweb-ref within section property for emacs-lisp [9.0.3 (9.0.3-elpa @ /home/alanxoc3/.emacs.d/elpa/org-20161224/)] Alan Morgan
@ 2018-03-10 21:29 ` Nicolas Goaziou
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2018-03-10 21:29 UTC (permalink / raw)
To: Alan Morgan; +Cc: emacs-orgmode
Hello,
Alan Morgan <alanxoc3@gmail.com> 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
> <<library>>
> #+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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-10 21:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-19 8:23 noweb-ref within section property for emacs-lisp [9.0.3 (9.0.3-elpa @ /home/alanxoc3/.emacs.d/elpa/org-20161224/)] Alan Morgan
2018-03-10 21:29 ` 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).