Re: [PATCH] Add buffer-local setting to request specific ESS process/session name (was: [PATCH] Set Python shell in Org edit buffer)

2024-01-30 Thread Martin Maechler
> Ihor Radchenko 
> on Mon, 22 Jan 2024 12:13:15 + writes:

> "Sparapani, Rodney"  writes:
>> I’ve test that and it works for me per your prescription
>> below.  And, I have committed it to the ESS git repo.

> Thank you!  May I know which version of ESS will have this
> commit?

The Melpa version that was just released, does.

As you probably know more than me about emacs package
maintenance and release cycles: 
Do you think we should also try to get a  Melpa-stable release?

Is the wording we have about MELPA in
   
https://ess.r-project.org/Manual/readme.html#Installing-from-a-third_002dparty-repository
satisfactory?

Thank you, Ihor, for your contributions!

Best,
Martin

--
Martin Maechler
ETH Zurich, Switzerland




Re: [PATCH] Add buffer-local setting to request specific ESS process/session name (was: [PATCH] Set Python shell in Org edit buffer)

2024-01-25 Thread Ihor Radchenko
"Sparapani, Rodney"  writes:

> This last remark below can’t possibly be true.  Because I did not intend to 
> trigger
> a release, ESS 24.01.0 was not initially tagged.  However, after I received 
> that email
> from ELPA, it was a fait accompli.  So I fixed some cosmetic issues and 
> tagged it post-haste,
> i.e., ELPA’s announcement is definitely pre-tagging.  So I’m not sure
> where the disconnect is.

Hmm. You are right. The exact rule is following package Version:
comment:

https://git.savannah.gnu.org/cgit/emacs/elpa.git/plain/README

*** Release and devel archives
elpa.gnu.org serves the gnu and nongnu package collections (roughly,
gnu requires FSF copyright assign, nongnu doesn't, but these terms are
not fully defined here).

In addition, elpa.gnu.org serves release and devel versions of each
package. The release version is defined by a change in the =Version:=
header of a package; the devel version is the latest commit.

So, you likely changed Version: in lisp/ess.el first and only then added
git tag.

(I always do this in one go, which is why I never noticed this detail)

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [PATCH] Add buffer-local setting to request specific ESS process/session name (was: [PATCH] Set Python shell in Org edit buffer)

2024-01-25 Thread Sparapani, Rodney
Hi Idor:

I have never had much success with either MELPA or ELPA.  Something about
my TLS setup that I have not figured how to fix.  But, I did receive an email 
that
we are available at ELPA too (however, I can’t test the veracity of that 
myself).
See the ESS-help thread here….
https://www.mail-archive.com/ess-help@r-project.org/msg01043.html

--
Rodney Sparapani, Associate Professor of Biostatistics, He/Him/His
Vice President, Wisconsin Chapter of the American Statistical Association
Institute for Health and Equity, Division of Biostatistics
Medical College of Wisconsin, Milwaukee Campus

If this is outside of working hours, then please respond when convenient.

From: Ihor Radchenko 
Date: Thursday, January 25, 2024 at 7:05 AM
To: Martin Maechler 
Cc: Sparapani, Rodney , ess-c...@r-project.org 
, Jack Kamm , emacs-orgmode@gnu.org 
, Liu Hui 
Subject: Re: [PATCH] Add buffer-local setting to request specific ESS 
process/session name (was: [PATCH] Set Python shell in Org edit buffer)
ATTENTION: This email originated from a sender outside of MCW. Use caution when 
clicking on links or opening attachments.


Martin Maechler  writes:

> > Thank you!  May I know which version of ESS will have this
> > commit?
>
> The Melpa version that was just released, does.

Noted. I did not know that ESS is distributed via MELPA.
I am wondering why not ELPA/non-GNU ELPA - ELPA is built-in and users
can simply M-x package-install packages from ELPA repositories.

> As you probably know more than me about emacs package
> maintenance and release cycles:
> Do you think we should also try to get a  Melpa-stable release?

That's up to you to decide if ESS is in stable state or not.
You may find 
https://urldefense.com/v3/__https://orgmode.org/worg/org-maintenance.html*release-types__;Iw!!H8mHWRdzp34!9qd7lXuuGaLyWEAPOcHUmf_Fr_oYuyym5rkIQSSfGycheI8pfc2DqZqFLvG8jwINxn5hSssSSxjLZi_mEg$<https://urldefense.com/v3/__https:/orgmode.org/worg/org-maintenance.html*release-types__;Iw!!H8mHWRdzp34!9qd7lXuuGaLyWEAPOcHUmf_Fr_oYuyym5rkIQSSfGycheI8pfc2DqZqFLvG8jwINxn5hSssSSxjLZi_mEg$>
useful to see how Org mode handles releases.

> Is the wording we have about MELPA in
>
> https://urldefense.com/v3/__https://ess.r-project.org/Manual/readme.html*Installing-from-a-third_002dparty-repository__;Iw!!H8mHWRdzp34!9qd7lXuuGaLyWEAPOcHUmf_Fr_oYuyym5rkIQSSfGycheI8pfc2DqZqFLvG8jwINxn5hSssSSxhsgRpn0A$<https://urldefense.com/v3/__https:/ess.r-project.org/Manual/readme.html*Installing-from-a-third_002dparty-repository__;Iw!!H8mHWRdzp34!9qd7lXuuGaLyWEAPOcHUmf_Fr_oYuyym5rkIQSSfGycheI8pfc2DqZqFLvG8jwINxn5hSssSSxhsgRpn0A$>
> satisfactory?

Looks fine.

--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at 
<https://urldefense.com/v3/__https://orgmode.org/__;!!H8mHWRdzp34!9qd7lXuuGaLyWEAPOcHUmf_Fr_oYuyym5rkIQSSfGycheI8pfc2DqZqFLvG8jwINxn5hSssSSxgmy_SMoA$
 >.
Support Org development at 
<https://urldefense.com/v3/__https://liberapay.com/org-mode__;!!H8mHWRdzp34!9qd7lXuuGaLyWEAPOcHUmf_Fr_oYuyym5rkIQSSfGycheI8pfc2DqZqFLvG8jwINxn5hSssSSxjREUC_7Q$
 >,
or support my work at 
<https://urldefense.com/v3/__https://liberapay.com/yantar92__;!!H8mHWRdzp34!9qd7lXuuGaLyWEAPOcHUmf_Fr_oYuyym5rkIQSSfGycheI8pfc2DqZqFLvG8jwINxn5hSssSSxiZiaCMNA$
 >


Re: [PATCH] Add buffer-local setting to request specific ESS process/session name (was: [PATCH] Set Python shell in Org edit buffer)

2024-01-25 Thread Sparapani, Rodney
Hi Idor:

This last remark below can’t possibly be true.  Because I did not intend to 
trigger
a release, ESS 24.01.0 was not initially tagged.  However, after I received 
that email
from ELPA, it was a fait accompli.  So I fixed some cosmetic issues and tagged 
it post-haste,
i.e., ELPA’s announcement is definitely pre-tagging.  So I’m not sure where the 
disconnect is.
But, again, I don’t find the package mechanism at all convenient and will have 
to spend some
time debugging since it has never worked for me.  I will put these ELPA/MELPA 
issues on my
growing TODO list.  Thanks for pointing this out!

--
Rodney Sparapani, Associate Professor of Biostatistics, He/Him/His
Vice President, Wisconsin Chapter of the American Statistical Association
Institute for Health and Equity, Division of Biostatistics
Medical College of Wisconsin, Milwaukee Campus

If this is outside of working hours, then please respond when convenient.

From: Ihor Radchenko 
Date: Thursday, January 25, 2024 at 9:30 AM
To: Sparapani, Rodney 
Cc: Martin Maechler , ess-c...@r-project.org 
, Jack Kamm , emacs-orgmode@gnu.org 
, Liu Hui 
Subject: Re: [PATCH] Add buffer-local setting to request specific ESS 
process/session name (was: [PATCH] Set Python shell in Org edit buffer)
Also, unlike MELPA, ELPA uses stable (tagged) releases by default.
Unstable releases (latest commit) are only available on demand, via
ELPA-devel 
(https://urldefense.com/v3/__https://elpa.gnu.org/devel/ess.html__;!!H8mHWRdzp34!98PglwLJJtQrc63k3vrtr0K0MjYZSPEf3WV0GPD_wsxbsO3bM8AYCDRI0W69ZcBg5STqpaG7_h3rF8wlAQ$<https://urldefense.com/v3/__https:/elpa.gnu.org/devel/ess.html__;!!H8mHWRdzp34!98PglwLJJtQrc63k3vrtr0K0MjYZSPEf3WV0GPD_wsxbsO3bM8AYCDRI0W69ZcBg5STqpaG7_h3rF8wlAQ$>
 )


Re: [PATCH] Add buffer-local setting to request specific ESS process/session name (was: [PATCH] Set Python shell in Org edit buffer)

2024-01-25 Thread Ihor Radchenko
"Sparapani, Rodney"  writes:

> I have never had much success with either MELPA or ELPA.  Something about
> my TLS setup that I have not figured how to fix.  But, I did receive an email 
> that
> we are available at ELPA too (however, I can’t test the veracity of that 
> myself).
> See the ESS-help thread here….
> https://www.mail-archive.com/ess-help@r-project.org/msg01043.html

I see. ESS is indeed listed on ELPA https://elpa.gnu.org/packages/ess.html

Note that ELPA is the official package repository for GNU Emacs. So, it
is worth documenting that ESS is distributed via ELPA in
https://ess.r-project.org/Manual/readme.html#Installing-from-a-third_002dparty-repository

Also, unlike MELPA, ELPA uses stable (tagged) releases by default.
Unstable releases (latest commit) are only available on demand, via
ELPA-devel (https://elpa.gnu.org/devel/ess.html)

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [PATCH] Add buffer-local setting to request specific ESS process/session name (was: [PATCH] Set Python shell in Org edit buffer)

2024-01-25 Thread Ihor Radchenko
Martin Maechler  writes:

> > Thank you!  May I know which version of ESS will have this
> > commit?
>
> The Melpa version that was just released, does.

Noted. I did not know that ESS is distributed via MELPA.
I am wondering why not ELPA/non-GNU ELPA - ELPA is built-in and users
can simply M-x package-install packages from ELPA repositories.

> As you probably know more than me about emacs package
> maintenance and release cycles: 
> Do you think we should also try to get a  Melpa-stable release?

That's up to you to decide if ESS is in stable state or not.
You may find https://orgmode.org/worg/org-maintenance.html#release-types
useful to see how Org mode handles releases.

> Is the wording we have about MELPA in
>
> https://ess.r-project.org/Manual/readme.html#Installing-from-a-third_002dparty-repository
> satisfactory?

Looks fine.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [PATCH] Add buffer-local setting to request specific ESS process/session name (was: [PATCH] Set Python shell in Org edit buffer)

2024-01-22 Thread Ihor Radchenko
"Sparapani, Rodney"  writes:

> I’ve test that and it works for me per your prescription below.
> And, I have committed it to the ESS git repo.

Thank you!
May I know which version of ESS will have this commit?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [PATCH] Add buffer-local setting to request specific ESS process/session name (was: [PATCH] Set Python shell in Org edit buffer)

2024-01-21 Thread Sparapani, Rodney
Hi Idor:

I’ve test that and it works for me per your prescription below.
And, I have committed it to the ESS git repo.  Thanks!

1. create and open test.R file containing
   x = "foo"
2. M-: (setq-local ess-gen-proc-buffer-name-function (lambda (_) "session1"))
3. M-x ess-eval-line
4. Observe "session1" R comint buffer displayed
5. create and open test2.R file containing
   y = "bar"
6. M-: (setq-local ess-gen-proc-buffer-name-function (lambda (_) "session2"))
7. M-x ess-eval-line
8. Observe that the line still goes to "session2"

--
Rodney Sparapani, Associate Professor of Biostatistics, He/Him/His
Vice President, Wisconsin Chapter of the American Statistical Association
Institute for Health and Equity, Division of Biostatistics
Medical College of Wisconsin, Milwaukee Campus

If this is outside of working hours, then please respond when convenient.

From: Ihor Radchenko 
Date: Sunday, January 21, 2024 at 5:45 AM
To: Sparapani, Rodney 
Cc: Jack Kamm , ess-c...@r-project.org 
, Liu Hui , emacs-orgmode@gnu.org 

Subject: [PATCH] Add buffer-local setting to request specific ESS 
process/session name (was: [PATCH] Set Python shell in Org edit buffer)
ATTENTION: This email originated from a sender outside of MCW. Use caution when 
clicking on links or opening attachments.


Ihor Radchenko  writes:

> We recently discovered `ess-gen-proc-buffer-name-function', but it does
> not work as we expected, unfortunately. (which is either because we
> misunderstand something or because there is a bug).

I am attaching tentative patch that will make `ess-request-a-process'
obey `ess-gen-proc-buffer-name-function'.


[PATCH] Add buffer-local setting to request specific ESS process/session name (was: [PATCH] Set Python shell in Org edit buffer)

2024-01-21 Thread Ihor Radchenko
Ihor Radchenko  writes:

> We recently discovered `ess-gen-proc-buffer-name-function', but it does
> not work as we expected, unfortunately. (which is either because we
> misunderstand something or because there is a bug).

I am attaching tentative patch that will make `ess-request-a-process'
obey `ess-gen-proc-buffer-name-function'.

>From 68984a5a0a1df5a5a2619b579f23f70128e979cd Mon Sep 17 00:00:00 2001
Message-ID: <68984a5a0a1df5a5a2619b579f23f70128e979cd.1705837631.git.yanta...@posteo.net>
From: Ihor Radchenko 
Date: Sun, 21 Jan 2024 12:44:32 +0100
Subject: [PATCH] ess-request-a-process: Honor
 ess-gen-proc-buffer-name-function

* lisp/ess-inf.el (ess-request-a-process): Do not make processes not
matching `ess-gen-proc-buffer-name-function' current.
---
 lisp/ess-inf.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/ess-inf.el b/lisp/ess-inf.el
index 9ca3f455..aaff314c 100644
--- a/lisp/ess-inf.el
+++ b/lisp/ess-inf.el
@@ -820,7 +820,7 @@ (defun ess-request-a-process (message  noswitch ask-if-1)
(delete-dups (list "R" "S+" (or (bound-and-true-p S+-dialect-name) "S+")
   "stata" (or (bound-and-true-p STA-dialect-name) "stata")
   "julia" "SAS")
- (pname-list (delq nil ;; keep only those matching dialect
+ (pname-list (delq nil ;; keep only those matching dialect and `ess-gen-proc-buffer-name-function'
(append
 (mapcar (lambda (lproc)
   (and (equal ess-dialect
@@ -828,6 +828,8 @@ (defun ess-request-a-process (message  noswitch ask-if-1)
'ess-dialect
(process-buffer (get-process (car lproc)
(not (equal ess-local-process-name (car lproc)))
+   (equal (buffer-name (process-buffer (get-process (car lproc
+  (funcall ess-gen-proc-buffer-name-function (car lproc)))
(car lproc)))
 ess-process-name-list)
 ;; append local only if running
-- 
2.43.0


-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at