From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#68559: [PATCH] Improve Python shell completion Date: Thu, 18 Jan 2024 08:39:09 +0200 Message-ID: <83zfx39mcy.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9169"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68559@debbugs.gnu.org To: Liu Hui , kobarity Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 18 07:40:46 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 1rQM4z-0002Cp-8w for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Jan 2024 07:40:45 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQM4M-0002nx-92; Thu, 18 Jan 2024 01:40:06 -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 1rQM4I-0002nF-Er for bug-gnu-emacs@gnu.org; Thu, 18 Jan 2024 01:40:04 -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 1rQM4H-0002YS-RH for bug-gnu-emacs@gnu.org; Thu, 18 Jan 2024 01:40:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rQM4I-0000sl-SJ for bug-gnu-emacs@gnu.org; Thu, 18 Jan 2024 01:40:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Jan 2024 06:40: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.17055599663333 (code B ref 68559); Thu, 18 Jan 2024 06:40:02 +0000 Original-Received: (at 68559) by debbugs.gnu.org; 18 Jan 2024 06:39:26 +0000 Original-Received: from localhost ([127.0.0.1]:54186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQM3i-0000rg-C5 for submit@debbugs.gnu.org; Thu, 18 Jan 2024 01:39:26 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQM3d-0000rN-Ud for 68559@debbugs.gnu.org; Thu, 18 Jan 2024 01:39:24 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQM3W-0002LO-TV; Thu, 18 Jan 2024 01:39:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=GsMvPw/5N65YU9FaM1CUVTCAFaapkEI7reY33SEjXZs=; b=WuYKkff6Tkv2 ljLcjSirowofbP87pWmUls0f21BxQ6+nnTGdxUrynQcMKcYRxbm7HS3CPi1g/No2SriRKhusBq4Lq qJ+t0+aq2czfQz9wqpBr//fl9i6PxIijrEt/n51aiPNZ1/MQgJeeogOyaAfmGrzO6TsqULDvMUvfF +7dhYyd0aB+pn1oZsnphI8c6pUvW+uYC4GVScCZg1GptNI3NpvmZ6rh1bQNwOZRxEXlFDt0FzSVxK JePA6s0BGAXnFLhRlJVR+Zn6VEcsI/x4B/a/D135CdpGuZa9OEwt2E5sX4BckP/fFEPRgznAat5Qr sg8i9POd1oJsUc+HmQ5iKQ==; In-Reply-To: (message from Liu Hui on Thu, 18 Jan 2024 12:48:37 +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:278423 Archived-At: > From: Liu Hui > Date: Thu, 18 Jan 2024 12:48:37 +0800 > > Currently python-shell-completion-at-point doesn't respect the > delimiter setting of readline completer and always split the text, > resulting in poor completions when completers that don't need word > splitting, e.g. jedi[1], is used. This patch fixes the problem. > > Meanwhile, this patch adds an option 'python-shell-readline-completer' > to make Python shell provide better completion experience (e.g. > completing function parameters, dictionary keys) by default if users > are using vanilla Python interpreter with jedi or using IPython, where > the completion support for IPython has been enhanced (e.g. showing > type annotations and function signatures). > > BTW, I think it may make sense to move Python snippets to a separate > file to make them easier to be maintained. Thanks. Let's see what others think about this (I don't use Python enough to have an opinion that matters).