From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#68559: [PATCH] Improve Python shell completion Date: Tue, 20 Feb 2024 11:16:42 +0100 Message-ID: <3A206D3C-E193-4240-A6DB-D3EC7DAAE7C2@gmail.com> References: <6BAFD8BF-8F18-4D9F-9DB3-A185AEF2EBCA@gmail.com> <8B4172D0-FC31-4437-99C4-683C892C5F86@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18312"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Liu Hui , Eli Zaretskii , 68559@debbugs.gnu.org To: kobarity Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 20 11:19:03 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 1rcNDK-0004eN-MR for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Feb 2024 11:19:02 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rcND0-0004Ke-HQ; Tue, 20 Feb 2024 05:18:42 -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 1rcNCz-00048p-7Q for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2024 05:18:41 -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 1rcNCy-0006Q6-I2 for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2024 05:18:40 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rcNDJ-0001ME-RQ for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2024 05:19:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Feb 2024 10:19:01 +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.17084242995164 (code B ref 68559); Tue, 20 Feb 2024 10:19:01 +0000 Original-Received: (at 68559) by debbugs.gnu.org; 20 Feb 2024 10:18:19 +0000 Original-Received: from localhost ([127.0.0.1]:44362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcNCd-0001LC-71 for submit@debbugs.gnu.org; Tue, 20 Feb 2024 05:18:19 -0500 Original-Received: from mail-lj1-f182.google.com ([209.85.208.182]:61601) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcNCX-0001Kv-JM for 68559@debbugs.gnu.org; Tue, 20 Feb 2024 05:18:18 -0500 Original-Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2d23a22233fso22896831fa.2 for <68559@debbugs.gnu.org>; Tue, 20 Feb 2024 02:17:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708424206; x=1709029006; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=2BpYtWTskX5dwv2Q7U1wroVW0Z8MsjcTZiL1fR4emNE=; b=MdF/dSFtq+0TwgKyWWY/EiZ/ktFIf+1oUiifXn1i8c//HxSqwvMQYFN7S8NBS6p9c9 JC+7q109EqW2sWhpwLt7S0yLz5OkqKsS+kZpcl3oBS5XPuljyfJsEYZTvWgGesPdBf27 D0yRLjic5NFMIb16LOzs2wuGzx0e014UtaA3mR21FSn1yQitHj4xPHN8SHIWpIQQRdlz W99ZgwByXgyeyLI9qhVAZWWNs/qarAXEqFGyLfqTKTrxtdv6cRLVeQq27yXpJEv2IMb2 wV5YXy0oWB40b4uypFyv9/mr38Q6HT3HH/174wOK9/vu0rBElRiix7LUejgGjYYw190z gVwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708424206; x=1709029006; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=2BpYtWTskX5dwv2Q7U1wroVW0Z8MsjcTZiL1fR4emNE=; b=IIHmxv/hhd7Td4gPi8w5+DC/0AtViFfmzwyK+5hZDHj0ODHb0SxyqHWr6a1fqmj/+4 LbRIRtCm3P6tyTn0QnT9GqRxWK7BUpDaA3Ds5D2RpEmDVG8EdVe6xO0QRp5uDw3K3PRn 2vC6bXXJQUpb7W3ihZiOsuJKBM+wBbYJdSWvjF6N8j1o0vGGXWeDhrc046Tfrb9ttQ0d 3+JFb9GSwCCJYf6VBEWD/JdvbQbX/n6zc4MJKGuu+Y0fhPs6nShgBOhcHZOIXWT1eomW SpqkX4jCZIf6xxh7XmMAKfzFVRGoNdVu1rUssqF7bNVGwWx/h9YQHCI8Pg73AwtuSe3h Z+Uw== X-Forwarded-Encrypted: i=1; AJvYcCXVPd0+H0SXXuGNot3V/VX8IsBYyxerLHr2GoCoUpf+bQ5PmWE8hZax7R+b8PTITRSm7RcBG1VUs/WgDXmdFdwx3RxlvN0= X-Gm-Message-State: AOJu0YwsnDk2BVqyCZiFkD8a8yeDJ9YLbnjI5GV/KLLY9G87xIX21FhF Ub+TKNfGfzm6Nh2AvKJ43oHZuVEB+x4Cq5b+Kl8mtA8m3/01HdO0 X-Google-Smtp-Source: AGHT+IE4DmCrd2W9NVKfWgltLwbBYDsD3WBvC8y5GKscpnwI6R4u3/BE3Q2rn0zp7RGJbhnqH8YEDw== X-Received: by 2002:a05:6512:2342:b0:512:c1ba:9115 with SMTP id p2-20020a056512234200b00512c1ba9115mr1394838lfu.57.1708424205688; Tue, 20 Feb 2024 02:16:45 -0800 (PST) Original-Received: from smtpclient.apple (c80-217-1-132.bredband.tele2.se. [80.217.1.132]) by smtp.gmail.com with ESMTPSA id v7-20020a197407000000b005128c3561b4sm1226024lfe.13.2024.02.20.02.16.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Feb 2024 02:16:45 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3654.120.0.1.15) 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:280315 Archived-At: 17 feb. 2024 kl. 14.33 skrev kobarity : > On Mac, it might be better to set the default value of > `python-shell-completion-native-enable' to nil. Not sure why the inferior Python process doesn't act on a TAB being sent = to it. Is the tty somehow in a state that disables readline/libedit? = Something that Emacs does when setting up the pty? Of course from a software engineering point of view, it's silly to send = what essentially are edit keystrokes to Python and then screen-scrape = the output. A proper interaction protocol would be the way to go, and = would work equally well on any platform including Windows. > Disabling echo back may not be sufficient to enable native completions > on Mac. I have not tried raw mode, but have tried > readline.parse_and_bind('setty -echo') and > readline.parse_and_bind('edit on'). Native completions could be > enabled, but it was unstable. >=20 > I have no objection if Mac users check the above patch and if it is > OK. Afraid it wasn't. Thanks for your patches. I suggest we apply your set-tty-raw patch on = master now since it cures the test failures without breaking anything = else (on Mac; I'm assuming no regression elsewhere). Would you like me to do that for you?