emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Myles English <mylesenglish@gmail.com>
Cc: Emacs-orgmode <Emacs-orgmode@gnu.org>
Subject: Re: [new exporter] two unexpected behaviours of an #+INCLUDEd #+call
Date: Sun, 28 Oct 2012 16:27:07 +0100	[thread overview]
Message-ID: <87zk36r510.fsf@gmail.com> (raw)
In-Reply-To: <87bofzrf85.fsf@ed.ac.uk> (Myles English's message of "Thu, 18 Oct 2012 16:07:22 +0100")

Hello,

"Myles English" <mylesenglish@gmail.com> writes:

> Given the situation below, I would expect that the block named xxx
> would never be evaluated:
>
> #--------------------- file b.org -------------------
> #+TITLE:     b.org
> #+EXPORT_SELECT_TAGS: export
> #+EXPORT_EXCLUDE_TAGS: noexport
>
> * A heading            	   :noexport:
>
> #+INCLUDE: "c.org"
>
> #--------------------- file c.org -------------------
> * A Heading in c.org
> #+name: xxx
> #+BEGIN_SRC sh
> echo "Evaluated" > c.out #+END_SRC
>
> #+call: xxx()
>
> #----------------------------------------------------

:noexport: doesn't mean Babel blocks within shouldn't be evaluated. It
just means contents will eventually be ignored.

> And maybe it isn't evaluated but the call is still processed to some
> extent upon latex export:
>
> #+BEGIN_SRC sh :shebang "#!/usr/bin/env bash" :tangle eval_bug.sh
> emacs -Q --batch --eval "(progn
>                (add-to-list 'load-path
>                  (expand-file-name \"./lisp/\"))
>                (add-to-list 'load-path
>                  (expand-file-name \"./contrib/lisp/\" t))
>                (require 'org-e-latex)
>                (org-babel-do-load-languages
>                 'org-babel-load-languages
>                 '((sh . t)))
>                (find-file \"b.org\")
>                (org-e-latex-export-to-latex))"
> #+END_SRC
>
>  $ ./eval_bug.sh
> Loading /home/myles/.emacs.d/plugins/org-mode/lisp/org-loaddefs.el (source)...
> OVERVIEW
> Loading vc-git...
> OVERVIEW
> OVERVIEW
> Reference 'xxx' not found in this buffer
>
> Removing the :noexport: results in the same message as above, removing
> the #+call causes c.org to be included but even adding these line to the
> batch function above will not cause the block to be evaluated
> (i.e. there is no c.out written):

This should be fixed in master. Thank you for the report.


Regards,

-- 
Nicolas Goaziou

      parent reply	other threads:[~2012-10-28 15:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-18 15:07 [new exporter] two unexpected behaviours of an #+INCLUDEd #+call Myles English
2012-10-22 12:10 ` Myles English
2012-10-22 17:04   ` Nicolas Goaziou
2012-10-28 15:27 ` Nicolas Goaziou [this message]

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=87zk36r510.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=Emacs-orgmode@gnu.org \
    --cc=mylesenglish@gmail.com \
    /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).