From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vikas Rawal Subject: Re: "header-args :eval inline-only" not working Date: Sun, 20 Aug 2017 02:06:58 +0530 Message-ID: <672780F6-F156-4D48-8774-3E449FF4EA5B@agrarianresearch.org> References: <87fucnjr3h.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_1E19F5B3-705A-427D-8DDA-75BC2AA0DEA6" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33734) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djAUg-00011M-9K for emacs-orgmode@gnu.org; Sat, 19 Aug 2017 16:37:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1djAUc-0008FJ-U1 for emacs-orgmode@gnu.org; Sat, 19 Aug 2017 16:37:18 -0400 Received: from mail-pf0-x22f.google.com ([2607:f8b0:400e:c00::22f]:35366) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1djAUc-0008Eh-LX for emacs-orgmode@gnu.org; Sat, 19 Aug 2017 16:37:14 -0400 Received: by mail-pf0-x22f.google.com with SMTP id w127so6006753pfd.2 for ; Sat, 19 Aug 2017 13:37:14 -0700 (PDT) In-Reply-To: <87fucnjr3h.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: org-mode mailing list --Apple-Mail=_1E19F5B3-705A-427D-8DDA-75BC2AA0DEA6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 20-Aug-2017, at 12:57 AM, Nicolas Goaziou = wrote: >=20 > Hello, >=20 > Vikas Rawal writes: >=20 >> My org-version (latest on org ELPA) is: Org mode version 9.0.9 = (9.0.9-82-gb862c2-elpa @ /Users/vikas/.emacs.d/elpa/org-20170814/) >>=20 >> The following is not working:=20 >>=20 >> #+PROPERTY: header-args :eval inline-only >>=20 >> ":eval never-export=E2=80=9D works; but ":eval inline-only" does not. >=20 > What is "not working=E2=80=9D? ":eval inline-only" has no effect. It still tries to evaluate all code = blocks. >> I can deal with this by globally changing the option using: >>=20 >> (org-export-babel-evaluate (quote inline-only)) >>=20 >> But this creates another problem. After this, org does not respect = =E2=80=9C:exports results=E2=80=9D and exports both the code and = results. >=20 > Could you provide an ECM? Please see the attached file. When I export this, it still tries to evaluate the code block = ind1_t2_hhd_code. If I use (org-export-babel-evaluate (quote = inline-only)), it does not evaluate ind1_t2_hhd_code code block but it = exports both the code and the output. Vikas --Apple-Mail=_1E19F5B3-705A-427D-8DDA-75BC2AA0DEA6 Content-Disposition: attachment; filename=testecm.org Content-Type: application/octet-stream; x-unix-mode=0644; name="testecm.org" Content-Transfer-Encoding: 7bit #+Title: ECM to decifer problem with eval #+AUTHOR: #+LATEX_HEADER: \usepackage{longtable,threeparttable,booktabs} #+OPTIONS: toc:nil H:2 ^:{} #+LATEX_CLASS_OPTIONS: [11pt,a4paper] #+LATEX_HEADER: \linespread{1.5} #+LATEX_HEADER: \usepackage{tabulary,tcolorbox,xcolor,tabularx,siunitx,booktabs} #+LATEX_HEADER: \usepackage[margin=1in]{geometry} #+LATEX_HEADER: \usepackage[section]{placeins} #+LATEX_HEADER: \usepackage{dblfloatfix} #+LATEX_HEADER: \usepackage{chngcntr} #+LATEX_HEADER: \usepackage{multicol,vwcol,lipsum} #+LATEX_HEADER: \counterwithin{table}{section} #+PROPERTY: header-args :session nss70 :eval inline-only #+macro: getcell src_emacs-lisp[:results value raw]{(org-table-get-remote-range "$1" "$2")} #+macro: roundnum src_emacs-lisp[:results value raw]{(round (string-to-number (org-table-get-remote-range "$1" "$2")))} * Overall trends Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque vel arcu vitae velit finibus dictum. Aliquam blandit maximus ex, eget bibendum lectus sodales nec. Mauris vitae arcu cursus velit aliquam luctus. Vivamus sed dui feugiat, mattis libero at, vulputate eros. Duis eu velit mi. Sed sit amet scelerisque erat. Aliquam nulla metus, laoreet a metus vel, fermentum tempus odio. Phasellus sagittis vulputate est, in bibendum felis lacinia interdum. Aliquam dictum mauris ut commodo elementum. Maecenas scelerisque, lectus ut sagittis gravida, elit enim rutrum felis, eget cursus mi quam eget odio. Aliquam congue neque non arcu aliquam semper. Nunc eu congue lorem. Praesent dolor risus, porta convallis tempus et, mattis eget nunc {{{getcell(ind1_t2_hhd,@3$2)}}} per cent in 2002 to {{{get cell(ind1_t2_hhd,@4$2)}}} per cent in 2012. #+NAME: ind1_t2_hhd_code #+BEGIN_SRC R :results value :exports results :colnames yes :hline yes data.frame(a=c(1:4),b=c(5:8)) #+END_SRC #+NAME: ind1_t2_hhd #+CAPTION: Caption of my table #+attr_latex: :environment tabulary :width \columnwidth :align lRRR :booktabs t #+RESULTS: ind1_t2_hhd_code | a | b | |---+---| | 1 | 5 | | 2 | 6 | | 3 | 7 | | 4 | 8 | --Apple-Mail=_1E19F5B3-705A-427D-8DDA-75BC2AA0DEA6 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_1E19F5B3-705A-427D-8DDA-75BC2AA0DEA6--