emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Grant Rettke <gcr@wisdomandwonder.com>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Unexpected tanling behavior, is the following expected?
Date: Wed, 5 Nov 2014 11:02:49 -0600	[thread overview]
Message-ID: <CAAjq1mfZ4XLPQ3sURMU=qqgTKo20Bw8WSut6Htriv8QTHx6ERg@mail.gmail.com> (raw)

* 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

                 reply	other threads:[~2014-11-05 17:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAjq1mfZ4XLPQ3sURMU=qqgTKo20Bw8WSut6Htriv8QTHx6ERg@mail.gmail.com' \
    --to=gcr@wisdomandwonder.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).