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#70968: 29.2.50; choose-completion on an emacs22-style completion deletes text after point Date: Thu, 16 May 2024 21:25:32 +0300 Message-ID: <8634qhipgj.fsf@gnu.org> References: <86bk56jhsp.fsf@gnu.org> <377f815c-52d2-4770-ae85-55e096e104b0@gutov.dev> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8782"; mail-complaints-to="usenet@ciao.gmane.io" Cc: sbaugh@janestreet.com, 70968@debbugs.gnu.org, monnier@IRO.UMontreal.CA, juri@linkov.net To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 16 20:27:18 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 1s7foy-0001wp-O7 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 May 2024 20:27:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7foj-0003Xw-DS; Thu, 16 May 2024 14:27:01 -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 1s7foi-0003Wc-4z for bug-gnu-emacs@gnu.org; Thu, 16 May 2024 14:27:00 -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 1s7foh-0008Ue-Sw for bug-gnu-emacs@gnu.org; Thu, 16 May 2024 14:26:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7foj-00021N-JI for bug-gnu-emacs@gnu.org; Thu, 16 May 2024 14:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 May 2024 18:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70968 X-GNU-PR-Package: emacs Original-Received: via spool by 70968-submit@debbugs.gnu.org id=B70968.17158839747752 (code B ref 70968); Thu, 16 May 2024 18:27:01 +0000 Original-Received: (at 70968) by debbugs.gnu.org; 16 May 2024 18:26:14 +0000 Original-Received: from localhost ([127.0.0.1]:50237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7fny-00020y-CO for submit@debbugs.gnu.org; Thu, 16 May 2024 14:26:14 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7fnv-00020s-02 for 70968@debbugs.gnu.org; Thu, 16 May 2024 14:26:12 -0400 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 1s7fnm-0008B3-Ee; Thu, 16 May 2024 14:26:02 -0400 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=+xQxEaB06GGi1oYPM+k609R7yp7F6a8mtUYFy2Jy92E=; b=Hp3slIRiP+QD CAy4ILaDlFM0Df7+qUH0ffcWhznTuGwd8daze3GXKsxm8DjUgxghCGe+wWow2eWh7e+U5e+sU1AtD PFTYb/rDVAkKSK/TR2bWfYeeDpmXzy+bHFpR14vYbI6e/bDptV/VCTohXCbq+cat0Lxrsi9IuorUi ITBBvHSM5twGFoM60OpCLdw/48L1t0C6bf9Y0oAdfEWchgcFgoZOLVA6LzlHp5yudqhNBD9/WP2Ss FxIq5PF9Y8yCJMqmG/MRDMXV/IzD/BXscrLHRvjlWuVlR9rfsxTD+XoZTN9IX2qXCumTgw+jnr3ia OpJ41MYgyie7n1EfoFkT2Q==; In-Reply-To: <377f815c-52d2-4770-ae85-55e096e104b0@gutov.dev> (message from Dmitry Gutov on Thu, 16 May 2024 20:26:31 +0300) 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:285184 Archived-At: > Date: Thu, 16 May 2024 20:26:31 +0300 > Cc: 70968@debbugs.gnu.org, juri@linkov.net, > Stefan Monnier > From: Dmitry Gutov > > On 16/05/2024 11:13, Eli Zaretskii wrote: > >> Cc: dmitry@gutov.dev, juri@linkov.net > >> From: Spencer Baugh > >> Date: Wed, 15 May 2024 16:26:50 -0400 > >> > >> > >> try-completion and choose-completion have different behavior; with the > >> emacs22 completion style, the former preserves the text after point > >> (while ignoring it), whereas the latter deletes the text after point. > >> > >> 1. emacs -Q > >> > >> 2. In scratch, type "inhibit-asdf" and move point to after the "-" > >> > >> 3. Type "q" and M- > >> The buffer now contains "inhibit-quitasdf", because the emacs22 style > >> ignored the text after point and completed on "inhibit-q". > >> > >> 4. C-/ C-/ to change the buffer back to "inhibit-asdf" > >> > >> 5. M- > >> The *Completions* buffer will be displayed, containing among others > >> "inhibit-quit" as a completion, because the emacs22 style ignored the > >> text after point and completed on "inhibit-". > >> > >> 6. Use M- and M- to select and choose "inhibit-quit" > >> The buffer now contains "inhibit-quit". > >> > >> The two ways of selecting completions should behave the same. > >> > >> I suggest that the behavior of not deleting the text after point is > >> better. The emacs22 style takes care to not delete the text after point > >> in try-completion and in completion cycling; we should take similar care > >> in choose-completion. > > > > If making these two ways consistent means we need to change the > > behavior of emacs22 style of completion, then I'm sorry, but we cannot > > do that. This style is a legacy style, and is there to provide the > > legacy behavior for those who need it. > > I don't think that would be required exactly. > > The problem here (IIUC) is that completion behaves differently with the > emacs22 style depending on whether the execution path went through > choose-completion (which is not a method of completion style but a > common subroutine) or not (when completion--do-completion performed > expansion). I understand that much. But what did these two (or their then-equivalents) do in Emacs 22 and Emacs 23?