unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Balint Reczey <balint.reczey@canonical.com>
To: Glenn Morris <rgm@gnu.org>
Cc: 45655@debbugs.gnu.org
Subject: bug#45655: Please use 'python3' command instead of 'python'
Date: Wed, 6 Jan 2021 18:47:48 +0100	[thread overview]
Message-ID: <CAG+KjmOrgUF6mDyuRS8XwHucwj96NAhFheKXBbNHXd80T-9SMQ@mail.gmail.com> (raw)
In-Reply-To: <5kczyim26n.fsf@fencepost.gnu.org>

Hi Glenn,

Thanks for the quick response.

On Wed, Jan 6, 2021 at 5:59 PM Glenn Morris <rgm@gnu.org> wrote:
>
> Balint Reczey wrote:
>
> > Python 2 reached EOL about a year ago thus the 'python' command may be
> > missing on some systems. 'python3' is the standard way of invoking the
> > Python 3 interpreter, thus Emacs would have a better chance trying
> > that.
> >
> > The attached patch is already carried in Ubuntu.
>
> Thanks for the report.
>
> > --- a/lisp/ldefs-boot.el
> > +++ b/lisp/ldefs-boot.el
> > @@ -26539,7 +26539,7 @@
> >
> >  (add-to-list 'interpreter-mode-alist (cons (purecopy "python[0-9.]*") 'python-mode))
> >
> > -(autoload 'run-python "python" "\
> > +(autoload 'run-python "python3" "\
>
> This bit is wrong. Firstly, ldefs-boot is a generated file, and
> secondly, unless Ubuntu is distributing a python3.el, it would just
> break the autoload.
>
> > --- a/lisp/progmodes/python.el
> > +++ b/lisp/progmodes/python.el
> > @@ -1952,7 +1952,7 @@
> >    :group 'python
> >    :safe 'stringp)
> >
> > -(defcustom python-shell-interpreter "python"
> > +(defcustom python-shell-interpreter "python3"
>
> (if (executable-find "python3") "python3" "python")
>
> is probably how Emacs would normally handle this kind of thing.
> Or if defaulting to python3 is better (I guess it is):
>
> (cond ((executable-find "python3") "python3")
>       ((executable-find "python") "python")
>       (t "python3"))

Indeed, that would be better for very old systems.
Could you please land the proper fix or you would like me to rework mine?

Thanks,
Balint

-- 
Balint Reczey
Ubuntu & Debian Developer





  reply	other threads:[~2021-01-06 17:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-04 15:14 bug#45655: Please use 'python3' command instead of 'python' Balint Reczey
2021-01-06 16:59 ` Glenn Morris
2021-01-06 17:47   ` Balint Reczey [this message]
2021-01-10 14:49     ` Lars Ingebrigtsen
2021-01-10 17:42 ` Stefan Monnier
2021-01-10 17:49   ` Balint Reczey
2021-01-10 20:48     ` Stefan Monnier
2021-01-11  5:17       ` Pankaj Jangid

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAG+KjmOrgUF6mDyuRS8XwHucwj96NAhFheKXBbNHXd80T-9SMQ@mail.gmail.com \
    --to=balint.reczey@canonical.com \
    --cc=45655@debbugs.gnu.org \
    --cc=rgm@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).