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: [PATCH] Support "\n" in icomplete-separator Date: Thu, 12 Nov 2020 01:26:46 +0300 Message-ID: References: <837dqr27zs.fsf@gnu.org> <83361f22ah.fsf@gnu.org> <83sg9fzlto.fsf@gnu.org> <20201111215523.ekv46vxuxqi6po6o@Ergus> 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="36917"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.0 (3d08634) (2020-11-07) Cc: andreyk.mad@gmail.com, emacs-devel@gnu.org, rudalics@gmx.at, monnier@iro.umontreal.ca, Gregory Heytings , Eli Zaretskii To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 12 07:56: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 1kd6XI-0009Uf-3i for ged-emacs-devel@m.gmane-mx.org; Thu, 12 Nov 2020 07:56:48 +0100 Original-Received: from localhost ([::1]:46440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kd6XH-0000Uh-6a for ged-emacs-devel@m.gmane-mx.org; Thu, 12 Nov 2020 01:56:47 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46822) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kd6Vt-00081j-U2 for emacs-devel@gnu.org; Thu, 12 Nov 2020 01:55:21 -0500 Original-Received: from static.rcdrun.com ([95.85.24.50]:45179) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kd6Vs-0006Pg-4J; Thu, 12 Nov 2020 01:55:21 -0500 Original-Received: from localhost ([::ffff:197.157.34.177]) (AUTH: PLAIN admin, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by static.rcdrun.com with ESMTPSA id 00000000002C0004.000000005FACDC54.000057A1; Thu, 12 Nov 2020 06:55:16 +0000 Content-Disposition: inline In-Reply-To: <20201111215523.ekv46vxuxqi6po6o@Ergus> Received-SPF: pass client-ip=95.85.24.50; envelope-from=bugs@gnu.support; helo=static.rcdrun.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/12 01:55:17 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_06_12=1.543, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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:259058 Archived-At: * Ergus [2020-11-12 00:58]: > On Wed, Nov 11, 2020 at 08:37:36PM +0000, Gregory Heytings wrote: > > > > > > > > If someone wants to claim that display of completion candidates by > > > icomplete-vertical, ivy, etc. is anywhere near as pretty as what you > > > get when you click on the address bar of a browser and get the > > > drop-down list of candidates, then I can only say that I cannot > > > disagree more. > > > > > > > But why??? I just tried Ivy again, AFAICS it has everything you have in > > the drop-down list of a browser: the matching substring is colorized, > > you can use the mouse to click on a candidate to select it, you can use > > the mouse to scroll the list up and down... What am I missing? > > Indeed, I don't see any important visual "disadvantage" in ivy > appearance compared with what is around. Plus ivy adds some exclusive > features like the M-o actions, avy integration (avy was created the same > author) and hydra integration (also from same author). IMO (I already > said that) we should put more attention to ivy if we want a > better/pretty completion already working. Ivy solves details like the > scrolling, long prompt, long like candidates and so on... Exactly. Ivy is for me so much more useful than icomplete/ido/fido And by adding this function from Ivy friend, it can be added to ivy-display-functions-alist Its value is ((counsel-irony . ivy-display-function-overlay) (describe-function . ivy-display-function-window) (ivy-completion-in-region . ivy-display-function-overlay) (t . ivy-display-function-window)) Original value was ((ivy-completion-in-region . ivy-display-function-overlay) (t)) Then the mode line stays down where it should be and split window appears with collection. I am including this hear as maybe icomplete developers wish to implement similar. (defun ivy-display-function-window (text) (let ((buffer (get-buffer-create "*ivy-candidate-window*")) (str (with-current-buffer (get-buffer-create " *Minibuf-1*") (let ((point (point)) (string (concat (buffer-string) " " text))) (add-face-text-property (- point 1) point 'ivy-cursor t string) string)))) (with-current-buffer buffer (let ((inhibit-read-only t)) (erase-buffer) (insert str))) (with-ivy-window (display-buffer buffer `((display-buffer-reuse-window display-buffer-below-selected) (window-height . ,(1+ (ivy--height (ivy-state-caller ivy-last)))))))))