From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#45767: bug#45768: icomplete-mode does not provide in region completion for dabbrev-completion Date: Sat, 07 May 2022 10:22:32 -0400 Message-ID: References: <255598638.117929.1610282275124@office.mailbox.org> <87k0ayh499.fsf@gnus.org> <87mtftvea7.fsf@gnus.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12594"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 45768@debbugs.gnu.org, simon254@mailbox.org, 45767@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 07 16:23:13 2022 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 1nnLKz-00033k-1E for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 May 2022 16:23:13 +0200 Original-Received: from localhost ([::1]:45574 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nnLKw-0004XP-1a for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 May 2022 10:23:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53236) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnLKo-0004TN-8H for bug-gnu-emacs@gnu.org; Sat, 07 May 2022 10:23:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58755) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nnLKn-00058m-W4 for bug-gnu-emacs@gnu.org; Sat, 07 May 2022 10:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nnLKn-0007Xv-Pb for bug-gnu-emacs@gnu.org; Sat, 07 May 2022 10:23:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 May 2022 14:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45767 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 45767-submit@debbugs.gnu.org id=B45767.165193337528994 (code B ref 45767); Sat, 07 May 2022 14:23:01 +0000 Original-Received: (at 45767) by debbugs.gnu.org; 7 May 2022 14:22:55 +0000 Original-Received: from localhost ([127.0.0.1]:52650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnLKU-0007XI-0a for submit@debbugs.gnu.org; Sat, 07 May 2022 10:22:55 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:60928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnLKS-0007Wz-EU; Sat, 07 May 2022 10:22:40 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id BE5A6440C44; Sat, 7 May 2022 10:22:34 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 6D45F440991; Sat, 7 May 2022 10:22:33 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1651933353; bh=TSqGZblDrucwN2yHvV28vjEwZJwOcYkQDCAdCU331zM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=OeQt+aj6GZR8Ua2i8IaC/vc2tdB4GeZCpQMBt6Mp2w5WwCqVXdFRZb7nn/Rnqcz9s TJt143WM+UZz8awWbrS9tXVEc/3gLtCnpIQWK5Xy34AjX5Gg8A6JwBHLCRvebLTiVe sjV10l9Oc5R/BPAwoRDSxIvO8ZzvMdRj2YKpckB5zEuQOalFKLAKQWqBoZQ0nOLzch 03TrFGs4KvjCbjNk6ohOLgUo0AXXs9BPhaRqYuYJ5v9M9cX/AMW57SBESS4APrR/D/ VjyBdnkOyoiYdsjBnliVZMl68yx0eE+vRDzBsRfaXafj4TuG6o3l7P6CGK34N6oIOD ckYe2FRYqOKkw== Original-Received: from alfajor (modemcable034.207-20-96.mc.videotron.ca [96.20.207.34]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4D169120697; Sat, 7 May 2022 10:22:33 -0400 (EDT) In-Reply-To: <87mtftvea7.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 07 May 2022 12:16:16 +0200") 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" Xref: news.gmane.io gmane.emacs.bugs:231591 Archived-At: Lars Ingebrigtsen [2022-05-07 12:16:16] wrote: > Stefan Monnier writes: >> The problem is that `icomplete-in-buffer` relies on >> `completion-in-region-mode-predicate` being passed to >> `completion-in-region` (this is needed so Icomplete can know when you've >> finished the completion), which `completion-at-point` does but which >> `dabbrev-completion` does not do, so `icomplete-in-buffer` is not used >> when completing via `dabbrev-completion`. > I see. I've now added this to the doc string on icomplete-in-buffer, > and since this is working as intended, I'm closing this bug report. No, it's not working as intended: what I wrote just means that the problem is in `dabbrev-completion` which shouldn't just call `completion-in-region` as it does. It should either do it within a let-binding of `completion-in-region-mode-predicate` or with a call to `completion-at-point` instead (which will take care to bind `completion-in-region-mode-predicate`). I just pushed a patch doing the latter (and providing a new `dabbrev-capf` function). Stefan