Re: Confused about source code blocks evaluation when exporting

2022-07-22 Thread Alain . Cochard
Fraga, Eric writes on Fri 22 Jul 2022 17:09: > On Friday, 22 Jul 2022 at 06:27, alain.coch...@unistra.fr wrote: > > Plus one must revisit the file when changing the value of > > that variable. > > You can reload local variables by hitting C-c C-c on the #+title: line, > for instance. Ah

Re: Confused about source code blocks evaluation when exporting

2022-07-22 Thread Fraga, Eric
On Friday, 22 Jul 2022 at 06:27, alain.coch...@unistra.fr wrote: > Plus one must revisit the file when changing the value of > that variable. You can reload local variables by hitting C-c C-c on the #+title: line, for instance. -- : Eric S Fraga, with org release_9.5.4-557-g3bbbf7 in Emacs

Re: Confused about source code blocks evaluation when exporting

2022-07-21 Thread Alain . Cochard
Fraga, Eric writes on Wed 20 Jul 2022 12:43: > Maybe try this for your local variables (at the end of the org file): > > # Local Variables: > # org-latex-pdf-process: ("...") > # End: > > as a test (adjusting as you see fit)? This works for me. No need to > use BIND. Indeed, it works

Re: Confused about source code blocks evaluation when exporting

2022-07-20 Thread Fraga, Eric
On Wednesday, 20 Jul 2022 at 14:12, alain.coch...@unistra.fr wrote: > At any rate, and as I already said, all this business became > irrelevant for me once latexmk was installed: no need then to set > org-latex-pdf-process. This became only a matter of better > understanding some of the org

Re: Confused about source code blocks evaluation when exporting

2022-07-20 Thread Alain . Cochard
Fraga, Eric writes on Thu 14 Jul 2022 08:35: > On Thursday, 14 Jul 2022 at 10:09, alain.coch...@unistra.fr wrote: > > #+begin_src emacs-lisp > > (setq org-latex-pdf-process ) > > #+end_src > > > > which I want to be evaluated during export but I want neither the code > > not its results to

Re: Confused about source code blocks evaluation when exporting

2022-07-14 Thread Fraga, Eric
On Thursday, 14 Jul 2022 at 10:09, alain.coch...@unistra.fr wrote: > #+begin_src emacs-lisp > (setq org-latex-pdf-process ) > #+end_src > > which I want to be evaluated during export but I want neither the code > not its results to appear on the exported pdf file. > > Maybe there are smarter ways

Re: Confused about source code blocks evaluation when exporting

2022-07-14 Thread Alain . Cochard
Fraga, Eric writes on Thu 14 Jul 2022 07:06: > On Wednesday, 13 Jul 2022 at 23:06, alain.coch...@unistra.fr wrote: > > Now I start again, but I do 'C-c C-e l o' instead. I am _not_ asked > > whether I want to evaluate, and the 'foo' file is still there. But > > the pdf file does display > >

Re: Confused about source code blocks evaluation when exporting

2022-07-14 Thread Fraga, Eric
On Wednesday, 13 Jul 2022 at 23:06, alain.coch...@unistra.fr wrote: > Now I start again, but I do 'C-c C-e l o' instead. I am _not_ asked > whether I want to evaluate, and the 'foo' file is still there. But > the pdf file does display > > rm -f foo > > Does this still qualify as "evaluation"? I

Re: Confused about source code blocks evaluation when exporting

2022-07-14 Thread Alain . Cochard
Rudolf Adamkovič writes on Thu 14 Jul 2022 08:06: > alain.coch...@unistra.fr writes: > > > Org evaluates source code blocks in an Org file during export. > > I have just tried to export the following document: > > #+begin_src emacs-lisp :exports both > (+ 1 1) > #+end_src > > The

Re: Confused about source code blocks evaluation when exporting

2022-07-14 Thread Rudolf Adamkovič
alain.coch...@unistra.fr writes: > Org evaluates source code blocks in an Org file during export. I have just tried to export the following document: #+begin_src emacs-lisp :exports both (+ 1 1) #+end_src The exported HTML file contains the expression '(+ 1 1)' along with '2', its value. It

Re: Confused about source code blocks evaluation when exporting

2022-07-13 Thread Rudolf Adamkovič
"Fraga, Eric" writes: > By default, the results of a src block evaluation is the value of the > src block which is typically the value returned by the last statement. The value of the last expression, not the last statement. Rudy -- "Strange as it may sound, the power of mathematics rests on

Re: Confused about source code blocks evaluation when exporting

2022-07-13 Thread Alain . Cochard
Fraga, Eric writes on Wed 13 Jul 2022 10:57: > No, you used the word correctly. My point was that this was your > main issue! Understanding what is the "result" of a src block > evaluation is key. Thank you for the clarification. I can see that I am still very confused. > > Thank you

Re: Confused about source code blocks evaluation when exporting

2022-07-13 Thread Fraga, Eric
On Tuesday, 12 Jul 2022 at 23:13, alain.coch...@unistra.fr wrote: > I guess I didn't use 'incidental' correctly. I meant it as "not my > main concern". Anyway, thank you; I could check that if I switch the > 2 lines I indeed get '#+RESULTS:' to show foo'. No, you used the word correctly. My

Re: Confused about source code blocks evaluation when exporting

2022-07-12 Thread Alain . Cochard
Fraga, Eric writes on Tue 12 Jul 2022 14:08: > On Tuesday, 12 Jul 2022 at 14:53, alain.coch...@unistra.fr wrote: > > So far so good. (Well almost: why does '#+RESULTS:' show 'bar' and > > not 'foo'? After all, I'm just setting 'my-var', I'm not asking to > > display its value. But that's

Re: Confused about source code blocks evaluation when exporting

2022-07-12 Thread Greg Minshall
Alain, let's see. maybe look in the org manual for ":results" (with "value" or "output" as options) and ":exports" (with "code" or "results" or "both" as options). that might help? cheers, Greg

Re: Confused about source code blocks evaluation when exporting

2022-07-12 Thread Fraga, Eric
On Tuesday, 12 Jul 2022 at 14:53, alain.coch...@unistra.fr wrote: > So far so good. (Well almost: why does '#+RESULTS:' show 'bar' and > not 'foo'? After all, I'm just setting 'my-var', I'm not asking to > display its value. But that's incidental.) It's not incidental. By default, the results

Confused about source code blocks evaluation when exporting

2022-07-12 Thread Alain . Cochard
Hello. The manual says: Org evaluates code in the following circumstances: _Source code blocks_ Org evaluates source code blocks in an Org file during export. Org also evaluates a source code block with the ‘C-c C-c’ key chord. NB: each test below is performed with