[O] org-babel noweb-ref

2019-09-29 Thread edgar
Hello dear list, First of all, this may be related: - https://lists.gnu.org/archive/html/emacs-orgmode/2018-02/msg00300.html - https://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00044.html - Emacs: src_emacs-lisp{emacs-version} {{{results(=26.3=)}}} - Org: src_emacs-lisp{org-version} {{

Re: [O] Org babel tangle: Don't export code

2019-09-25 Thread Nathan Neff
On Wed, Sep 25, 2019 at 12:54 AM Ken Mankoff wrote: > > On 2019-09-25 at 01:07 +02, Tim Cross wrote... > > I just put :tangle no in the block header e.g. > > > > #+begin_src emacs-lisp :tangle no > > > > #+end_src > > Also, > > * COMMENT Section > #+BEGIN_SRC > # not exported because of COMMENT

Re: [O] Org babel tangle: Don't export code

2019-09-24 Thread Ken Mankoff
On 2019-09-25 at 01:07 +02, Tim Cross wrote... > I just put :tangle no in the block header e.g. > > #+begin_src emacs-lisp :tangle no > > #+end_src Also, * COMMENT Section #+BEGIN_SRC # not exported because of COMMENT #+END_SRC -k.

Re: [O] Org babel tangle: Don't export code

2019-09-24 Thread Nathan Neff
On Tue, Sep 24, 2019 at 8:19 PM Tim Cross wrote: > > There are two different concepts - tangling and exporting. When you > tangle the file, code blocks are written out into code files (possibly > with evaluation etc). This is part of the 'literate programming' support > within org. > Yep - thank

Re: [O] Org babel tangle: Don't export code

2019-09-24 Thread Tim Cross
There are two different concepts - tangling and exporting. When you tangle the file, code blocks are written out into code files (possibly with evaluation etc). This is part of the 'literate programming' support within org. When you export a file, you are exporting the file contents into a diffe

Re: [O] Org babel tangle: Don't export code

2019-09-24 Thread Nathan Neff
Thanks Tim - I wanted to ask the list -- what does " By default, Org does not tangle the ‘src’ code block on export." mean in this web page:https://orgmode.org/manual/Extracting-source-code.html I mean, I have all of my begin_src emacs-lisp blocks with no explicit :tangle yesand they all are expor

Re: [O] Org babel tangle: Don't export code

2019-09-24 Thread Tim Cross
I just put :tangle no in the block header e.g. #+begin_src emacs-lisp :tangle no #+end_src This is how I turn off or remove blocks from my .emacs.d/init.el file, which is tangled from an or file. You can also put a filename. This is what I do for Emacs 27, which introduces the early-init.el fi

[O] Org babel tangle: Don't export code

2019-09-24 Thread Nathan Neff
Hello all, I use *.org files to configure my emacs and use org-babel-load-file to configure my org-mode using *.org files. Love the feature. However sometimes I'm experimenting with code blocks, and want to simply "turn off" certain code blocks in my *.org files from being executed. Every time I

Re: [O] org-babel-insert-result doesn't comma escape properly

2019-08-22 Thread Nicolas Goaziou
Hello, "Berry, Charles" writes: > Here is an ECM: > > #+begin_src emacs-lisp :wrap example > "line 1 > ,* headline 2 > ,* headline 3 > ,* headline 4 > ,* headline 5 > " > #+end_src > > > With today's master, the last `headline' is not escaped in the example > block this produces when executed.

[O] org-babel-insert-result doesn't comma escape properly

2019-08-21 Thread Berry, Charles
Here is an ECM: #+begin_src emacs-lisp :wrap example "line 1 ,* headline 2 ,* headline 3 ,* headline 4 ,* headline 5 " #+end_src With today's master, the last `headline' is not escaped in the example block this produces when executed. It seems to me that dropping the let binding for `before-fi

[O] Org-Babel: Alternate caching behaviour when file does not exist

2019-01-23 Thread Nik Clayton
I discovered that if you have ":cache yes" set on a SRC block, with the results being written to a file with ":results filename.png", Org Babel will not re-evaluate the block if the file doesn't exist and the cache checksum hasn't changed. This caused me a problem, as the .org files that I'm shari

Re: [O] org-babel-execute-src-block on +#CALL statement?

2019-01-13 Thread Nicolas Goaziou
Hello, Joon Ro writes: > Eventually I would like to batch-run a src block in a command line. > While investigating it, I found that org-babel-execute-src-block > throws "Wrong type argument: consp, nil" error when I run it over > a #+CALL statement. For example, I can run the test src block below

[O] org-babel-execute-src-block on +#CALL statement?

2019-01-12 Thread Joon Ro
Hi, Eventually I would like to batch-run a src block in a command line. While investigating it, I found that org-babel-execute-src-block throws "Wrong type argument: consp, nil" error when I run it over a #+CALL statement. For example, I can run the test src block below but it fails when the cu

Re: [O] org babel: %% [removed source block]

2018-11-29 Thread John Kitchin
Have you tried this with an emacs -q? Your examples work as expected in emacs -q for me. John --- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingr

Re: [O] org babel: %% [removed source block]

2018-11-29 Thread Uwe Brauer
>>> "Berry," == Berry, Charles writes: > I cannot reproduce your export issue with org 9.1.14. > You need to provide more details. Ok, I searched already my custom settings. > Perhaps you have a header-arg set that you have not told us about? > What does C-c C-v C-i report when poin

Re: [O] org babel: %% [removed source block]

2018-11-29 Thread Berry, Charles
I cannot reproduce your export issue with org 9.1.14. You need to provide more details. Perhaps you have a header-arg set that you have not told us about? What does C-c C-v C-i report when point is in each of your source blocks? I get Lang: matlab Properties: :header-argsnil

Re: [O] org babel: %% [removed source block]

2018-11-29 Thread Uwe Brauer
>>> "John" == John Kitchin writes: > Maybe you need :exports and not :export. > John I tried also lisp #+begin_src elisp :tangle test.el :exports code :padline no (require 'ob-ipython) (setq org-confirm-babel-evaluate t) ;don't prompt me to confirm everytime I want to evaluate a blo

Re: [O] org babel: %% [removed source block]

2018-11-29 Thread Uwe Brauer
>>> "John" == John Kitchin writes: > Maybe you need :exports and not :export. > John I also see Code block produced no output. org-babel-exp process matlab at position 250... smime.p7s Description: S/MIME cryptographic signature

Re: [O] org babel: %% [removed source block]

2018-11-29 Thread Uwe Brauer
>>> "John" == John Kitchin writes: > Maybe you need :exports and not :export. > John I tried #+begin_src matlab :tangle test.m :exports code :padline no function [ll x]=mitest(A0,x0) % initialization format long epsi=1.e-3; nit=0; nmaxit=200; Delta=10; A=A0; while Delta>epsi & nit sm

Re: [O] org babel: %% [removed source block]

2018-11-29 Thread John Kitchin
Maybe you need :exports and not :export. John --- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Thu, Nov 29, 2018 at 8:2

Re: [O] org babel: %% [removed source block]

2018-11-29 Thread Uwe Brauer
>>> "Eric" == Eric S Fraga writes: > On Thursday, 29 Nov 2018 at 12:38, Uwe Brauer wrote: >> Now org-babel-tangle works nicely, but when I try to export the org >> file to latex via org-export-dispatch > I think the default is > :exports results > so you what you want is either

Re: [O] org babel: %% [removed source block]

2018-11-29 Thread Eric S Fraga
On Thursday, 29 Nov 2018 at 12:38, Uwe Brauer wrote: > Now org-babel-tangle works nicely, but when I try to export the org > file to latex via org-export-dispatch I think the default is :exports results so you what you want is either :exports both or :exports code -- Eric S Fraga via Emacs 27.0.

[O] org babel: %% [removed source block]

2018-11-29 Thread Uwe Brauer
Hi I have the following org file #+BEGIN_SRC matlab :tangle test.m :padline no :results none function [ll x]=mitest(A0,x0) % initialization format long epsi=1.e-3; nit=0; nmaxit=200; Delta=10; A=A0; while Delta>epsi & nit

Re: [O] org-babel-execute:go crashes on Mac

2018-10-25 Thread Neil Jerram
Mario Martelli writes: > Thank you for your answer. > >> If you haven't already, I suggest checking that there isn't a difference in >> your Go setup, by working out the "go run ..." command that is being run >> below, and running that manually yourself. > > My first assumption was - to be hon

Re: [O] org-babel-execute:go crashes on Mac

2018-10-25 Thread Mario Martelli
Thank you for your answer. > If you haven't already, I suggest checking that there isn't a difference in > your Go setup, by working out the "go run ..." command that is being run > below, and running that manually yourself. My first assumption was - to be honest, still is - that the "go run …

Re: [O] org-babel-execute:go crashes on Mac

2018-10-25 Thread Neil Jerram
If you haven't already, I suggest checking that there isn't a difference in your Go setup, by working out the "go run ..." command that is being run below, and running that manually yourself. On 25 October 2018 05:28:53 BST, Mario Martelli wrote: >Morning, > >recently I tried to use ob-go and

[O] org-babel-execute:go crashes on Mac

2018-10-24 Thread Mario Martelli
Morning, recently I tried to use ob-go and ran immediately into: org-babel-execute:go: Invalid function: (results (org-babel-eval (format "%s run %s \"%s\" %s" org-babel-go-command (mapconcat (quote identity) (org-babel-go-as-list flags) " ") (org-babel-process-file-name tmp-src-file) (mapconc

Re: [O] org-babel-detangle issue on 9.1.14

2018-10-05 Thread Grant Rettke
On Thu, Oct 4, 2018 at 10:53 AM Brad Knotwell wrote: > Thanks for the response. At a minimum, I'd recommend changing the error > message from "Not in a source block" to something more descriptive > as most people's initial response will be, "uhhh, but it looks like I am." Consider submitting yo

Re: [O] org-babel-detangle issue on 9.1.14

2018-10-04 Thread Brad Knotwell
Thanks for the response.  At a minimum, I'd recommend changing the error message from "Not in a source block" to something more descriptive as most people's initial response will be, "uhhh, but it looks like I am."   Ideally, an additional comment marker would delineate the source block from the

Re: [O] org-babel-detangle issue on 9.1.14

2018-10-04 Thread Grant Rettke
On Thu, Oct 4, 2018 at 2:09 AM Brad Knotwell wrote: > I've been playing with org-babel-detangle and I've noticed something that's > either a bug or a limitation. It's confusing enough that > it's worth writing down if it's expected. Basically, it doesn't work if > there are variables defined i

Re: [O] org-babel: capturing the output of a shell command that does not return

2018-10-04 Thread Grant Rettke
On Wed, Sep 19, 2018 at 3:35 PM wrote: > Maybe there is another way to run the shell command and extract the file name > I need (in elisp?), but I don't know how. What if you start Emacs, have it create a temp file, then in a separate terminal start Jupyter with stdout redirected to that file.

[O] org-babel: capturing the output of a shell command that does not return

2018-09-19 Thread garjola
Hi, I need to capture the output of a shell command run from a babel code block, but this command does not return. By that, I mean that the command prints some text to the terminal, but does not end (it launches a deamon). Something like this: #+BEGIN_SRC bash jupyter kernel #+END_SRC When r

Re: [O] org babel R source blocks :results output with :session includes extra blank lines

2018-08-28 Thread Dylan Schwilk
Thank you and my apologies. Seeing the session output you posted convinced me the problem was with my ess settings. Of course I should have known that because I could find no-one else with the same problem and I could see no change to ob-R.el in the git repo in the past months that could have affe

Re: [O] org babel R source blocks :results output with :session includes extra blank lines

2018-08-28 Thread Berry, Charles
Cannot confirm. See inline. > On Aug 28, 2018, at 7:48 AM, Dylan Schwilk wrote: > > Hello, > > I recently have run into a change in output from my R language source code > blocks. > > I have found that when I include :session to the source block header, I now > get > extra blank lines in the

[O] org babel R source blocks :results output with :session includes extra blank lines

2018-08-28 Thread Dylan Schwilk
Hello, I recently have run into a change in output from my R language source code blocks. I have found that when I include :session to the source block header, I now get extra blank lines in the #+results. This has broken my lecture slides for my courses with too much extra blank space. for exa

[O] Org-babel bash session with non-standard prompt

2018-06-08 Thread Narendra Joshi
Hi, If the value for PS1 variable is set to something that doesn't end with a `$` or `#`, org-babel hangs while using a fixed :session. To overcome this, I can do the following at the start of a sh org-babel session: #+begin_src bash :session s :results verbatim drawer export PS1='$ ' ls -lah #

Re: [O] org-babel-do-load-languages

2018-05-03 Thread N. Raghavendra
At 2018-05-03T15:16:17+01:00, Aaron Ecay wrote: > In principle, you are correct. However: > >> I wonder if something like >> >> >> (defun org-babel-do-load-languages (languages) > > If we change the arity of the function in this way, us

Re: [O] org-babel-do-load-languages

2018-05-03 Thread N. Raghavendra
At 2018-05-03T21:58:46+02:00, Nicolas Goaziou wrote: >>In this example, evaluation is disabled for ‘emacs-lisp’, and enabled >> for ‘R’. >> >> (org-babel-do-load-languages >> '((emacs-lisp . nil) >> (R . t))) > > Language names are not symbols. It should be Emacs Lisp and R.

Re: [O] org-babel-do-load-languages

2018-05-03 Thread Nicolas Goaziou
Hello, "N. Raghavendra" writes: > I also suggest a corresponding change in Org(Languages): > > >By default, only ‘emacs-lisp’ is enabled for evaluation. To enable > or disable other languages, customize the ‘org-babel-load-language

Re: [O] org-babel-do-load-languages

2018-05-03 Thread N. Raghavendra
At 2018-05-03T14:07:37+01:00, Aaron Ecay wrote: > Itʼs an unusual function indeed. Thatʼs because it is used as the :set > function for the defcustom org-babel-load-languages; see the info > documentation (info "(elisp) Variable Definitions"). Thank you for explaining. I still think it would be

Re: [O] org-babel-do-load-languages

2018-05-03 Thread Aaron Ecay
Hi Raghu, 2018ko maiatzak 3an, "N. Raghavendra"-ek idatzi zuen: > > I am puzzled with this definition: Itʼs an unusual function indeed. Thatʼs because it is used as the :set function for the defcustom org-babel-load-languages; see the info documentation (info "(elisp) Variable Definitions"). -

Re: [O] org-babel-do-load-languages

2018-05-03 Thread N. Raghavendra
At 2018-05-03T16:49:01+05:30, N. Raghavendra wrote: > (set-default org-babel-load-languages languages) I meant `setq-default' there, not `set-default'. Raghu. -- N. Raghavendra , http://www.retrotexts.net/ Harish-Chandra Research Institute, http://www.hri.res.in/

[O] org-babel-do-load-languages

2018-05-03 Thread N. Raghavendra
I am puzzled with this definition: (defun org-babel-do-load-languages (sym value) "Load the languages defined in `org-babel-load-languages'." (set-default sym value) (dolist (pair org-babel-load-languages) (let ((active (cdr pa

Re: [O] Org-babel-lilypond midi output in basic mode

2018-04-23 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Fred Gruber writes: > Hi > Is there a way to get org-babel-lilypond to generate midi of music fragments > in basic mode. Ideally when we export the html the > images of the music fragments should have a link to the corresponding midi of > that

Re: [O] org-babel-trangle, proble when loop is interrupted by documentation

2018-04-21 Thread Uwe Brauer
> Hello, > Uwe Brauer writes: > I guess you have to set `org-src-preserve-indentation' globally, or use > "-i" flag for the block, which is locally equivalent. Great that does it. However there is still an empty line generated. Any possibility get rid of this as well, I look a bit

Re: [O] org-babel-trangle, proble when loop is interrupted by documentation

2018-04-21 Thread Nicolas Goaziou
Hello, Uwe Brauer writes: > Please consider the following test org file > * A test example > , > | #+BEGIN_SRC matlab :tangle test.m > | function [ll x]=mitest(A0,x0) > | % initialization > | format long > | epsi=1.e-3; > | nit=0; > | nmaxit=200; > | Delta=10; > | A=A0; > | while Delta>eps

[O] org-babel-trangle, proble when loop is interrupted by documentation

2018-04-21 Thread Uwe Brauer
Hi Please consider the following test org file * A test example , | #+BEGIN_SRC matlab :tangle test.m | function [ll x]=mitest(A0,x0) | % initialization | format long | epsi=1.e-3; | nit=0; | nmaxit=200; | Delta=10; | A=A0; | while Delta>epsi & nitepsi & nit

Re: [O] org-babel-execute-src-block does not insert inline image with `master` branch source code Org

2018-03-05 Thread Nicolas Goaziou
Hello, "numbch...@gmail.com" writes: > After `git bisect`, found that commit 122bf2997 caused this problem. > @Nicolas, can you fix this commit? Fixed. Thank you for the heads-up. Regards, -- Nicolas Goaziou

Re: [O] org-babel-execute-src-block does not insert inline image with `master` branch source code Org

2018-03-05 Thread numbch...@gmail.com
After `git bisect`, found that commit 122bf2997 caused this problem. @Nicolas, can you fix this commit? [stardiviner] GPG key ID: 47C32433 IRC(freeenode): stardiviner Twitter: @numbchild Key fingerprint = 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433 Blog

[O] org-babel-execute-src-block does not insert inline image with `master` branch source code Org

2018-03-04 Thread numbch...@gmail.com
With following example: ``` #+begin_src gnuplot :session :results graphics :file "data/images/sin.png" :cache no set term png set grid plot sin(x), cos(x) #+end_src ``` If I use Org-mode ELPA version. then it works fine. But when I use `master` branch version, then it does not have any result. Trie

Re: [O] org-babel: insert named source block

2017-11-15 Thread Berry, Charles
> On Nov 15, 2017, at 4:12 PM, Deepak Cherian wrote: > > Thanks. That works well, but only shows named source blocks in the particular > file. > > Is there a way to make it show library of babel blocks too? Sure. `org-babel-library-of-babel' is an association list whose keys are the names.

Re: [O] org-babel: insert named source block

2017-11-15 Thread Deepak Cherian
Thanks. That works well, but only shows named source blocks in the particular file. Is there a way to make it show library of babel blocks too? Deepak On 11/15/2017 02:56 PM, Berry, Charles wrote: On Nov 15, 2017, at 11:04 AM, Deepak Cherian wrote: Has anyone here managed to configure ivy o

Re: [O] org-babel: insert named source block

2017-11-15 Thread Berry, Charles
> On Nov 15, 2017, at 11:04 AM, Deepak Cherian wrote: > > Has anyone here managed to configure ivy or helm to show a list of named > source blocks that org knows about? > > I am imagining this workflow: > 1. M-x org-babel-insert-named-source-block (imaginary function) > 2. List of named source

[O] org-babel: insert named source block

2017-11-15 Thread Deepak Cherian
Has anyone here managed to configure ivy or helm to show a list of named source blocks that org knows about? I am imagining this workflow: 1. M-x org-babel-insert-named-source-block (imaginary function) 2. List of named source blocks pops up 3. Hit enter and "#+call: name-of-source-block()" is i

Re: [O] org-babel oz?

2017-11-12 Thread Johannes Brauer
> >> Hi, >> >> I am looking for a working configuration for using oz code blocks in >> org-mode file. I've installed >> Mozart2 on macOS 10.12.6 and use org-mode version 9.0.9. I've put >> (org-babel-do-load-languages >> 'org-babel-load-languages >> '((emacs-lisp . t) >> (oz . t))) >> into my A

Re: [O] org-babel oz?

2017-11-10 Thread Nick Dokos
Johannes Brauer writes: > Hi, > > I am looking for a working configuration for using oz code blocks in org-mode > file. I've installed > Mozart2 on macOS 10.12.6 and use org-mode version 9.0.9. I've put > (org-babel-do-load-languages > 'org-babel-load-languages > '((emacs-lisp . t) >(oz .

[O] org-babel oz?

2017-11-09 Thread Johannes Brauer
Hi, I am looking for a working configuration for using oz code blocks in org-mode file. I've installed Mozart2 on macOS 10.12.6 and use org-mode version 9.0.9. I've put (org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) (oz . t))) into my Aquamacs initialization and t

Re: [O] org-babel source block unevaluated into variable?

2017-10-26 Thread Martin Alsinet
Johan: Maybe this one would work for you: #+NAME: first #+BEGIN_SRC js function one() { return 1; } #+END_SRC #+NAME: second #+BEGIN_SRC js function two() { return 2; } #+END_SRC #+NAME: third #+BEGIN_SRC js function three() { return 3; } #+END_SRC #+NAME: all #+BEGIN_SRC sh :re

Re: [O] org-babel source block unevaluated into variable?

2017-10-26 Thread Johan W . Klüwer
Following up: A function like this one should help. (defun expand-named-babel-block (block) (save-excursion (org-babel-goto-named-src-block block) (org-babel-expand-src-block))) However ... there's something strange here with org-babel-goto-named-src-block (org 9.0.9). It just jumps t

Re: [O] org-babel source block unevaluated into variable?

2017-10-26 Thread Johan W . Klüwer
Thanks Martin, These are good suggestions, but it's not quite what I am after. In your second example, I would like ":var code=example" to make "code" carry the full (and expanded) text of the "example" block, i.e. to have echo ls -alh as the result -- the code itself, unevaluated. Johan 201

Re: [O] org-babel source block unevaluated into variable?

2017-10-25 Thread Martin Alsinet
Johan: To use expanded noweb references you can use text source blocks #+NAME: lscode #+BEGIN_SRC *text* ls -alh #+END_SRC #+NAME: example #+BEGIN_SRC sh :noweb yes echo <> #+END_SRC #+RESULTS: example : ls -alh #+BEGIN_SRC emacs-lisp :var code=example (message code) #+END_SRC #+RESULTS: :

Re: [O] org-babel source block unevaluated into variable?

2017-10-25 Thread Martin Alsinet
Johan: You can try the following: #+NAME: lscode #+BEGIN_ASCII ls -alh #+END_ASCII #+BEGIN_SRC emacs-lisp :var code=lscode (message code) #+END_SRC #+RESULTS: : ls -alh I haven't tried the noweb references, but it does return the code block in the variable. Martín On Wed, Oct 25, 2017 at 9:

[O] org-babel source block unevaluated into variable?

2017-10-25 Thread Johan W . Klüwer
Is there a way to assign the uninterpreted content of an executable source block to a variable? Preferably, using a :var header argument? That is, return the text in the block, not the result of evaluating it, and preferably with noweb references expanded. "example" blocks return text the way I wa

[O] Org-babel-lilypond midi output in basic mode

2017-09-19 Thread Fred Gruber
Hi Is there a way to get org-babel-lilypond to generate midi of music fragments in basic mode. Ideally when we export the html the images of the music fragments should have a link to the corresponding midi of that fragment. So far it seems that you can only get midi from the arrange mode. thanks

Re: [O] Org-babel Java imports

2017-09-19 Thread Eric S Fraga
On Tuesday, 19 Sep 2017 at 09:51, Tim Jones wrote: > I then tried preceding it with a package statement, which did not work > either. No, a package statement should not be required. The classname matches the java code. What worked for me, accessing a class in another package, was to put ".:PATH2

Re: [O] Org-babel Java imports

2017-09-19 Thread Tim Jones
Eric Thanks for your reply No - that's exactly what I did first, but it did not work. I then tried preceding it with a package statement, which did not work either. It got me thinking that I had now idea how it could resolve dependencies, whether for java packages, which you would expect to be

Re: [O] Org-babel Java imports

2017-09-19 Thread Eric S Fraga
On Friday, 15 Sep 2017 at 14:56, Tim Jones wrote: > Hi > Want to create org docs with embedded java blocks which will generate > testing data > > I have seen > http://ehneilsen.net/notebook/orgExamples/org-examples.html#sec-19 > but have not been able to find an example where there are any import >

[O] Org-babel Java imports

2017-09-15 Thread Tim Jones
Hi Want to create org docs with embedded java blocks which will generate testing data I have seen http://ehneilsen.net/notebook/orgExamples/org-examples.html#sec-19 but have not been able to find an example where there are any import statements e.g. import java.time.*; Can anyone tell me how I mi

Re: [O] org-babel-script-escape problem

2017-09-14 Thread Nicolas Goaziou
Hello, Lawrence Bottorff writes: > In a fresh org file I try this: > > #+begin_src scheme :session mainsession > (define (mysquare x) > (* x x)) > #+end_src > > and get this: > > executing Scheme code block... > => # > : ‘org-babel-script-escape’ expects a string It now prints: : # Please

[O] org-babel-script-escape problem

2017-09-14 Thread Lawrence Bottorff
In a fresh org file I try this: #+begin_src scheme :session mainsession (define (mysquare x) (* x x)) #+end_src and get this: executing Scheme code block... => # : ‘org-babel-script-escape’ expects a string I'm using latest elpa everything (orgmode, geiser) with Racket v6.10.1 as of this morn

Re: [O] org-babel-expand-src-block v.s. org-babel-execute-src-block with Python

2017-09-03 Thread Nicolas Goaziou
Hello, ed...@openmail.cc writes: > I have noticed that doing C-c C-v v (org-babel-expand-src-block) and > C-c > C-c (org-babel-execute-src-block) yield different results in Python. I guess this is related to the :session parameter, which is not obeyed when using "C-c C-v v". > * Question: >

[O] org-babel-expand-src-block v.s. org-babel-execute-src-block with Python

2017-08-31 Thread edgar
Hello, I have noticed that doing C-c C-v v (org-babel-expand-src-block) and C-c C-c (org-babel-execute-src-block) yield different results in Python. I have attached a file with a MWE and a couple of questions to avoid clutter in the mailing list. Thank you in advance :) . ---

Re: [O] org-babel-expand-src-block behavior

2017-08-14 Thread Nicolas Goaziou
Hello, Ken Mankoff writes: > Is there a way to get variables into org-edit-special? Maybe by pre-pending > C-u to C-c '? The problem is not getting the variables into the remote editing buffer. As you noticed, we would only need to remove the read-only status from `org-babel-expand-src-block' o

Re: [O] org-babel-expand-src-block behavior

2017-08-12 Thread Ken Mankoff
On Sat, Aug 12, 2017 at 12:52 PM, Nicolas Goaziou wrote: > > Ken Mankoff writes: > > > and second, if I make changes and then exit the expanded block > > (via C-') without saving, the changes are lost. If I enter > > =org-edit-special= and exit w/o saving, the changes are propagated > > back to t

Re: [O] org-babel-expand-src-block behavior

2017-08-12 Thread Nicolas Goaziou
Hello, Ken Mankoff writes: > Hi, > > I've just learned about =org-babel-expand-src-block= (from [1]) which seems > like an improvement over =org-edit-special=, because variables are expanded. > > But I notice two issues with it, and I'm wondering if these are intentional > or bugs, or if there

[O] org-babel-expand-src-block behavior

2017-08-11 Thread Ken Mankoff
Hi, I've just learned about =org-babel-expand-src-block= (from [1]) which seems like an improvement over =org-edit-special=, because variables are expanded. But I notice two issues with it, and I'm wondering if these are intentional or bugs, or if there are work-arounds. First, the buffer is r

Re: [O] org-babel python eval discrepancy

2017-08-03 Thread Dushyant Juneja
Hey Dov, Bull's eye! Never realized that could hurt. It so happened that I set the correct python version in my shell before starting emacs. However, my bashrc file was hardwired to a different version, which org used every time for evaluating the src blocks. Thanks for the help! Dushyant On Th

Re: [O] org-babel python eval discrepancy

2017-08-03 Thread Adam Porter
Lookup "Org babel results" in Google and you should find the right section of the manual. You need to set the :results keyword.

Re: [O] org-babel python eval discrepancy

2017-08-03 Thread Dov Grobgeld
Shell is using python3 and org-mode python2? On Aug 3, 2017 8:31 PM, "Dushyant Juneja" wrote: > Hi, > > I have the following code block in my org mode based literate programming > notes: > > #+BEGIN_SRC python > print('1+2 > 4 is ', 1+2 > 4) > print("What is 3 + 2?", 3 + 2) > #+END_SRC > > When

[O] org-babel python eval discrepancy

2017-08-03 Thread Dushyant Juneja
Hi, I have the following code block in my org mode based literate programming notes: #+BEGIN_SRC python print('1+2 > 4 is ', 1+2 > 4) print("What is 3 + 2?", 3 + 2) #+END_SRC When I tangle it and run the script, it gives me expected output as follows: > python notes.py 1+2 > 4 is False What is

Re: [O] org babel, ess, R

2017-07-07 Thread Nicolas Goaziou
Hello, John Hendy writes: > Really, it was a comment about how Org behaves, not necessarily a bug. > That said, speaking for myself, I would never want a default session > in interactive mode when I've defined one in the code heading. I'd > love if Org could pick up on that setting, such that th

Re: [O] org babel, ess, R

2017-07-05 Thread Charles C. Berry
On Wed, 5 Jul 2017, Vikas Rawal wrote: "... I'd like Org to pick up the fact that there's a :session argument with a custom name and use that for C-RET in the edit buffer; otherwise it generates the default *R* session there, but if you C-c C-c the block later it puts it into the custom session

Re: [O] org babel, ess, R

2017-07-05 Thread Vikas Rawal
>> >> "... I'd like Org to pick up the fact that there's a :session >> argument with a custom name and use that for C-RET in the edit buffer; >> otherwise it generates the default *R* session there, but if you C-c >> C-c the block later it puts it into the custom session name." > > This is what `

Re: [O] org babel, ess, R

2017-07-05 Thread Charles C. Berry
On Wed, 5 Jul 2017, John Hendy wrote: On Wed, Jul 5, 2017 at 4:22 PM, Nicolas Goaziou wrote: Hello, Vikas Rawal writes: C-RET seems to be picking up the custom session name if it is already there. But otherwise it generates the default *R* session there, Is there a bug to fix? If so, cou

Re: [O] org babel, ess, R

2017-07-05 Thread John Hendy
On Wed, Jul 5, 2017 at 4:22 PM, Nicolas Goaziou wrote: > Hello, > > Vikas Rawal writes: > >> C-RET seems to be picking up the custom session name if it is already >> there. But otherwise it generates the default *R* session there, > > Is there a bug to fix? If so, could start a new thread about i

Re: [O] org babel, ess, R

2017-07-05 Thread Nicolas Goaziou
Hello, Vikas Rawal writes: > C-RET seems to be picking up the custom session name if it is already > there. But otherwise it generates the default *R* session there, Is there a bug to fix? If so, could start a new thread about it, ideally with an ECM demonstrating the issue? Regards, -- Nico

Re: [O] org babel, ess, R

2017-07-04 Thread Vikas Rawal
>> possibility of evaluating the code to test and see what happens? > > Often, but not always. And it would be seriously annoying to have the > session buffer pop up every time I wanted to browse the code in a src block > while simultaneously viewing the results of a previous invocation in

Re: [O] org babel, ess, R

2017-07-03 Thread Charles C. Berry
On Tue, 4 Jul 2017, Vikas Rawal wrote: On 04-Jul-2017, at 1:22 AM, John Hendy wrote: On Sun, Jul 2, 2017 at 7:17 PM, Vikas Rawal wrote: Vikas Rawal writes: Isn’t is what most users need while editing the code block? The possibility of evaluating the code to test and see what happens?

Re: [O] org babel, ess, R

2017-07-03 Thread Vikas Rawal
> On 04-Jul-2017, at 1:22 AM, John Hendy wrote: > > On Sun, Jul 2, 2017 at 7:17 PM, Vikas Rawal > wrote: >>> >>> Vikas Rawal writes: >>> Isn’t is what most users need while editing the code block? The possibility of evaluating the code to test and see what happens? >>> >>> >>> Ma

Re: [O] org babel, ess, R

2017-07-03 Thread John Hendy
On Sun, Jul 2, 2017 at 7:17 PM, Vikas Rawal wrote: >> >> Vikas Rawal writes: >> >>> Isn’t is what most users need while editing the code block? The >>> possibility of evaluating the code to test and see what happens? >> >> >> Many languages do not support sessions. So, the only possibility to >>

Re: [O] org babel, ess, R

2017-07-02 Thread Andreas Kiermeier
> > Thanks Andreas. I am perhaps being to finicky. The problem with your > approach is that you would end up permanently losing screen space for the R > session. I don’t want the R session obstructing my writing when I am not > working on code blocks. Ideally, the R session should appear only when

Re: [O] org babel, ess, R

2017-07-02 Thread Vikas Rawal
> > for what it's worth, I usually run two windows (in the same frame), > side-by-side, with emacs maximised. > On the left I have my org file and on the right I have an R session, which I > start immediately after I open my org file. > When I use C-c ' on an R source block, the org buffer (on t

Re: [O] org babel, ess, R

2017-07-02 Thread Andreas Kiermeier
Hi Vikas, for what it's worth, I usually run two windows (in the same frame), side-by-side, with emacs maximised. On the left I have my org file and on the right I have an R session, which I start immediately after I open my org file. When I use C-c ' on an R source block, the org buffer (on the le

Re: [O] org babel, ess, R

2017-07-02 Thread Vikas Rawal
> > Vikas Rawal writes: > >> Isn’t is what most users need while editing the code block? The >> possibility of evaluating the code to test and see what happens? > > > Many languages do not support sessions. So, the only possibility to > evaluate the code is to evaluate the code block in the s

Re: [O] org babel, ess, R

2017-07-02 Thread Nicolas Goaziou
Hello, Vikas Rawal writes: > Isn’t is what most users need while editing the code block? The > possibility of evaluating the code to test and see what happens? Many languages do not support sessions. So, the only possibility to evaluate the code is to evaluate the code block in the source buf

Re: [O] org babel, ess, R

2017-07-01 Thread Vikas Rawal
> >> When I press C-c' in an R code block to open an edit buffer with ess, on my >> computer, it splits the screen into two side-by-side windows, with the new >> window on the right showing the edit buffer, and the window on the left >> showing the original file. >> >> I would like to change this

Re: [O] org babel, ess, R

2017-07-01 Thread Nicolas Goaziou
Hello, Vikas Rawal writes: > When I press C-c' in an R code block to open an edit buffer with ess, on my > computer, it splits the screen into two side-by-side windows, with the new > window on the right showing the edit buffer, and the window on the left > showing the original file. > > I would

Re: [O] org babel, ess, R

2017-06-30 Thread Vikas Rawal
> > When I press C-c' in an R code block to open an edit buffer with ess, on my > computer, it splits the screen into two side-by-side windows, with the new > window on the right showing the edit buffer, and the window on the left > showing the original file. > > I would like to change this b

[O] org babel, ess, R

2017-06-30 Thread Vikas Rawal
When I press C-c' in an R code block to open an edit buffer with ess, on my computer, it splits the screen into two side-by-side windows, with the new window on the right showing the edit buffer, and the window on the left showing the original file. I would like to change this behaviour in two way

Re: [O] Org-babel for sending emails

2017-04-09 Thread John Kitchin
I do not know of any org-babel stuff. I use some functions here: https://github.com/jkitchin/scimax/blob/master/scimax-email.el for emailing headings and for mail-merge like features. You may find some of them suitable for your needs. Giri Prashanth writes: > Hi, > > Is there a dedicated org-b

  1   2   3   4   5   6   >