From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: feature/icomplete-vertical Date: Mon, 14 Sep 2020 09:08:20 +0200 Message-ID: <20200914070820.b354xzoargbibeez@Ergus> References: <20200912133311.6ujtgczj6wyclufy@Ergus> <8BBE93B6-922E-44EF-B7A4-6A82C4F1DE3A@139.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3063"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: jixiuf Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 14 09:09:10 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kHibu-0000gi-Eu for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Sep 2020 09:09:10 +0200 Original-Received: from localhost ([::1]:59562 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHibt-0003G0-GS for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Sep 2020 03:09:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47398) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHibJ-0002qU-JN for emacs-devel@gnu.org; Mon, 14 Sep 2020 03:08:33 -0400 Original-Received: from sonic310-13.consmr.mail.bf2.yahoo.com ([74.6.135.123]:38042) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHibG-0000oA-Vw for emacs-devel@gnu.org; Mon, 14 Sep 2020 03:08:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1600067308; bh=NrBlXQs7EQQwm8E9K34l5W6Nm8i0AZh3lbnV+ceF/2E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=ioL8iP4ZBubYMB4LuKuNvKiC3xK2V9jEbl7HOiCdTuiiLUW7d6SFmwk4Oy1DVDv/54Vrd7CVAtmB6K+KdIw2dTRgLRkALK+xIUJeJS8oEyowfOHenlGBW83aqXcUkN4DBi0FzJNJmPpr06jY3u0hXlnDVtrZFBkWcA0ciW9XwNgLN1XOwpU9CoQ0HPskPhrCqjYNjOHAbTQKCt2WUhOxHXAmbFdajU1/hGsp1pMSrsbJh4+xm13fUYld54WZVAeaO3CMdDpG3F4n9kaIBl2FyheWh/0OUN7bMTlu4SPX5dsvNqR2qr/TzTkGJb7don0hfrS+GcUWTOMDaNj0h+iKLQ== X-YMail-OSG: OX3zA6cVM1m1r6q.s.oceI48Y5IFuit0H6kKS2E.gBGx5fMLPiz6JvRNPABhkyX uX4yemcZzbSs3WW9bYlaQqJqg0gNOYB1JuR8nV3F7R6u1A5zFGsCx6XB248EDRWrZtpi6PiwDx20 3JaCc_mnWEB7Lgxwgo.ZDnBLPaIUW6w8889Y0oOD23YtGbmxxYZ4SZlZJ1IYqGPitA47tpMZ_UfH _bMymMyBoamgJTI5ERhffRbptWR7lwOtsSmWVS9NnKCIP1ZN1T71HJorJ7l4Wq51PskQEGt64Nhw YvxDCukaEub504mVSUJzh___PXPD.aQLnLkMZj3WG2EzfdGslqm5xFdfkhXThBx3gZSC9luZJMAb iT.4sja.zvAC4J5Z7nU6Edo29ygeapPqfC2oXsfTASsJbHFDvh6rOAT.hGNqk7OZo0cVAAmnXNkH hv3aVSF3c4PeG3JR5us8jwLw8dwgk.eU55G.W0zqlULDgOI_aaMR9LYJZtXCNppRW31A5vdyYWIK 4.98yillklHk5pnxJ8VmkXfJWu8iZh._ND6MEQ6y6uMIAqjWm0FVBdYpzCFH3bOq02EOwbOUKekk _EE2tpsJQo0fDsmW5J3M3633doxuuJ8B87ZexDFFMzg0LCgKpQDXfeB0fMWm67RPdyKOXm72RL63 MJzw8pxl_xBYZzdfHd8OoVxwCxGdA9ztLHU_sqxTVHw4vvFkpxG3iok1yPbvS7sfp0IfsZrwnEAA .hpRAH2m57XFFJUVMPQVpU7rFHHBwNYZ4iOIFfMjquyBQ6ya2bWjr1wnRb_YgcPopnbITyfJvEB4 KjSyljXJT82Uyx1vqYePZjlFNTuao87PMarTQjFs6a Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.bf2.yahoo.com with HTTP; Mon, 14 Sep 2020 07:08:28 +0000 Original-Received: by smtp419.mail.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID dba1c16fdd19401bacd9428cffe1c4ae; Mon, 14 Sep 2020 07:08:24 +0000 (UTC) Content-Disposition: inline In-Reply-To: <8BBE93B6-922E-44EF-B7A4-6A82C4F1DE3A@139.com> X-Mailer: WebService/1.1.16583 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Apache-HttpAsyncClient/4.1.4 (Java/11.0.7) Received-SPF: pass client-ip=74.6.135.123; envelope-from=spacibba@aol.com; helo=sonic310-13.consmr.mail.bf2.yahoo.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/14 03:08:28 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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.io gmane.emacs.devel:255609 Archived-At: On Mon, Sep 14, 2020 at 02:44:59PM +0800, jixiuf wrote: > > >> 2020年9月12日 下午9:33,Ergus 写道: >> >> On Sat, Sep 12, 2020 at 01:10:57PM +0000, Gregory Heytings wrote: >>> >>>> >>>>> If there was a built-in vertical mode it would be better / more intuitive. >>>> >>>> Could you try the branch feature/icomplete-vertical? I need some testers before adding it to master. >>>> >>> >>> Alas no, I have been using the following to have icomplete-vertical for quite some time, it works perfectly well, so I don't see why a more complex implementation would be necessary. >>> >>> (setq icomplete-prospects-height 6) >>> (setq icomplete-separator "\n") >>> (defun icomplete-vertical-minibuffer-setup () >>> (setq truncate-lines t) >>> (setq-local completion-ignore-case t) >>> (setq-local read-file-name-completion-ignore-case t) >>> (setq-local read-buffer-completion-ignore-case t) >>> (setq icomplete-hide-common-prefix nil)) >>> (add-hook 'icomplete-minibuffer-setup-hook #'icomplete-vertical-minibuffer-setup) >>> (defun icomplete-vertical-reformat-completions (completions) >>> (save-match-data >>> (let ((cnp (substring-no-properties completions))) >>> (if (string-match "^\\((.*)\\|\\[.+\\]\\)?{\\(\\(?:.\\|\n\\)+\\)}" cnp) >>> (format "%s \n%s" >>> (or (match-string 1 cnp) "") >>> (replace-regexp-in-string "^" (make-string (current-column) ? ) (match-string 2 cnp))) >>> cnp)))) >>> (defun icomplete-vertical-adjust-minibuffer-height (completions) >>> (let* ((comp (icomplete-vertical-reformat-completions completions)) >>> (complen (length (split-string comp "\n")))) >>> (if (> complen 1) (enlarge-window (- icomplete-prospects-height (1- (window-height))))) >>> comp)) >>> (advice-add 'icomplete-completions :filter-return #'icomplete-vertical-adjust-minibuffer-height) >> >> 1) Internal functionalities try not to use advises. >> 2) The branch is not actually more complex, it just generates the >> formatted vertical output form the beginning. >> 3) It does more or less the same you are doing but with a simpler >> config: >> >> (icomplete-mode t) >> (icomplete-format 'vertical) >> >> 4) We add arrow bindings to move >> 5) Add completion matching faces is also coming. >> > >Some feedback about branch : feature/icomplete-vertical > >I tried this branch with config: > > (icomplete-mode 1) > (setq icomplete-format 'vertical) > > > >And found this bug still exists: > >https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24293 >https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39379 > >Some related links about how to work around this bug: > >https://www.reddit.com/r/emacs/comments/fswt7c/using_icomplete_vertically/fm86m0q?utm_source=share&utm_medium=web2x&context=3 >https://www.reddit.com/r/emacs/comments/fswt7c/using_icomplete_vertically/fm8z6h0?utm_source=share&utm_medium=web2x&context=3 > >Hope the problem of disappearing prompt and entered text problem can be fixed in your branch. > > Hi: I can't reproduce https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24293 with this config. emacs -Q (icomplete-mode 1) (setq icomplete-format 'vertical) The prompt is not disappearing for me. Is there some other indication/config missing?