emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: python-mode: Why python-interpreter defaults to "python" instead of


From: Augusto Stoffel
Subject: Re: python-mode: Why python-interpreter defaults to "python" instead of looking for python/python3
Date: Thu, 16 Mar 2023 11:09:10 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Hi again Martín,

On Wed,  8 Mar 2023 at 20:41, Augusto Stoffel wrote:

> On Wed,  8 Mar 2023 at 11:03, Martín Fernández wrote:
>
>> Hey,
>>
>> I'm wondering why there is no logic to find the latest python
>> executable installed (python vs python3) when setting
>> `python-interpreter`, as it is done with `python-shell-interpreter`.
>>
>> I think it should be added, but since it is a straightforward change I
>> assume there are reasons for it. Otherwise I'm happy to send a patch.

Can you expand a bit on why you think so?  I just noticed that Debian
doesn't provide a `python' command by default, so indeed some logic
might be needed.  But then it should look for python, then python3, and
finally fall back to python.  Still, doing so has its downsides, as I
mentioned in my previous message.

> IMO the logic to choose `python-shell-interpreter' is misguided.  The
> default value should be just "python", since if you are doing anything
> with Python and "python" doesn't point to the right version, then you
> are in trouble anyway.  OTOH, if you really need to work with Python 2
> and symlink "python" accordingly then the current default proactively
> puts you in trouble.
>
> Personally I'd be happy to see a patch fixing `python-shell-interpreter'.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]