From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alexander Shukaev Newsgroups: gmane.emacs.devel Subject: Re: `isearch-complete1' should use `completion-at-point' or `completion-in-region' Date: Mon, 13 Jan 2020 15:35:09 +0100 Message-ID: <6cccab0c-b693-67ea-b723-403684d70ab2@Alexander.Shukaev.name> References: <7da1738e-1e8a-3c12-31bf-741ee171db5c@Alexander.Shukaev.name> <8736ckl015.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="152201"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 13 15:37:16 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 1ir0p1-000Qzw-Sn for ged-emacs-devel@m.gmane-mx.org; Mon, 13 Jan 2020 15:36:04 +0100 Original-Received: from localhost ([::1]:51220 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ir0p0-000058-8e for ged-emacs-devel@m.gmane-mx.org; Mon, 13 Jan 2020 09:36:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40495) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ir0oE-0007yR-S9 for emacs-devel@gnu.org; Mon, 13 Jan 2020 09:35:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ir0oD-0006iA-L5 for emacs-devel@gnu.org; Mon, 13 Jan 2020 09:35:14 -0500 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:60439) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ir0oD-0006dH-Ed for emacs-devel@gnu.org; Mon, 13 Jan 2020 09:35:13 -0500 X-Originating-IP: 178.4.8.44 Original-Received: from [192.168.3.109] (dslb-178-004-008-044.178.004.pools.vodafone-ip.de [178.4.8.44]) (Authenticated sender: forum@alexander.shukaev.name) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 0A248FF811; Mon, 13 Jan 2020 14:35:09 +0000 (UTC) In-Reply-To: <8736ckl015.fsf@mail.linkov.net> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.70.183.199 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:244220 Archived-At: On 13/01/2020 00:36, Juri Linkov wrote: >> 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'? > Exactly, e.g. `ivy' [1] would pick it up out of the box. [1] https://github.com/abo-abo/swiper/blob/master/ivy.el