Re: [PATCH] Async sessions: Fix prompt removal regression in ob-R

2024-11-01 Thread Jack Kamm
Ihor Radchenko writes: > Jack Kamm writes: > >> Thanks for the suggestions, all of which I agree with. I've updated the >> patches accordingly, and also rebased them to most recent versions of >> bugfix/main. > > Thanks! > I have no more comments. LGTM. > Feel free to push. Thanks -- just pushe

Re: [PATCH] Async sessions: Fix prompt removal regression in ob-R

2024-10-28 Thread Ihor Radchenko
Jack Kamm writes: > Thanks for the suggestions, all of which I agree with. I've updated the > patches accordingly, and also rebased them to most recent versions of > bugfix/main. Thanks! I have no more comments. LGTM. Feel free to push. -- Ihor Radchenko // yantar92, Org mode contributor, Lear

Re: [PATCH] Async sessions: Fix prompt removal regression in ob-R

2024-10-27 Thread Jack Kamm
Ihor Radchenko writes: >> + (t (error (format "Unrecognized prompt handling behavior %s" >> + (symbol-name prompt-handling)) > > I think that `symbol-name' is unnecessary here. > It will lead to cryptic error if PROMPT-HANDLING happens to be something > t

Re: [PATCH] Async sessions: Fix prompt removal regression in ob-R

2024-10-22 Thread Ihor Radchenko
Jack Kamm writes: > Great, thanks. I'm attaching an updated patch with the more explicit > cond clause, and rebased onto latest bugfix. I also attach a second > patch with the NEWS entry on main. Thanks! > + (t (error (format "Unrecognized prompt handling behavior %s" > +

Re: [PATCH] Async sessions: Fix prompt removal regression in ob-R

2024-10-21 Thread Jack Kamm
Ihor Radchenko writes: > I think that it is ok for bugfix as the patch essentially reverses the > commit that introduced the regression for ob-R and ob-python. (The > original patch was fixing a problem with ob-shell). So, that patch is > fairly trivial. > > We might want to document the signatur

Re: [PATCH] Async sessions: Fix prompt removal regression in ob-R

2024-10-20 Thread Ihor Radchenko
Jack Kamm writes: >> Rather than `t', I'd use something more descriptive like >> 'disable-prompt-filtering. > > Is the attached patch what you had in mind? If so I will squash it with > the previous patch. Your variant is even better than what I had in mind. > But first -- note that the curren

Re: [PATCH] Async sessions: Fix prompt removal regression in ob-R

2024-10-20 Thread Jack Kamm
Ihor Radchenko writes: > I have one small nipick comment on the patch: > >>(org-babel-comint-async-register >> session (current-buffer) >> "ob_comint_async_python_\\(start\\|end\\|file\\)_\\(.+\\)" >> - 'org-babel-chomp 'org-babel-python-async-value-callback) >> + 'org-babel-chomp

Re: [PATCH] Async sessions: Fix prompt removal regression in ob-R

2024-10-19 Thread Ihor Radchenko
Jack Kamm writes: > ... > Therefore, I've attached an updated patch that provides such a mechanism > for ob-R and ob-python, reverting them to the Org 9.6 behavior. This is > done through a variable `org-babel-comint-async-remove-prompts-p', which > is set by an optional argument in `org-babel-co

Re: [PATCH] Async sessions: Fix prompt removal regression in ob-R

2024-10-15 Thread Jack Kamm
Ihor Radchenko writes: > Maybe we can simply override `comint-prompt-regexp' as we do in > ob-shell? The default regexp seems to be too permissive. I don't think this is a good idea, since this is a deliberate choice by ESS, which contains explicit commentary that the regexp should not contain B

Re: [PATCH] Async sessions: Fix prompt removal regression in ob-R

2024-10-02 Thread Ihor Radchenko
Jack Kamm writes: > Consider the following R block, which prints the occurrences of each > element in a list, including NAs: > > #+begin_src R :session :results output :async > table(c("ab","ab","c",NA,NA), useNA='always') > #+end_src > > #+RESULTS: > : abc > :212 > > Since

[PATCH] Async sessions: Fix prompt removal regression in ob-R

2024-09-22 Thread Jack Kamm
Consider the following R block, which prints the occurrences of each element in a list, including NAs: #+begin_src R :session :results output :async table(c("ab","ab","c",NA,NA), useNA='always') #+end_src #+RESULTS: : abc :212 Since Org 9.7, it instead prints: #+RESULTS: :