From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Alexander Gerds Subject: Re: export of src block ignores :results Date: Fri, 30 Sep 2016 07:06:16 +0200 Message-ID: <87fuoinfhz.fsf@biostat.ku.dk> References: <87r383ky0w.fsf@biostat.ku.dk> <87a8eqv5x2.fsf@biostat.ku.dk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpq1h-0001Uv-9p for emacs-orgmode@gnu.org; Fri, 30 Sep 2016 01:06:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpq1d-0001Pl-1p for emacs-orgmode@gnu.org; Fri, 30 Sep 2016 01:06:24 -0400 Received: from mail-lf0-x22d.google.com ([2a00:1450:4010:c07::22d]:36369) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpq1c-0001PZ-Q0 for emacs-orgmode@gnu.org; Fri, 30 Sep 2016 01:06:21 -0400 Received: by mail-lf0-x22d.google.com with SMTP id g62so96140054lfe.3 for ; Thu, 29 Sep 2016 22:06:20 -0700 (PDT) In-Reply-To: (Charles C. Berry's message of "Thu, 29 Sep 2016 20:39:08 -0700") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: "Charles C. Berry" Cc: emacs-orgmode@gnu.org 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" 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