emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rainer M Krug <Rainer@krugs.de>
To: Charles Berry <ccberry@ucsd.edu>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] on export resulting in endless evaluation
Date: Tue, 10 Feb 2015 09:25:47 +0100	[thread overview]
Message-ID: <m2bnl241h0.fsf@krugs.de> (raw)
In-Reply-To: <loom.20150210T005559-99@post.gmane.org> (Charles Berry's message of "Tue, 10 Feb 2015 00:44:14 +0000 (UTC)")

[-- Attachment #1: Type: text/plain, Size: 3026 bytes --]

Charles Berry <ccberry@ucsd.edu> writes:

> Rainer M Krug <Rainer <at> krugs.de> writes:
>
>> 
>> Sebastien Vauban <sva-news@...>
>> writes:
>> 
>> > Rainer M Krug wrote:
>> >> Charles Berry <ccberry@...> writes:
>> >>> Rainer M Krug <Rainer <at> krugs.de> writes:
>> >>>> 
>> >>>> when exporting the fillowing org file, I get an endless loop of
>> >>>> evaluations.
>> >>>> 
>> >>>> --8<---------------cut here---------------start------------->8---
>> >>>> #+PROPERTY: header-args :exports both
>> >>>> #+PROPERTY: header-args+ :results output
>> >>>> * The bug
>> >>>> This file create an (possibly endless?) loop during export
>> >>>> * here exports both
>> >>>> #+begin_src R 
>> >>>> cat(13+14)
>> >>>> #+end_src
>> >>>> 
>> >>>> * and here only code
>> >>>> :PROPERTIES:
>> >>>> :header-args+: exports code
>> >>>> :END:
>> >>>> #+begin_src R 
>> >>>> paste(13+14)
>> >>>> #+end_src
>> >>>> --8<---------------cut here---------------end--------------->8---
>> >>>
>
> [discussion of problem, diagnostic methods, and cures deleted]
>
>
>> 1) I thought that header-args is simply a string, but it already seems
>> to be a list?
>
> Depends on which `header-args' one is discussing:
>
> 1. A property, as in `(org-entry-get (point) "header-args" t)'
>
> 2. The value of `(nth 2 (org-babel-get-src-block-info))'
>
> 3. The value of an elisp variable like `org-babel-default-header-args'
>
> 4. The 4th string matched by `org-babel-src-block-regexp' 
>
> 5. The first string matched by `org-babel-multi-line-header-regexp'
>
> 1, 4 and 5 are strings. 2 and 3 are lists.

Wow - there are many...

But this helps quite a bit.

>
>> 
> [more questions deleted]
>> 
>
> Exactly what happens and when is a long story, involving a bunch of 
> functions.
>
> You might start by reading `org-babel-get-src-block-info' and 
> `org-babel-merge-params'.
>
> I think most of what you need to know really is in 
>
>    (info "(org) Using header arguments")
> and
>    (info "(org) Property syntax")
>
> Just remember that a property called `header-args' is a string until Babel 
> starts working on it.

So your original code, returns the "property called 'header-args'",
(1) while your function below returns the one from 2) above. That
clarifies.

>
>
>> 5) Is there any way in getting, in this function, the same output
>> (header-args) as from the code block suggested by Charles:
>> 
>
> You might try

Thanks - but I was thinking about the ot=her way round, how I could get
the "property called 'header-args'" (1) within the function called when
using C-c C-v C-i to help in debugging - found a way of doing it and
will send a patch.

> #+BEGIN_SRC emacs-lisp :results pp
>    (cons (org-entry-get (point) "header-args" t)
>          (nth 2 (org-babel-get-src-block-info)))
> #+END_SRC
>
> HTH,

Most definitely,

Thanks,

Rainer

>
> Chuck
>
>
>

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]

      reply	other threads:[~2015-02-10  8:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-06 10:06 [BUG] on export resulting in endless evaluation Rainer M Krug
2015-02-06 17:50 ` Charles Berry
2015-02-07 14:46   ` Rainer M Krug
2015-02-09 11:00     ` Sebastien Vauban
2015-02-09 12:25       ` Rainer M Krug
2015-02-10  0:44         ` Charles Berry
2015-02-10  8:25           ` Rainer M Krug [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=m2bnl241h0.fsf@krugs.de \
    --to=rainer@krugs.de \
    --cc=ccberry@ucsd.edu \
    --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).