From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: feature/completions-highlight-modifications e3c5b99 3/6: Add completions-highlight-mode initial implementation. Date: Sun, 15 Nov 2020 22:56:54 -0500 Message-ID: References: <20201115023629.19537.77471@vcs0.savannah.gnu.org> <20201115023631.C78AB20A27@vcs0.savannah.gnu.org> <20201115224943.o5r7lkkblmyt2ox4@Ergus> <20201116033719.63dryvqm4ozfer2r@Ergus> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4979"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 16 04:57:36 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 1keVe4-0001DH-KG for ged-emacs-devel@m.gmane-mx.org; Mon, 16 Nov 2020 04:57:36 +0100 Original-Received: from localhost ([::1]:39714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1keVe3-00077I-NB for ged-emacs-devel@m.gmane-mx.org; Sun, 15 Nov 2020 22:57:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keVdW-0006hz-Do for emacs-devel@gnu.org; Sun, 15 Nov 2020 22:57:03 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:2207) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keVdT-0006ok-QQ for emacs-devel@gnu.org; Sun, 15 Nov 2020 22:57:01 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 3AE914410F7; Sun, 15 Nov 2020 22:56:57 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 382294410F5; Sun, 15 Nov 2020 22:56:55 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1605499015; bh=2hzEN83sHSX8nazUUOkF9uBWHH08mAVetnAYWBT96Wo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=LOFXoBIlOJrCjjIS5hlCEqyAENBy7AT2dboHEHqelXjn8/Ei2195b3EDFAp7bc4Ii KLfmNF9HfOefW6WAc5FatUveBymPYj2APVO81gaRvUAsHO+2npjWOOPCgXVEPCO02y TgwvoZjdjJpvTOu0MaGTejqvR0/1ltYOY4BqeXGTyPOM09I9c33w0EC5tWSBCsl890 UsdtTPHyt7TI9kPHCI1jORAHfnnACa9iPLmTmvpc6T1LbEqp2+Sa211XPnYvJKEBbn 4UuYr1JUbKNkyX9dpnGEpMYL6pYW//tuONHV0i9bHvroPT9fHgwanWlbNXkRZCyGJ7 BjrkuHkZAo51g== Original-Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 060CE1202FA; Sun, 15 Nov 2020 22:56:54 -0500 (EST) In-Reply-To: <20201116033719.63dryvqm4ozfer2r@Ergus> (Ergus's message of "Mon, 16 Nov 2020 04:37:19 +0100") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/15 22:56:57 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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:259215 Archived-At: >>> How can I make that emacs find the file automatically? It needs to be >>> added in cus-.el right? >>What do you mean by "find the file automatically"? > Now I have to load the file with -l to be allowed to use the command. Oh, then you want to put a `;;;###autoload` cookie just above the entry point(s). > 3) If completion-cycle-threshold is a number then candidates are shown, > but when start cycling, the order is independent from the one in > *Completions* (this behavior IMO is even worst). Also, there is not > feedback between the current candidate and the visible completions list. Yes, that's the case I find similar. The differences I can see are: - In your code you get to see the other candidates (with `completion-cycle-threshold` the *Completions* is not necessarily shown). - In your code, you get to see your selection highlighted in *Completions*. - In your code, you have to hit TAB an extra time, whereas with `completion-cycle-threshold` you start cycling as soon as there are few enough candidates. - In your code the threshold depends on the size of *Completions* (and the size of the completions themselves?) rather than being a fixed limit. - The order of completions is different. I think it might be a good idea to try and bring those two closer to each other. E.g. when cycling, make sure the *Completions* buffer, if shown, displays the choices in the order in which they are cycled, and highlight the chosen one. I think the key [pun unintended] difference between the two is the extra TAB which lets you interpret it as a request to enter a special mode with special bindings to move between the different displayed candidates. Stefan