From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: feature/completions-highlight-modifications e3c5b99 3/6: Add completions-highlight-mode initial implementation. Date: Fri, 20 Nov 2020 11:32:30 +0200 Organization: LINKOV.NET Message-ID: <87k0ugfirt.fsf@mail.linkov.net> References: <20201115224943.o5r7lkkblmyt2ox4@Ergus> <20201116033719.63dryvqm4ozfer2r@Ergus> <92f3cbd7-29a0-461a-a023-562bc6020ea8@default> <87v9e5herj.fsf@mail.linkov.net> <20201116102729.ywubtda6cqdzc45z@Ergus> <87d00acuh3.fsf@mail.linkov.net> <20201119032519.lpa53ixezgpdppze@Ergus> <87d009kfmf.fsf@mail.linkov.net> <20201119105052.kfichqojkhfwwsiz@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="32093"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: Stefan Monnier , Drew Adams , emacs-devel@gnu.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 20 11:10:48 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 1kg3NP-0008Da-R8 for ged-emacs-devel@m.gmane-mx.org; Fri, 20 Nov 2020 11:10:47 +0100 Original-Received: from localhost ([::1]:38982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kg3NO-0006Da-KP for ged-emacs-devel@m.gmane-mx.org; Fri, 20 Nov 2020 05:10:46 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kg3La-00048s-Sn for emacs-devel@gnu.org; Fri, 20 Nov 2020 05:08:54 -0500 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:60467) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kg3LY-0004NR-RK for emacs-devel@gnu.org; Fri, 20 Nov 2020 05:08:54 -0500 X-Originating-IP: 91.129.97.46 Original-Received: from mail.gandi.net (m91-129-97-46.cust.tele2.ee [91.129.97.46]) (Authenticated sender: juri@linkov.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 65FACFF803; Fri, 20 Nov 2020 10:08:48 +0000 (UTC) In-Reply-To: <20201119105052.kfichqojkhfwwsiz@Ergus> (Ergus's message of "Thu, 19 Nov 2020 11:50:52 +0100") Received-SPF: pass client-ip=217.70.183.199; envelope-from=juri@linkov.net; helo=relay9-d.mail.gandi.net 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, 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:259477 Archived-At: > c) conflict with some frequently user-defined bindings. For example > S-arrow now is used to select the region and M-arrow to backward word But don't arrow keys cause more conflicts? They are used in the minibuffer with their default bindings left/right-char, previous/next-line. This is the reason why icomplete provides less natural keybindings 'C-.' and 'C-,' to move to the previous/next completion. > Maybe we should look more how zsh behaves... and try to mimic that as > much as possible. Because it is already pretty consisten Does zsh use arrow keys to navigate in completions? How then it's possible to get previous/next history item (up/down arrows), and move the cursor in the command line (left/right arrows)? >>Highlighting completion under point is useful on its own. >>It makes sense for the users to enable it separately from other features, >>like hl-line-mode is useful on its own. >> >>hl-line-mode is a mode because it can be useful in any buffer, >>but completion highlighting is useful only in the *Completions* buffer, >>so it can be a user option. >> > Yes, but this actually works as a hook, so we need to add/remove the > command to/from post-command-hook. That's easier and cleaner with a mode > (or a toggle-something command) than with a custom right?. (please, > remember I don't know the deep lisp secrets, so maybe there is actually > a better way) With a defcustom it's easier to the user to enable completion highlighting in the *Completions* buffer. How the user could do the same using hooks? >>Adding much more code to simple.el is undesirable indeed, but >>for the completion highlighting feature it would take only >>~20 lines of code and option/face definition in minibuffer.el. >> > Indeed. I already did that on the beginning, but then I moved it > out. Actually If I can choose it will be better if all the *Completions* > stuff are moved to their own file... But that's a task for a good > developer, not me ;p. There is actuallu the completion.el I am not sure > what's there. completion.el provides dynamic-completion-mode. >>All the remaining features need own package file indeed. >>BTW, the file name completions-highlight.el is too ugly >>as a package name. An example of a good package/mode name is >>icomplete.el. A new package that allows navigation >>of completions from the minibuffer could be like icomplete.el >>in other regards too: define the mode/keymap in the same way, >>use similar options/hooks, etc. > > I agree, but we have display-fill-column, display-line-numbers... display-fill-column-indicator.el wins the prize for the longest file name in Emacs repo, display-line-numbers.el is a forerunner :-) > In any case I don't care the name at all; so I will just ask here for names, > and when the war ends I just obey the winner orders. Sorry, I have no enough fantasy to come up with a good name. Maybe someone could help to invent a better name?