[O] Asynchronous session evaluation

2019-06-01 Thread Jack Kamm
wn the functionality. But, I hope something like this could be merged in supporting just a subset of languages initially, then gradually increasing the number of supported languages over time. >From f1c198a85666507164e9a97a7e0758f1d5dcf126 Mon Sep 17 00:00:00 2001 From: Jack Kamm

Re: [O] Asynchronous session evaluation

2019-08-17 Thread Jack Kamm
Hello, Nicolas Goaziou writes: > This sound interesting. I hope this is not going to bit-rot while we're > waiting for feedback. Since my last e-mail, I ported this code to a separate package here: https://github.com/jackkamm/ob-session-async I've been slowly ironing out various kinks, and it'

Re: [O] Asynchronous session evaluation

2019-08-24 Thread Jack Kamm
In case any org-babel R users are interested, this package is now basically ready to use, and I've added a Readme on how to use it: https://github.com/jackkamm/ob-session-async I plan to add more languages, and to eventually contribute this functionality back to org-mode when it's ready.

Re: [O] org-agenda-todo obliterates my windows

2019-08-29 Thread Jack Kamm
> Is there any way to just open my org-agenda-todo items in the /current/ > window, or even just any window that already happens to be open, without > modifying, splitting, or above all deleting any others? Does customizing the variable org-agenda-window-setup (e.g. by setting it to 'current-windo

Re: Refresher on including R/ggplot2 output via latex/pdf?

2019-10-27 Thread Jack Kamm
Your code block looks fine to me. The typical R code block headers I use is as follows: :session :results output graphics :file path/to/file.png :exports results :eval never-export One thing I've noticed, if I have an existing graphics device open, it can mess up plots when executing an org-bab

Re: Refresher on including R/ggplot2 output via latex/pdf?

2019-10-27 Thread Jack Kamm
John Hendy writes: > On Sun, Oct 27, 2019 at 11:31 PM Jack Kamm wrote: >> >> Your code block looks fine to me. The typical R code block headers I use is >> as follows: > > Did you try to reproduce my example, by chance? I've just now tried executing/exporti

Re: Refresher on including R/ggplot2 output via latex/pdf?

2019-10-27 Thread Jack Kamm
> This is with emacs -Q and loading the minimal config from the initial > email. Any ideas on where I might look next? Sorry, I don't have many ideas here. Have you checked that ggplot works fine in a regular R session? I tried again with emacs -Q and the minimal config below and it still worked

Re: Refresher on including R/ggplot2 output via latex/pdf?

2019-10-28 Thread Jack Kamm
> 2) why does this [still] work for Jack? (Jack, what's M-x org-version for > you?) I tested on my laptop and desktop, both work for me, they are running the following 2 versions of org: Org mode version 9.2.4 (9.2.4-13-g9a543b-elpaplus @ /home/jack/.emacs.d/elpa/org-plus-contrib-20190729/) Or

Re: Refresher on including R/ggplot2 output via latex/pdf?

2019-10-29 Thread Jack Kamm
> Closing the loop. I can confirm that my example works on this commit > (one before the relevant change) (thanks, Chuck!). > > commit ed9bdfd220b75233e5bae2ef39164d14624060fa (HEAD) > Merge: 0954d4c25 0ae2e656d > Author: Marco Wahl > Date: Fri Oct 5 00:54:19 2018 +0200 > > Completely stumped on

Re: Publish to PDF on Linux: An impossible task?

2019-11-11 Thread Jack Kamm
John Hendy writes: > By "LaTeX" I mean "that which is necessary to have a functioning latex > system." If by lower-level you mean the ecosystem itself vs. compiling > errors, completely agree. Clearly some core components are missing. > For example, the texmf.cnf file is provided by the arch pack

Re: [O] Cannot display local images with orgmode under macOS

2019-11-17 Thread Jack Kamm
Hello, I want to report that this bug is not specific to macOS, and also affects Linux. Specifically, I am running Archlinux-packaged emacs 26.3, and am encountering this same issue. Ever since commit 48da60f47a77f4b99b4160fa620f258896ff4da3, org-mode no longer displays inline images for me. I t

Re: [O] Cannot display local images with orgmode under macOS

2019-11-17 Thread Jack Kamm
doesn't work, maybe because imagemagick tries to create a 0-width image. The attached patch reverts to the old behavior of only using imagemagick when width is non-nil, fixing the bug introduced by 48da60f47. >From cebf2b4001015dabc74364ac2a5bf2ed64c07ab0 Mon Sep 17 00:00:00 2001 From: Jack

Re: Opening org Agenda whenever opening GNUs:

2019-11-25 Thread Jack Kamm
> I'd like to be able to have it split vertically, since it otherwise > obscures my view. How can I do that? I haven't tested this, but I think the following would accomplish what you want: (defun my-instant-agenda () (let ((org-agenda-window-setup 'current-window)) (select-window (split-wi

Displaying remote images

2019-11-28 Thread Jack Kamm
When trying to display a remote image file in an org-mode buffer, I only see a blank square instead of the image. This is a longstanding problem, and there was an attempt to patch it in 2014, but the patch was never accepted: https://lists.gnu.org/archive/html/emacs-orgmode/2014-11/msg00583.html

Re: Displaying remote images

2019-11-28 Thread Jack Kamm
Hi Brian, > Emacs and OrgMode do many great things; but, the focus has always been, at > it's core, the most powerful editor and stateless organizing software--it's > not a browser of dynamically generated Internet pics--Emacs W3 was created > to do that, and it hasn't been updated in years--sugge

Re: Displaying remote images

2019-11-28 Thread Jack Kamm
0b6ca716325d7de86924e1d28e Mon Sep 17 00:00:00 2001 From: Jack Kamm Date: Thu, 28 Nov 2019 17:45:56 -0800 Subject: [PATCH] org: display remote images --- lisp/org.el | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 90f222c8b..dc7bcc

Re: Refresher on including R/ggplot2 output via latex/pdf?

2019-11-30 Thread Jack Kamm
> 2) why does this [still] work for Jack? (Jack, what's M-x org-version for > you?) This thread is old, but I finally realized why we were having discrepant results. It's because I was installing org-plus-contrib from org-mode ELPA via package.el, which pulls from "maint" branch. Since I've swit

Re: Displaying remote images

2019-12-07 Thread Jack Kamm
After test-driving this patch for a bit, the main issue I foresee is that this can potentially hang Emacs if loading a lot of images over a slow SSH connection. This was also discussed in the previous thread from 2014. I plan to mitigate this with an option to enable/disable/cache the remote image

Re: restore window configuration after org-edit-src-exit

2019-12-17 Thread Jack Kamm
I'd like to add a vote for the old behavior. I only recently noticed the new behavior, and agree with Richard that it's inconvenient. I think many of us missed this change because it wasn't in 9.2. In particular, I'd propose to make the old behavior the default, and hide the new behavior behind an

Re: restore window configuration after org-edit-src-exit

2019-12-17 Thread Jack Kamm
Sorry for the noise, but I just had another thought: Rather than adding a new option, how about we make the behavior dependent on the value of org-src-window-setup? Basically, when org-src-window-setup is current-window, it never makes sense to restore the original layout. But when org-src-window

Re: restore window configuration after org-edit-src-exit

2019-12-22 Thread Jack Kamm
Hi, > I think any value that modifies the current layout ought to restore it: > - `split-window-below' > - `split-window-right' > - `reorganize-frame' > > OTOH, values that use the current layout should not restore it > afterwards: > - `current-window' > - `other-window' > - `other-frame' > > This

Re: restore window configuration after org-edit-src-exit

2019-12-23 Thread Jack Kamm
> OK. Would you want to implement it? Yes, but I'm still in the process of updating my copyright papers for my current job. My job said they won't be able to sign the copyright disclaimer until the new year, so I expect this to be sorted out later in January some time. However, the change here is

[PATCH] restore window configuration after org-edit-src-exit

2019-12-23 Thread Jack Kamm
/archive/html/emacs-orgmode/2018-11/msg00253.html >From 03a2b9433f1ad15ac21a49e7f0c6c5390e9e4375 Mon Sep 17 00:00:00 2001 From: Jack Kamm Date: Mon, 23 Dec 2019 08:55:55 -0800 Subject: [PATCH] org-src: restore windows for some values of org-src-window-setup --- etc/ORG-NEWS| 3 +++ lisp/

Re: [PATCH] restore window configuration after org-edit-src-exit

2020-01-09 Thread Jack Kamm
/elisp/Quitting-Windows.html) to restore the window configuration after editing. I'll start a new thread/RFC/patch for this later this month, when I have a bit more time. >From 8d1cf7500d69823bc4869248bbe251758d3dcdda Mon Sep 17 00:00:00 2001 From: Jack Kamm Date: Mon, 23 Dec 2019 08:55:55 -08

Keyboard macros and export dispatcher

2020-01-09 Thread Jack Kamm
Hello, I have an org-mode file, and am exporting one of its subtrees to a beamer presentation. I would like to use a keyboard macro for this, because re-exporting the presentation requires a lot of keypresses: - Jump to the appropriate heading - Start the dispatcher - Toggle subtree export (C-s)

Re: Keyboard macros and export dispatcher

2020-01-09 Thread Jack Kamm
Hello, Kyle Meyer writes: > As an alternative, can't you type `C-u C-c C-e` (i.e. call > org-export-dispatch with a prefix argument)? Thank you for the suggestion -- this accomplishes exactly what I want! Next time, I'll remember to RTFM before asking for help :P Cheers, Jack

Re: Keyboard macros and export dispatcher

2020-01-09 Thread Jack Kamm
Hello, John Hendy writes: > I had no problem doing the following: > > - C-x ( > - C-e C-s l p C-n > - C-x ) > - go to first of my results headlines > - C-u 51 C-x e > > It sounds like you already tried this... are you using `C-x (` or are > you defining the macros via elisp? I'm doing the follo

Re: [PATCH] restore window configuration after org-edit-src-exit

2020-01-14 Thread Jack Kamm
By the way -- I just got my copyright papers officially updated for my current job -- so we don't need to worry about line counts and whatnot anymore :) Best, John "Jack" Kamm

[RFC PATCH] Changes to pop-up source buffers

2020-01-18 Thread Jack Kamm
3c75eee7ece302abecf75a Mon Sep 17 00:00:00 2001 From: Jack Kamm Date: Sat, 18 Jan 2020 07:55:48 -0800 Subject: [PATCH] org-src: use display-buffer, quit-restore-window for source buffers --- etc/ORG-NEWS| 14 --- lisp/org-src.el | 65 +++-

Re: [RFC PATCH] Changes to pop-up source buffers

2020-01-18 Thread Jack Kamm
Hi Sam, > for me, trying to get commands or functions that call pop-to-buffer to > behave as i need them to, which is to say, for them to use the full > (and same) window for accessibility reasons,* has been so unfixable in > the past that i had to give up. Thank you for raising this, I wasn't aw

Re: [RFC PATCH] Changes to pop-up source buffers

2020-01-19 Thread Jack Kamm
al splits. I'm not sure why. >From a9cb8889df25697ff73e7c1e72987dac01875c8a Mon Sep 17 00:00:00 2001 From: Jack Kamm Date: Sun, 19 Jan 2020 08:28:36 -0800 Subject: [PATCH] org-src: Add option 'plain to org-src-window-setup * lisp/org-src.el (org-src-window-setup): Add option 'plain for o

Re: Displaying remote images

2020-01-19 Thread Jack Kamm
added an option to cache the remote images by visiting them in Emacs buffers. The default behavior is not to display remote images, but to issue a message that references the option that controls remote image display. Best, Jack >From 88c37616fc7b910deec34f3013af36ceca8cde9b Mon Sep 17 00:00:

[PATCH] Fix several issues with python session value blocks

2020-01-20 Thread Jack Kamm
_src python :session :results value value = "failure" if False: pass else: value = "success" value #+end_src This block should return "success", but previously it returned "failure": #+begin_src python :session :results value _ = "failure&

Re: [RFC PATCH] Changes to pop-up source buffers

2020-01-21 Thread Jack Kamm
s 26.3, vanilla config) and still see > the behavior I reported. Oh well. I tested again, with "emacs -q" this time, and got the behavior you reported. So it must be something with my config. >From 0db0adc4f20d8c664976b89cbe033f5579e1fdc5 Mon Sep 17 00:00:00 2001 From: Jack Kamm

Re: [PATCH] Fix several issues with python session value blocks

2020-01-22 Thread Jack Kamm
5a3a1 Mon Sep 17 00:00:00 2001 From: Jack Kamm Date: Mon, 20 Jan 2020 17:40:22 -0800 Subject: [PATCH] ob-python: Fix several issues with :session :results value * lisp/ob-python.el (org-babel-python-evaluate-session): Fix a few related issues with :session :results value blocks, including b

Re: Displaying remote images

2020-01-24 Thread Jack Kamm
the RAWFILE argument. My thinking is that the user might want to view the image in its own buffer later, and if the RAWFILE argument is set, then they'd either see the raw file, or get a message asking to revisit the file normally. >> +(`skip-warn (message >> + (conc

Re: [PATCH] Fix several issues with python session value blocks

2020-01-26 Thread Jack Kamm
> thanks for your patch - Kyle is on it, but IIRC we do not have a > maintainer for the ob-python.el file. > > Would you like to take this in charge? Or someone else? Sure, I would be interested in this, if it's helpful. I need an account for code.orgmode.org, and whatever commit permissions you

Re: Bug: R src blocks fail to produce link to graphics file [9.3 org-plus-contrib-20200127]

2020-01-27 Thread Jack Kamm
> #+begin_src R :results graphics :file test.jpg > plot (1:10) > #+end_src It should now be ":results graphics file". This behavior changed in Org 9.3, see https://orgmode.org/Changes.html (:file header argument no longer assume "file" :results).

Re: emacs build command for org-files

2020-01-27 Thread Jack Kamm
John Kitchin writes: > If there was a lispy version of make that made this possible, I would > use it. This is an aside, but GNU Make can use Guile Scheme as an embedded extension language: https://www.gnu.org/software/make/manual/html_node/Guile-Integration.html I don't think this solves any

Re: Bug: R src blocks fail to produce link to graphics file [9.3 org-plus-contrib-20200127]

2020-01-27 Thread Jack Kamm
> Is the rationale explained anywhere? After a bit of poking around, it looks > like using the `:file` flag without a `file` argument to results doesn't do > anything (no file is created), nor does the reverse. That is, unless you use > both the `file` argument and the `:file` option, nothing ha

Re: customizing Org for legibility

2020-02-01 Thread Jack Kamm
> One thing I don't understand: It seems that GUI and terminal modes are > completely different. Rather than constrain GUI defaults to terminal > limitations, it makes sense to gracefully degrade them when a terminal > is detected. I assume that terminal users don't care about variable > pitch. The

Re: [PATCH] Fix several issues with python session value blocks

2020-02-03 Thread Jack Kamm
it in, however I did add back a call to "raise" in the exception block, so that the error would appear in the REPL (which was the general behavior for shell, R, and Julia errors). >From 572ca9fd8c89720acd8d7d2ace8bb3c0be3d288e Mon Sep 17 00:00:00 2001 From: Jack Kamm Date: Mon, 20 Jan

Re: [PATCH] Fix several issues with python session value blocks

2020-02-03 Thread Jack Kamm
Kyle Meyer writes: >> I'd like to do the honors of making my first push to the repo :) So >> please let me know if you're fine with me to proceed. > All good from my end :> Thanks -- I've pushed to master :D

Re: org-babel-load-file support elisp

2020-02-03 Thread Jack Kamm
Tim Cross writes: > All other language specifiers comply to the pattern of source block > languages being the language major mode name without the '-mode', but > there is no elisp-mode. Sorry to be pedantic, but I think shell source blocks are another exception here. They can use various synonym

Re: A few changes to test in master

2020-02-03 Thread Jack Kamm
Bastien writes: > - M-x org-table-electric-header-mode RET will display the first row > of the table at point in the header line when the first row is not > visible anymore. This is great, it's a huge quality-of-life improvement for working with long tables. Below are some issues I noticed w

Re: [PATCH] Fix several issues with python session value blocks

2020-02-04 Thread Jack Kamm
Hi Bastien, Bastien writes: > Thanks a lot! Nitpicking, there is this new warning: > > In toplevel form: > ob-python.el:309:1: Warning: Unused lexical variable ‘last-indent’ > > Can you fix it? Oops, sorry for letting that slip through, and t

Re: org-babel strange html print in R

2020-02-07 Thread Jack Kamm
Dominique Dumont writes: > On my system, org-mode 3.6.1 provides the expected table. My system produces the expected table as well (org 9.3.2, R 3.6.2). --Jack

Re: A few changes to test in master

2020-02-07 Thread Jack Kamm
Hi Bastien, Bastien writes: >> The variable `org-table-header-line-p' doesn't seem to have any effect >> for me, I find that I need to call "M-x org-table-header-line-mode" even >> when it's set. > > Should be fixed now. Confirmed, it works correctly for me now. >> Also, "M-x org-table-header-

Re: org-babel strange html print in R

2020-02-07 Thread Jack Kamm
Hi Jeremie, > Thanks for the info. > Unfortunately I couldn't identify the issue > I updated R and org (org 9.3.2, R 3.6.2). > but I'm still getting [the error] Sorry, I missed the initial property line where you set the ":session" header argument. When I set the ":session" header argument, I g

Re: A few changes to test in master

2020-02-07 Thread Jack Kamm
ound colors in >> the default face? > > Sure - would you like to suggest a patch for this? Sure, see the patch below. >From 2922d104b3508b1269c17ad0a28103bd912e308b Mon Sep 17 00:00:00 2001 From: Jack Kamm Date: Fri, 7 Feb 2020 18:04:59 -0800 Subject: [PATCH] org-faces.el: Add foregro

Re: Powershell scripting with org-babel

2020-02-10 Thread Jack Kamm
Hi Klaus, MS Window writes: > There is no explanation there I should put the configuration. The org-babel > documentation is too brief for me as beginner to understand. First, save that file somewhere. Then, in your emacs config, add the directory containing ob-powershell.el to the `load-path'

Re: org-babel strange html print in R

2020-02-11 Thread Jack Kamm
Hi, stardiviner writes: > You should try ~:results value html~. Here is what I got correctly: Yes, this seems like the best solution for this case. On the other hand, it would be desirable if ":results output" didn't mangle the output, due to trying to clean up prompts. There is probably some

Re: org-babel strange html print in R

2020-02-11 Thread Jack Kamm
Hi, Jeremie Juste writes: > :results value html in the following code generates an error for me. > (Org mode version 9.2.3,R version 3.6.2). > but :results value output the "html" in an org-table format Hmm, I can confirm that ":session :results value html" is working for me, same as for stard

[PATCH] (Tiny) Tweak Python session null return value

2020-02-17 Thread Jack Kamm
(empty) result instead of "None". [0] https://lists.gnu.org/archive/html/emacs-orgmode/2020-01/msg00190.html Best, Jack >From 0b44c3f1c7454e7948cd34eb02995924046b6976 Mon Sep 17 00:00:00 2001 From: Jack Kamm Date: Mon, 17 Feb 2020 08:11:49 -0800 Subject: [PATCH] ob-python: Sessio

Re: Bug: R src blocks fail to produce link to graphics file [9.3 org-plus-contrib-20200127]

2020-02-17 Thread Jack Kamm
Hi Tyler, >> The documentation for ob-R is now incorrect: >> >> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html > > Yes, also that page could use some other updates, e.g. there are some > dead links in there. Just saw that you updated the docs a few days ago. Thanks for takin

Re: [PATCH] (Tiny) Tweak Python session null return value

2020-02-17 Thread Jack Kamm
Hi John, John Kitchin writes: > I think None is correct. If you don't specify a return value in Python, > then a function returns None. I would expect that to happen in a Python > block too. Hmm, OK, thanks for your intuition, it's useful feedback. Working this out loud, I was considering the

Re: [PATCH] (Tiny) Tweak Python session null return value

2020-02-17 Thread Jack Kamm
Hi Bastien, > I've seen you update the NEWS entry, which is good: is there a way to > present the enhancements in the "* New features" section? If you feel > like it, please advertize the enhancements there too. Given John's feedback, I now think it's better to put off this change to 9.5, if at

Re: [PATCH] (Tiny) Tweak Python session null return value

2020-02-17 Thread Jack Kamm
Hi John, John Kitchin writes: > I can see why you would want to see True/False there, but to get the value, > you need to specifically return what you want because AFAIK the body is > wrapped in a function that is evaluated to get the value, it is not simply > the last thing that gets evaluated.

Re: [PATCH] Fix ob-python.el initiate session error with py-shell

2020-02-18 Thread Jack Kamm
Hi stardiviner, > This minor patch should fixed ~py-shell~ initiate Python session issue. It looks like this patch only affects users of python-mode.el. Since I don't use python-mode.el, I cannot test it. But the patch looks fine. Please add a commit message and changelog entry, and I'll merge it

Re: [PATCH] Fix ob-python.el initiate session error with py-shell

2020-02-18 Thread Jack Kamm
Hi stardiviner, Sorry for the noise, I have some additional comments below: When I run "make compile", I get the following message: In org-babel-python-initiate-session-by-key: ob-python.el:211:12:Warning: py-shell called with 9 arguments, but accepts only 0-1 I think this is because the "(

Re: [PATCH] Fix ob-python.el initiate session error with py-shell

2020-02-19 Thread Jack Kamm
Hi stardiviner, "numbch...@gmail.com" writes: > Yes, Jack, as Bastien said, you can format my commit, because my home > network is broken, I'm using Mobile Phone's 4G network to get online. Can't > get update immediately. OK, I've edited the commit message of your patch, and I also fixed the co

Re: Make ob-python.el support ":results pp" pretty print result

2020-02-20 Thread Jack Kamm
Hi stardiviner, stardiviner writes: > I found ob-python does not support ":results pp" pretty print result. And > Python > has a module "pprint". What about add support this? Well, there is code in ob-python.el that uses the pprint module when ":results pp", but I must admit I've never used it

Re: [PATCH] Fix ob-python.el initiate session error with py-shell

2020-02-20 Thread Jack Kamm
Hi, Bastien writes: > Also, for included ob-*, the idea would be to use the mode that are > bundled with Emacs core. For Python, it would mean that ob-python.el > should support python.el, not python-mode.el. I agree that ob-python.el should only rely on functionality from python.el, and shoul

Re: Bug or not a bug? dot expansion in ob-shell

2020-02-21 Thread Jack Kamm
Hi, Nick Dokos writes: >> That said, we have three solutions: >> >> 1. Stick to a strict reading of Org and bash manuals: the absence of a >>:results header means "return the value, i.e. the exit status". >> >> 2. Deviate from this strict reading, introduce an exception for *all* >>shell

Re: Make ob-python.el support ":results pp" pretty print result

2020-02-22 Thread Jack Kamm
Hi stardiviner, stardiviner writes: > I found ob-python does not support ":results pp" pretty print result. And > Python > has a module "pprint". What about add support this? ":results pp" works for me, here's an example: > #+begin_src python :results pp > return globals() > #+end_src > >

Re: Bug or not a bug? dot expansion in ob-shell

2020-02-23 Thread Jack Kamm
Hi Stefan, Stefan Nobis writes: > What about a third collection option 'none' and make this the default? A variant on this idea, would be to instead have the third collection option be 'default', which would stand for a language-specific default. For example, ":results default" could be equival

Re: ob-python.el: questions about output

2020-02-23 Thread Jack Kamm
Hi RC, R C writes: > 1. Is it possible to have both types of output displayed from a single src > block to avoid having to duplicate the src block, using :exports results > for one and :exports both for the other? No, there's no option to output both ":results output" and ":results value". If

Re: ob-python.el: questions about output

2020-02-23 Thread Jack Kamm
Sorry, my email had a typo: > #+begin_src python :session session1 :results output > x > #+end_src That should be ":results value".

Re: ob-python.el: questions about output

2020-02-24 Thread Jack Kamm
Hi RC, R C writes: > My python src blocks often have both graphical output as well as the > results of some numerical calculation displayed using print statements. > > When exported I would like the line: return 'img/ex1.png' not to be > included in the listing of the src block. > > Also, the ou

Re: ob-python.el: questions about output

2020-02-24 Thread Jack Kamm
Hi Eric, "Fraga, Eric" writes: > Longer term, better would be an implementation of :prologue and > :epilogue options for python src blocks like we have for Maxima. It > would probably make sense to provide these options for most if not all > src blocks? This sounds interesting. Do you know of

Re: correct remote path handling

2020-02-25 Thread Jack Kamm
Hi Felipe, Felipe Lema writes: > I bumped into a problem running src blocks using a remote (tramp) :dir. I've > looked into it and found that the problem is that a temporary file is passed > as a remote path to the remote process (temp file should be local to remote > process). Thanks for fi

Re: Bug or not a bug? dot expansion in ob-shell

2020-02-29 Thread Jack Kamm
Hi Bastien, Bastien writes: > thanks for your thoughtful inputs. I've now removed the option. I think it's good you removed the option. However, it looks like the behavior now is to return the output, instead of the exit code, when ":results value". According to my reading of this thread, mo

Re: Bug or not a bug? dot expansion in ob-shell

2020-02-29 Thread Jack Kamm
Sorry, I was confused about this: > According to my reading of this thread, most of the commenters were in > agreement that we should keep the original behavior and return the exit > code, as we do in 9.3. Actually, it looks like ":results value" does return the exit code. I just got confused bec

Re: correct remote path handling

2020-02-29 Thread Jack Kamm
Hi Felipe, It looks like you've made some quite substantial changes to ob-shell. I think it would be a good idea to split this up into 2 patches, and to start a new thread for the ob-shell patch. I'm not as familiar with ob-shell, and it's also had some work lately. So it'd be good to get some m

Re: Bug or not a bug? dot expansion in ob-shell

2020-02-29 Thread Jack Kamm
Hi Tom, Tom Gillespie writes: > First a disclosure, I would be very unhappy if option 1 were selected, > it would require me to make a whole bunch of changes and try to find > an option to revert to the current default behavior. Wasn't option 1 already the default behavior, until the changes ma

Re: Bug or not a bug? dot expansion in ob-shell

2020-02-29 Thread Jack Kamm
Hi Tom, Tom Gillespie writes: > As with many things in emacs, I sometimes feel like I'm loosing my > mind, or loosing track of just exactly what variables are set You're not losing your mind. After some further testing I find that you're right, and my understanding of the situation was incorrec

Re: Bug or not a bug? dot expansion in ob-shell

2020-03-01 Thread Jack Kamm
As someone who doesn't really use ob-shell, I've made too much noise in this thread, and am intending this to be my last comment here... I think it's a bad idea that ":results value", and not specifying ":results", give different behavior. In my own Org-babel files, I usually have a header line l

Re: Bug: HTML not formatted correctly from R source code block [9.3.6 (9.3.6-23-g01ee25-elpaplus @ /home/opdfa/.emacs.d/elpa/org-plus-contrib-20200309/)]

2020-03-10 Thread Jack Kamm
Hi Steve, Steven Delean writes: > HTML table produced from a source code block (using R code) does not display > because html code is not formatted correctly in the exported html output. I believe this is the same issue as reported here: https://lists.gnu.org/archive/html/emacs-orgmode/2020-02/

[O] ob-python newline & indentation behavior

2017-11-18 Thread Jack Kamm
cs-orgmode/2015-03/msg00505.html The patch follows the python.el behavior of using a temporary file and executing that from the shell. Could this patch, or something similar, be incorporated into org-mode, to fix this behavior? Thanks, Jack Kamm

Re: [O] ob-python newline & indentation behavior

2017-11-18 Thread Jack Kamm
block to the tmpfile, unless it is indented. I've never contributed before so would appreciate any comments on this patch, and how to get it accepted. Cheers, Jack. >From a5d553ece9f6ee35cd1e273e554a21a19e80ec3c Mon Sep 17 00:00:00 2001 From: Jack Kamm Date: Sat, 18 Nov 2017 21:47:09 +

Re: [O] ob-python newline & indentation behavior

2017-11-18 Thread Jack Kamm
rim-right Here is the new version of the patch: >From f009da37d3b7e2730abb8cbb10f4d07b3d456dd8 Mon Sep 17 00:00:00 2001 From: Jack Kamm Date: Sun, 19 Nov 2017 07:13:56 + Subject: [PATCH] Squashed commit of the following: commit d1fe88a9f61a8e7082f08b7c190a29737bb655d5 Author: Jack Kamm Da

Re: [O] ob-python newline & indentation behavior

2017-11-20 Thread Jack Kamm
Hi Kyle, In response to this: I can't think of a good solution, though. Stepping back a bit, I think > it's unfortunate that python blocks handle ":results value" differently > depending on whether the block is hooked up to a session or not. For > non-sessions, you have to use return. Using th

Re: [O] ob-python newline & indentation behavior

2017-11-21 Thread Jack Kamm
:results value" unchanged for now. Sorry for sending this twice Kyle, forgot to reply all. On 21 Nov 2017 4:04 am, "Kyle Meyer" wrote: > Jack Kamm writes: > > > In response to this: > > > >> I can't think of a good solution, though. Stepping

Re: [O] ob-python newline & indentation behavior

2017-11-26 Thread Jack Kamm
hould we start another thread to discuss this? Jack On Tue, Nov 21, 2017 at 8:28 AM, Jack Kamm wrote: > Yes, I'm starting to see now how difficult it is to properly support > ":session :results value". I would vote to remove it from ob-python... > > I think the patch still

Re: [O] ob-python newline & indentation behavior

2017-11-26 Thread Jack Kamm
gsexton/ob-ipython > > Best, > Ista > > On Tue, Nov 21, 2017 at 3:28 AM, Jack Kamm wrote: > > Yes, I'm starting to see now how difficult it is to properly support > > ":session :results value". I would vote to remove it from ob-python... > > &g

Re: [O] Git repository error

2017-12-18 Thread Jack Kamm
Josiah Schwab writes: I'm having the same issue as Josiah, are others able to pull from the git repo? Jack > Hello, > > For about the past day, I've been getting this error upon running 'make > update' from my local Org repository: > > fatal: read error: Connection reset by peer > error: Co

[O] recent ESS commit breaks org-babel-R session output capture

2018-07-02 Thread Jack Kamm
Hello all, An ESS commit last week broke org-babel-R session output capture. In particular, the following no longer works: #+BEGIN_SRC R :session :results output print("hello") #+END_SRC The code runs but org-babel fails to capture the output and place it in the buffer. I think the breakage

Re: [PATCH] async process in R

2021-10-02 Thread Jack Kamm
Hi Jeremie, Many thanks for bringing this over the finish line! I'm very glad it made it into Org 9.5. All the tests passed on my end, and and I successfully ran a few async R blocks without any issues. I do have some suggestions for code style below. They apply to both the original patch, as we

Re: [PATCH] async process in R

2021-10-02 Thread Jack Kamm
Hi Jeremie and Chuck, >> But changing to `:async yes', the error aborts in a way that omits the >> output. > > Interesting, I haven't thought about errors cases enough. Async process > will be on the 9.5 release and this issue will be next on the todo list. > Many thanks again for the feedback.

Re: [PATCH] async process in R

2021-10-02 Thread Jack Kamm
I just noticed one more thing, regarding ess-eval-visibly etc: >> + (setq user-inject-src-param ess-inject-source) >> (setq ess-eval-visibly nil) >> + (setq ess-inject-source 'function-and-buffer) >> (ess-eval-buffer nil)) >> - (setq ess-eval-visibly tm

Re: [BUG] ob-python :results value pp does not working

2021-12-30 Thread Jack Kamm
For non-session Python blocks, you need to use "return" on the value, as if you are in a function. The following works for me: #+begin_src python :results value pp dic = {'key1': 1, 'b': 2} return dic #+end_src #+RESULTS: : {'b': 2, 'key1': 1}

Re: [BUG] ob-python :results value pp does not working

2021-12-31 Thread Jack Kamm
Hi Christopher, > This might need to mentioned in Org manual and in ob-python.el source > code with comment. WDYT? The main documentation for this is in the Worg page for ob-python, in particular see the section "Return values": https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-python.

Re: R terminal output does not match src block output due to ">" character in results

2022-01-23 Thread Jack Kamm
Hi John, > $ git log > commit 7fa8173282f85c2ca03cc7f51f28f6adfb250610 (HEAD -> master, > origin/master, origin/HEAD) > Author: Ian Martins > Date: Sat Jan 16 15:52:21 2021 -0500 It looks like the last commit you're on is from about a year ago (Jan 2021), so I suspect you're on an older versio

Re: Improving Org Mode for VSCode - Thinking Aloud

2020-05-24 Thread Jack Kamm
It would be very good indeed for org-babel if it could be ported to other editors. One of the biggest drawbacks of org-babel notebooks is that I can't collaborate with my colleagues on them, since I can't expect them to use Emacs. Aside from VSCode, I think RStudio would be an excellent target for

Re: Bug: ob-python mangles multiline :var values [9.3.6 (release_9.3.6-397-ga089600)]

2020-05-24 Thread Jack Kamm
Hello, Thanks for reporting. I've just fixed this issue in master (commit 6149b6cb6). The problem was that ob-python adds tab indentation to the code body before putting it inside a main() function, which adds spurious indentation to multiline strings passed through :var. I fixed the issue by mo

Re: Bug: ob-python mangles multiline :var values [9.3.6 (release_9.3.6-397-ga089600)]

2020-05-27 Thread Jack Kamm
Hi Matt -- > A heads up... I believe this changes the scope of the :var variables, > since they previously were local to the main() function and now they are > declared globally. After this change, some of my existing python source > blocks (i.e., ones in which I attempt to assign a new value to a

Re: Bug: ob-python mangles multiline :var values [9.3.6 (release_9.3.6-397-ga089600)]

2020-05-28 Thread Jack Kamm
weeks). In the meantime, I think it better to leave the original bug in place, rather than break any existing ob-python use cases. When I do get to this, I'll submit it as a patch to the list first, to make sure I don't accidentally cause a new bug. Best, Jack Jack Kamm writes: > Hi

Re: Bug: ob-python mangles multiline :var values [9.3.6 (release_9.3.6-397-ga089600)]

2020-06-06 Thread Jack Kamm
d shouldn't be indented. I also added a couple more unit tests, one for multiline strings, and one for the variable scope/assignment issue that Matt reported. Cheers, Jack >From 179178d39f6216172e1a070f570cf941f99b1a89 Mon Sep 17 00:00:00 2001 From: Jack Kamm Date: Sat, 6 Jun 2020 10:59:23 -0

Re: Bug: ob-python mangles multiline :var values [9.3.6 (release_9.3.6-397-ga089600)]

2020-06-09 Thread Jack Kamm
Hi Kyle, Thanks for the code review which was very helpful as always. I've fixed the style and compile errors that you noticed, and pushed the commit to master. Cheers, Jack

Re: Bug: org-babel python with :results value sends function definition with a statement after a for loop to the shell incorrectly [9.3.6 (9.3.6-elpa @ /home/username/.emacs.d/elpa/org-9.3.6/)]

2020-07-19 Thread Jack Kamm
> I redid the test but loaded the lastest org-mode and there was no > error. This means you probably don't need to debug this. It has been > fixed in the latest version, but the fix hasn't been updated in the > elpa package yet. you can either wait for the next release or pull > the latest code fr

  1   2   3   >