From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.devel Subject: Re: Stepping Back: A Wealth Of Completion systems Re: [ELPA] New package: vertico Date: Wed, 7 Apr 2021 21:55:27 +0300 Message-ID: References: <9c9af088-580f-9fb1-4d79-237a74ce605c@inventati.org> <874kgkxxs0.fsf@posteo.net> <3ec7e2e58a100426a22e@heytings.org> <871rbmjmwx.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2416"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.0.6 (2021-03-06) Cc: emacs-devel@gnu.org To: Joost Kremers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Apr 07 21:02:09 2021 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 1lUDRI-0000Vi-OZ for ged-emacs-devel@m.gmane-mx.org; Wed, 07 Apr 2021 21:02:08 +0200 Original-Received: from localhost ([::1]:52116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUDRH-0001Sc-Qm for ged-emacs-devel@m.gmane-mx.org; Wed, 07 Apr 2021 15:02:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUDPp-0000t6-5S for emacs-devel@gnu.org; Wed, 07 Apr 2021 15:00:37 -0400 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:57421) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUDPm-0004PU-To for emacs-devel@gnu.org; Wed, 07 Apr 2021 15:00:36 -0400 Original-Received: from localhost ([::ffff:41.210.159.189]) (AUTH: PLAIN securesender, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000001DF49.00000000606E014E.00007AD1; Wed, 07 Apr 2021 12:00:30 -0700 Mail-Followup-To: Joost Kremers , emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: <871rbmjmwx.fsf@fastmail.fm> Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-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:267560 Archived-At: * Joost Kremers [2021-04-07 15:32]: > > On Wed, Apr 07 2021, Gregory Heytings wrote: > > I've been thinking about this, and I'm not sure I understand what the real > > difference between "completing" and "selecting" is. Do I understand > > correctly that the difference is between, for example, expanding command names > > (completing), and choosing an emoji in a list (selecting)? > > Yeah, I don't get it either. If I'm completing a command name, I can also say > that I'm selecting a command name from all available command names. Or when I'm > completing a file name, I'm selecting a file from all the files on > my system. When user completes, user brings to a whole one of candidates, but in general, does not necessary selects it. Completion of a candidate preceds selection. Maybe some packages select or may be tuned to select as soon as candidate is completed, I personally find that dangerous. Using external completion like dmenu or rofi, fzf or similar, is useful when Emacs run on the command line. (defun dmenu-completing-read (prompt collection) ;; &optional predicate require-match initial-input history def inherit-input-method) "Uses external `dmenu' command for Emacs completions." (let* ((collection (concat (string-join collection "\n") "\n")) (file (string-to-file-force collection "/dev/shm/collection")) (dmenu "dmenu")) (with-temp-buffer (call-process dmenu file (current-buffer) nil "-fn" "DejaVu:pixelsize=30" "-l" "10" "-i" "-b" "-p" prompt "-nb" "dark goldenrod" "-nb" "black") (string-trim (buffer-string))))) (dmenu-completing-read "Hello: " '("John" "Joe" "Baby")) In general I would like completion to work on the command line, without frame, as well. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns Sign an open letter in support of Richard M. Stallman https://rms-support-letter.github.io/