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: Mon, 11 Mar 2024 17:02:48 +0100 Message-ID: <87zfv4lpsn.fsf@epfl.ch> References: <6BAFD8BF-8F18-4D9F-9DB3-A185AEF2EBCA@gmail.com> <8B4172D0-FC31-4437-99C4-683C892C5F86@gmail.com> <3A206D3C-E193-4240-A6DB-D3EC7DAAE7C2@gmail.com> <16E39FDF-5F8E-4C1B-8BCD-A0147B97F2B8@gmail.com> <7150E568-B07D-4D92-8073-979387553394@gmail.com> <87bk80ve20.fsf@epfl.ch> <87y1asybi4.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="3829"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: kobarity , Eli Zaretskii , Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , 68559@debbugs.gnu.org To: Liu Hui Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 11 17:03:59 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 1rji87-0000kU-IA for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Mar 2024 17:03:59 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rji7z-0001P0-9n; Mon, 11 Mar 2024 12:03:51 -0400 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 1rji7d-0001HQ-FU for bug-gnu-emacs@gnu.org; Mon, 11 Mar 2024 12:03:35 -0400 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 1rji7c-0003VF-OZ for bug-gnu-emacs@gnu.org; Mon, 11 Mar 2024 12:03:29 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rji8A-0005fd-CT for bug-gnu-emacs@gnu.org; Mon, 11 Mar 2024 12:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Mar 2024 16:04: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.171017301621745 (code B ref 68559); Mon, 11 Mar 2024 16:04:02 +0000 Original-Received: (at 68559) by debbugs.gnu.org; 11 Mar 2024 16:03:36 +0000 Original-Received: from localhost ([127.0.0.1]:41089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rji7j-0005ef-HM for submit@debbugs.gnu.org; Mon, 11 Mar 2024 12:03:35 -0400 Original-Received: from mail-lj1-f177.google.com ([209.85.208.177]:41080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rji7e-0005eJ-BJ for 68559@debbugs.gnu.org; Mon, 11 Mar 2024 12:03:33 -0400 Original-Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2d358acc8cbso13475631fa.0 for <68559@debbugs.gnu.org>; Mon, 11 Mar 2024 09:02:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710172970; x=1710777770; 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=XpWs2v15GvAjlARGjEqcn6/HvgoU9SDRLkDUn+KUaRs=; b=p7wgynLTBDdbD5FqdNQ85PT0sD64wiwUcO3HmYo7XRD4Fg7uyy36ze0Ye/+28WuJAe 3EQd3tWOdBYMG1z82dfikQvKksdXA5WZIrWF9PO69MGdZlJHyIqdupesAvwe7G1ogH4a K+d/dSBx1hetyBdxDuZexc84T7QoSXFj4ILjajCrDb0aXOa0DPnRAkSBrvtzXv9u+vXz RlGf5ISOIuw70hxB639Enmoa4epE9yMYearcE/795FnJZuixMBlangSaH1TYW2IotOoe vY2iI489FPp5vcKvgT+nqZLmC6lRzYlXo4kQG4GEUGC5O7UIUE7LAdQLW+46+jPO0aG/ U8UQ== X-Forwarded-Encrypted: i=1; AJvYcCVGurnbUbVta93RnjDY6AgnIUtyJB+PoeG6Zu8pZ8uV5jRDl6aluI7A0FIZKaLvpkNVoDfrdiuqKqA1rOA5CjvHoB1LRTo= X-Gm-Message-State: AOJu0YwN1rreOXt3K6BI1BltGS4li9Q9nNJ7TsDVKLFomWI8h0CiFqg5 ReI8zCywl/qBPYgvevfBtKGYMox7B5Fmoh6I09XOAsuCfd6Un/RI X-Google-Smtp-Source: AGHT+IGYyfdV88MBTxD839ZDSTn+YAMG3VmxkHj8zoBCCHKU0LxmRo2XhwHxOxJnUiVyz8dZYfMkkg== X-Received: by 2002:a2e:9985:0:b0:2d2:5d6d:9db3 with SMTP id w5-20020a2e9985000000b002d25d6d9db3mr3857031lji.0.1710172969930; Mon, 11 Mar 2024 09:02:49 -0700 (PDT) Original-Received: from localhost ([2001:620:618:5c0:2:80b3:0:1e]) by smtp.gmail.com with ESMTPSA id fd15-20020a056402388f00b00568601d3a7bsm974261edb.53.2024.03.11.09.02.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 09:02:49 -0700 (PDT) In-Reply-To: (Liu Hui's message of "Mon, 11 Mar 2024 19:35:31 +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:281482 Archived-At: Liu Hui [2024-03-11 19:35 +0800] wrote: > On Fri, Mar 8, 2024 at 11:44=E2=80=AFPM Basil L. Contovounesios > wrote: >> >> Liu Hui [2024-03-06 18:14 +0800] wrote: >> >> > - (string-match-p "ipython[23]?\\'" python-shell-int= erpreter))))) >> > + (or (string-match-p "ipython[23]?\\'" python-shell= -interpreter) >> > + (string=3D python-shell-readline-completer-del= ims "")))))) >> >> Just curious: what does the empty string signify? >> >> [ If it's not just a dumb question, perhaps the meaning could be added >> to the variable's docstring/commentary. ] > > The empty string means no characters are considered delimiters and the > readline completion could consider the entire line of input without > breaking it into parts based on typical delimiters like spaces or > punctuation. The docstring is updated in the attached patch. Thanks! But that makes me wonder: in the cases where we check (string=3D python-shell-readline-completer-delims "") is there a possibility that the variable's value will be nil? (In which case we should compare with equal instead of string=3D.) --=20 Basil