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#61286: 28.2; No visible candidates after toggle icomplete-vertical-mode Date: Sun, 05 Feb 2023 08:44:33 +0200 Message-ID: <83tu00sjam.fsf@gnu.org> References: <87k00wj2vd.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15135"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61286@debbugs.gnu.org To: Fernando de Morais Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 05 07:45:19 2023 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 1pOYm6-0003im-Sr for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Feb 2023 07:45:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pOYlr-0001cT-Vr; Sun, 05 Feb 2023 01:45:04 -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 1pOYlq-0001c6-HR for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2023 01:45:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pOYlq-0008Mt-4f for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2023 01:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pOYlp-0004Jv-KG for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2023 01:45:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Feb 2023 06:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61286 X-GNU-PR-Package: emacs Original-Received: via spool by 61286-submit@debbugs.gnu.org id=B61286.167557947816557 (code B ref 61286); Sun, 05 Feb 2023 06:45:01 +0000 Original-Received: (at 61286) by debbugs.gnu.org; 5 Feb 2023 06:44:38 +0000 Original-Received: from localhost ([127.0.0.1]:43949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pOYlQ-0004Iu-3z for submit@debbugs.gnu.org; Sun, 05 Feb 2023 01:44:38 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pOYlK-0004Ia-Ry; Sun, 05 Feb 2023 01:44:34 -0500 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 1pOYlF-0008Lr-GP; Sun, 05 Feb 2023 01:44:25 -0500 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=WZPuVRcn6P6QgJJC/KgAwF5skstc8kvVvQVL6SbFosM=; b=ES6pyCBv+qyb OjZgOWWiWQyI1L8Fv8BX9FI2gvXplu93o7v/2QrZX52MdVy5BIQxL6S7/RVIfQofiiZjwS4FCZWrA 5OjJmVIdUStECiVIxUD/HZN+W66TAbclsIm2JraTGmyDkbLswRjNfkf/gIGUXRTad5VJy9vAL2nxq MZIv0MD45R+1XC02JaG1RtYiM3ble59cbuY3v+l+kdovz3qOnKKWBzrDRJOdd44g1BnWcMmUrFqqp 4h+eH5volqUq4j5fuMAMTSSm/bBUpvkUS+cNlyzrJGrbtPdkFTJq6HVLNsxbA/uxqA48MFA7EX8qw Pzmvpxq0UZ27d3wS7ZZkSw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pOYlE-0007wF-V0; Sun, 05 Feb 2023 01:44:25 -0500 In-Reply-To: <87k00wj2vd.fsf@gmail.com> (message from Fernando de Morais on Sat, 04 Feb 2023 22:51:50 -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:254819 Archived-At: tags 61286 notabug thanks > From: Fernando de Morais > Date: Sat, 04 Feb 2023 22:51:50 -0300 > > To reproduce, which is possible with 'emacs -Q', please: > > 1. Evaluate the following snippet: > > (progn > (with-eval-after-load 'icomplete > (define-key icomplete-minibuffer-map (kbd "C-v") #'icomplete-vertical-mode) > (customize-set-variable 'icomplete-show-matches-on-no-input t)) > (icomplete-mode)) > > 2. C-x C-f > 3. C-v (to toggle `icomplete-vertical-mode' while still in the minibuffer). > > Results in: > > - Only the first candidate can be seen in the vertical list. > > Completion works as expected. Quitting and starting a new command, with > `icomplete-vertical-mode' still enabled, displays the completion > candidates correctly. That's because icomplete-vertical-mode adds its own function to icomplete-minibuffer-setup-hook, but when you invoke C-v in the minibuffer, that's too late: you already entered the minibuffer, so the minibuffer is not set up as icomplete-vertical-mode expects. To solve this, bind C-v to a command that does what icomplete--vertical-minibuffer-setup does, in addition to turning on icomplete-vertical-mode, and then it will work as you expect. Like this: (defun icvsetup () (interactive) (setq-local icomplete-hide-common-prefix nil icomplete-prospects-height 25 redisplay-adhoc-scroll-in-resize-mini-windows nil) (icomplete-vertical-mode)) (progn (with-eval-after-load 'icomplete (define-key icomplete-minibuffer-map (kbd "C-v") #'icvsetup) (customize-set-variable 'icomplete-show-matches-on-no-input t)) (icomplete-mode)) IOW, this is a cockpit error, not a bug in Emacs.