emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thomas Alexander Gerds <tag@biostat.ku.dk>
To: "Charles C. Berry" <ccberry@ucsd.edu>
Cc: emacs-orgmode@gnu.org
Subject: Re: export of src block ignores :results
Date: Fri, 30 Sep 2016 07:06:16 +0200	[thread overview]
Message-ID: <87fuoinfhz.fsf@biostat.ku.dk> (raw)
In-Reply-To: <alpine.OSX.2.20.1609292027090.1878@charles-berrys-macbook.local> (Charles C. Berry's message of "Thu, 29 Sep 2016 20:39:08 -0700")


thanks for looking into this. it would be great if the regexp could be
changed to catch the show-time variant. the regexp you sent in your
previous mail works for me, i.e., the result of
(progn (looking-at org-babel-result-regexp)(match-string 1))
is the same with and without the show-time option.

anyway, the original problem is not solved yet.
org-babel-current-result-hash is related to the execution of the src
block which is independent of the export process since I have

(setq org-export-babel-evaluate nil). 

and the problem that the results are exported in case of ":results code"
persists when I set (setq org-babel-hash-show-time nil)

so, unfortunately my question remains. which function in the export
process interprets the "results code" option?

Thomas

"Charles C. Berry" <ccberry@ucsd.edu> writes:

> On Thu, 29 Sep 2016, Charles C. Berry wrote:
> 
>> On Thu, 29 Sep 2016, Thomas Alexander Gerds wrote:
>>
>>> Hi Chuck
>>> 
>>> thanks for checking. my org-version is the same
>>> release_8.3.6-1178-g2b22d5
>>> 
>>> to get the date and time of the in the results:
>>> 
>>> (setq org-babel-hash-show-time t)
>>> 
>>> but even without this option the results of the block are exported
>>> no matter what. could someone point to the place in the export
>>> process where the :results option is interpreted?
>> You probably want `org-babel-current-result-hash', which AFAICS does
>> not recognize the `show-time' variant.
>> I think you'll need some regexp magic to make it work.
>
> You might try this:
>
> #+BEGIN_SRC emacs-lisp
>    (setq org-babel-result-regexp
>  	(concat
>  	 "^[ 	]*#\\+RESULTS\\[\\(?:<[0-9]"
>  	 "\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?"
>  	 "[0-2][0-9]:[0-6][0-9]:[0-6][0-9]> ?"
>  	 "[^
> \n[:alnum:]]*\\)?\\([[:alnum:]]+\\)"
>  	 "\\]?:[	]*"))
> #+END_SRC
>
> The line wrap after "[^ is due to C-M (you type C-q C-M to insert it
> if your email client messes with it and you need to redo it)
>
> This seems like an innocuous change, but I haven't yet run this thru
> `make test' so beware.
>
> Chuck
>
>

-- 
Thomas A. Gerds -- Department of Biostatistics Copenhagen
University of Copenhagen, Oester Farimagsgade 5, 1014 Copenhagen,
Denmark

  reply	other threads:[~2016-09-30  5:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-29  6:42 export of src block ignores :results Thomas Alexander Gerds
2016-09-29 16:25 ` Charles C. Berry
2016-09-29 19:53   ` Thomas Alexander Gerds
2016-09-29 21:02     ` Charles C. Berry
2016-09-30  3:39       ` Charles C. Berry
2016-09-30  5:06         ` Thomas Alexander Gerds [this message]
2016-09-30 17:05           ` Charles C. Berry
2016-10-01  5:46             ` Thomas Alexander Gerds
2016-10-01 16:32               ` Charles C. Berry
2016-10-02 11:08                 ` Thomas Alexander Gerds
2016-10-01  8:37         ` Nicolas Goaziou
  -- strict thread matches above, loose matches on Subject: below --
2016-09-29  6:43 Thomas Alexander Gerds

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=87fuoinfhz.fsf@biostat.ku.dk \
    --to=tag@biostat.ku.dk \
    --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).