From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: `isearch-complete1' should use `completion-at-point' or `completion-in-region' (was: bug#39015) Date: Mon, 13 Jan 2020 01:36:54 +0200 Organization: LINKOV.NET Message-ID: <8736ckl015.fsf@mail.linkov.net> References: <7da1738e-1e8a-3c12-31bf-741ee171db5c@Alexander.Shukaev.name> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="56925"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.60 (x86_64-pc-linux-gnu) Cc: emacs-devel@gnu.org To: Alexander Shukaev Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 13 00:41:36 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iqmr7-0005N9-03 for ged-emacs-devel@m.gmane-mx.org; Mon, 13 Jan 2020 00:41:17 +0100 Original-Received: from localhost ([::1]:42970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iqmqt-000133-VJ for ged-emacs-devel@m.gmane-mx.org; Sun, 12 Jan 2020 18:41:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51323) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iqmpy-00006I-LC for emacs-devel@gnu.org; Sun, 12 Jan 2020 18:40:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iqmpx-0002cq-Fg for emacs-devel@gnu.org; Sun, 12 Jan 2020 18:40:06 -0500 Original-Received: from bisque.elm.relay.mailchannels.net ([23.83.212.18]:7920) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iqmpx-0002YO-70 for emacs-devel@gnu.org; Sun, 12 Jan 2020 18:40:05 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id A13D86A1B44; Sun, 12 Jan 2020 23:40:03 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a40.g.dreamhost.com (100-96-83-43.trex.outbound.svc.cluster.local [100.96.83.43]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id F11A96A1A68; Sun, 12 Jan 2020 23:40:02 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a40.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Sun, 12 Jan 2020 23:40:03 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Macabre-Army: 11a0df010ebf0871_1578872403381_1173391005 X-MC-Loop-Signature: 1578872403380:504061870 X-MC-Ingress-Time: 1578872403380 Original-Received: from pdx1-sub0-mail-a40.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a40.g.dreamhost.com (Postfix) with ESMTP id B099F7EFF8; Sun, 12 Jan 2020 15:39:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=Xov+Fmc5xDcFkQnYbkqY3rO/pBw=; b= B3d0Keb//aOd35Iaowg597yvlTp9Pn551fH8ndOb3rpio1XGYr7EGmOABF5DTW/r L4QckzCrid97vwAygcfDFZgySPh+l0UsDJYMa3Xn0l64wLyAyzB3GzvGLu+/6b+I T1ZNGNia1PbW/DkC+Fy0odU5yV9lespCvZhjusQ51zc= Original-Received: from mail.jurta.org (m91-129-103-172.cust.tele2.ee [91.129.103.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a40.g.dreamhost.com (Postfix) with ESMTPSA id 660627F0E0; Sun, 12 Jan 2020 15:39:54 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a40 In-Reply-To: <7da1738e-1e8a-3c12-31bf-741ee171db5c@Alexander.Shukaev.name> (Alexander Shukaev's message of "Tue, 7 Jan 2020 17:19:29 +0100") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: 0 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrvdeiledgudehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepledurdduvdelrddutdefrddujedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtfedrudejvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopegvmhgrtghsseetlhgvgigrnhguvghrrdfuhhhukhgrvghvrdhnrghmvgenucevlhhushhtvghrufhiiigvpedt X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 23.83.212.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:244212 Archived-At: > Not sure why in the first place `isearch-complete1' uses some custom > auto-completion implementation that is different from a conventional > solution, perhaps historical reasons. Thus, I believe that reusing either > `completion-at-point' or `completion-in-region' to implement that > functionality is much better in the long run. This would also allow > packages, which customize completion behavior, to hook into `isearch' > auto-completion as well. See also [1] for example. > > [1] https://github.com/abo-abo/swiper/issues/1882 Indeed, Isearch uses custom completion for historical reasons, and there is no reason for this anymore. But there is one thing I don't understand: how packages prefer to hook into auto-completion? Is it enough to convert `isearch-complete1' to just `completing-read' in the minibuffer activated by `isearch-edit-string'?