From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#68559: [PATCH] Improve Python shell completion Date: Thu, 22 Feb 2024 14:56:38 +0100 Message-ID: <877ciwwqjt.fsf@epfl.ch> References: <6BAFD8BF-8F18-4D9F-9DB3-A185AEF2EBCA@gmail.com> <867cj5wuo6.fsf@gnu.org> <865xypwu5e.fsf@gnu.org> <87il2kvbh5.fsf@epfl.ch> <878r3fz37e.fsf@epfl.ch> <87sf1leujg.fsf@epfl.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9913"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , kobarity@gmail.com, mattias.engdegard@gmail.com, 68559@debbugs.gnu.org To: Liu Hui Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 22 15:06:02 2024 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 1rd9i5-0002Ga-KF for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 22 Feb 2024 15:06:01 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rd9hp-0006m7-5l; Thu, 22 Feb 2024 09:05:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rd9hk-0006jC-8q for bug-gnu-emacs@gnu.org; Thu, 22 Feb 2024 09:05:40 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rd9hj-0002Yq-W7 for bug-gnu-emacs@gnu.org; Thu, 22 Feb 2024 09:05:40 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rd9i6-0005L8-H1 for bug-gnu-emacs@gnu.org; Thu, 22 Feb 2024 09:06:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Feb 2024 14:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68559 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 68559-submit@debbugs.gnu.org id=B68559.170861072420440 (code B ref 68559); Thu, 22 Feb 2024 14:06:02 +0000 Original-Received: (at 68559) by debbugs.gnu.org; 22 Feb 2024 14:05:24 +0000 Original-Received: from localhost ([127.0.0.1]:56924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rd9hT-0005Jb-JW for submit@debbugs.gnu.org; Thu, 22 Feb 2024 09:05:24 -0500 Original-Received: from mail-wr1-f51.google.com ([209.85.221.51]:38304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rd9hR-0005JE-8W for 68559@debbugs.gnu.org; Thu, 22 Feb 2024 09:05:21 -0500 Original-Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-33d4efb419bso715002f8f.1 for <68559@debbugs.gnu.org>; Thu, 22 Feb 2024 06:04:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708610692; x=1709215492; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=gs76sufCzkBIAiwloeaOTDI+HtWWQXsr4XFL72cBSPU=; b=EVCwA4BeD4US6WSUwSkVy0h8eQCwa1yHpNz7Atjz0W8dQDJRut4MnTMG+KlIiZ0tA2 3R92EZZcZ0NpCC6eCtKzoOTDhqBeaAyLY25wzjGlzSvyngRx+QWUyAj1EmEeDx+hraMM 3Uozo0mJO3ZFKe0Db25RU4laV8MZ1mE6xWWIKGqgtzCwNnm+CQWTfDxfVVKDEq5WMYUG AvXxQrAavTk6ov+r/d5CYhjOFTjeW04DPc3bSoPHoU7c9JZcIdtWZRG+4CzFpPkyROyS /SWW5zP15EJ79npMM3EyPSVAl/5gMIsKLy5wy2G/PSAZ8p6tGaisJ2V8KwQya0PpTZmF pnbA== X-Forwarded-Encrypted: i=1; AJvYcCVzJiDDx6jtXI2wvl47x+VmpIGPbkyzDuiHr/z1IjUPSy8NaYXWFOh0NH/gnnjgMMSGyx3WLo2O4r8fAMZkDeV7wmHZR+s= X-Gm-Message-State: AOJu0Yzw0M6epvYAMfm+k8B3m9RRdxQzNCH7GucRzhUWDifSwusNqgfd lNHt+L3AOpVfdZC+JrG6KrqF/9tR0vTpoR3c2FIf+bj+46JyXHDzCGdbP8ahjwE= X-Google-Smtp-Source: AGHT+IExOgz44OgprSJoNRoO66aV0F2Huq4TettVP0GTqcaf9eZf4tjKUv4OlqpY0a1/+QQQ7xIa/w== X-Received: by 2002:a17:906:3152:b0:a3f:a12:f8e6 with SMTP id e18-20020a170906315200b00a3f0a12f8e6mr1451372eje.6.1708610200172; Thu, 22 Feb 2024 05:56:40 -0800 (PST) Original-Received: from localhost ([2001:620:618:5c0:2:80b3:0:239]) by smtp.gmail.com with ESMTPSA id tx17-20020a1709078e9100b00a3f4bafa6fbsm1434037ejc.168.2024.02.22.05.56.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 05:56:39 -0800 (PST) In-Reply-To: (Liu Hui's message of "Thu, 22 Feb 2024 18:31:00 +0800") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:280449 Archived-At: Liu Hui [2024-02-22 18:31 +0800] wrote: > On Wed, Feb 21, 2024 at 10:55=E2=80=AFPM Basil L. Contovounesios > wrote: >> >> Liu Hui [2024-02-21 18:00 +0800] wrote: >> >> > The attached patch should fix the problem. >> >> Thanks! The patch fixes the error, but that's because >> python-shell-completion-at-point-ipython is now skipped: > > Only the native completion part is skipped for the reason below. > >> in particular, python-shell-readline-completer-delims evaluates to >> "\s\t\n`~!@#$%^&*()-=3D+[{]}\\|;:'\",<>/?" rather than the empty string. > > "\s\t\n`..." is the delimiter used by rlcompleter, which is the > default completer used by the readline. rlcompleter cannot complete > module names or parameters, so in this case the native completion part > is skipped. > > The test is intended to be used with Jedi as the completion backend, > e.g. setting PYTHONSTARTUP=3D"$(python -m jedi repl)", or with a custom > IPython completer defined in the PYTHONSTARTUP file. I have updated the > patch to make the test use Jedi when possible. Thanks, looks fine to me and runs without issue. The python-shell-completion-at-point-ipython test is still skipped, with or without specifying PYTHONSTARTUP=3D"$(python -m jedi repl)", but like you suggest that's not necessarily a problem. I'm guessing you don't have write access to emacs.git, but have signed the CA? If so, and if there are no other comments/objections in a few days, I'll apply the patch in your name. Thanks, --=20 Basil