emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Unexpected tanling behavior, is the following expected?
@ 2014-11-05 17:02 Grant Rettke
  0 siblings, 0 replies; only message in thread
From: Grant Rettke @ 2014-11-05 17:02 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

* Question

In another source file, I ran into an unexpected behavior where noweb
refs expanded
inside of source blocks are removing the closing round paren on the
line of where
the noweb-ref is expanded. I tried to reduce it to the simplest,
simplest possible
example while including all of the operational details. That attempt
is the following:

Should the closing round paren be removed in behavior A and why isn't
it removed in
behavior B? I ask because my config certainly could be causing this to happen!

I posted this file as-is because:
- It wouldn't make sense to lose the original source
- To post it as a gist would lose the history for the group archive

* Behavior A

#+NAME: message
#+begin_src emacs-lisp
"Hello, world."
#+end_src

#+begin_src emacs-lisp :tangle example.el
(print «message»)
#+end_src

* Behavior B

#+NAME: statement
#+begin_src emacs-lisp
(print "Hi, there.")
#+end_src

#+begin_src emacs-lisp :tangle example.el
(quote «statement»)
#+end_src

* Tangled output

#+begin_quote

;; [[file:~/tmp/example.org::*Behavior%20A][Behavior\ A:1]]

(print ;; [[file:~/tmp/example.org::*Behavior%20A][message]]
(print "Hello, world."
(print ;; message ends here)

;; Behavior\ A:1 ends here

;; [[file:~/tmp/example.org::*Behavior%20B][Behavior\ B:1]]

(quote ;; [[file:~/tmp/example.org::*Behavior%20B][statement]]
(quote (print "Hi, there.")
(quote ;; statement ends here)

;; Behavior\ B:1 ends here
#+end_quote

* Configuration

#+begin_src emacs-lisp
(print emacs-version)
#+end_src

#+NAME:
#+begin_example

"24.3.1"
#+end_example

#+begin_src emacs-lisp
(print org-version)
#+end_src

#+NAME:
#+begin_example

"8.2.8"
#+end_example

#+begin_src emacs-lisp
(print (pp-to-string org-babel-default-header-args))
#+end_src

#+NAME:
#+begin_example

"((:eval . \"always\")
 (:padline . \"yes\")
 (:noweb . \"no-export\")
 (:exports . \"both\")
 (:results . \"output replace\")
 (:comments . \"noweb\")
 (:session . \"none\")
 (:cache . \"no\")
 (:hlines . \"no\")
 (:tangle . \"no\"))
"
#+end_example

#+begin_src emacs-lisp
(print org-babel-noweb-wrap-start)
(print org-babel-noweb-wrap-end)
#+end_src

#+NAME:
#+begin_example

"«"

"»"
#+end_example

-- 
Grant Rettke
gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-11-05 17:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-05 17:02 Unexpected tanling behavior, is the following expected? Grant Rettke

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