From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#45655: Please use 'python3' command instead of 'python' Date: Wed, 06 Jan 2021 11:59:28 -0500 Message-ID: <5kczyim26n.fsf@fencepost.gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27853"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) Cc: 45655@debbugs.gnu.org To: Balint Reczey Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 06 18:03:14 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kxCDJ-00079R-Ih for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Jan 2021 18:03:13 +0100 Original-Received: from localhost ([::1]:35828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxCDI-0006aM-AZ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Jan 2021 12:03:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33164) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxCAE-0004o3-Ok for bug-gnu-emacs@gnu.org; Wed, 06 Jan 2021 12:00:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33860) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kxCAE-0004wW-DQ for bug-gnu-emacs@gnu.org; Wed, 06 Jan 2021 12:00:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kxCAE-0003ix-CR for bug-gnu-emacs@gnu.org; Wed, 06 Jan 2021 12:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Jan 2021 17:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45655 X-GNU-PR-Package: emacs Original-Received: via spool by 45655-submit@debbugs.gnu.org id=B45655.160995238814261 (code B ref 45655); Wed, 06 Jan 2021 17:00:02 +0000 Original-Received: (at 45655) by debbugs.gnu.org; 6 Jan 2021 16:59:48 +0000 Original-Received: from localhost ([127.0.0.1]:45406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxCA0-0003hx-9x for submit@debbugs.gnu.org; Wed, 06 Jan 2021 11:59:48 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxC9z-0003hh-BS for 45655@debbugs.gnu.org; Wed, 06 Jan 2021 11:59:47 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36588) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxC9t-0004uG-Pa; Wed, 06 Jan 2021 11:59:41 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1kxC9i-0007Rr-2w; Wed, 06 Jan 2021 11:59:31 -0500 X-Spook: anarchy Europol Cain and Abel airframe Airplane Saudi X-Ran: *UYJkG@lj^=AZ5g8Q~q"1Q>LT8*rt77.1R6NAboJs~ebqvws_"(*wapqiCK8pr{;D^hoC2 X-Hue: brightmagenta X-Attribution: GM In-Reply-To: (Balint Reczey's message of "Mon, 4 Jan 2021 16:14:02 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:197433 Archived-At: 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"))