From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: select yank via completion Date: Thu, 26 Nov 2020 11:57:33 +0200 Message-ID: References: <87wnymda5g.fsf@mail.linkov.net> <87ima5he8j.fsf@mail.linkov.net> <87mtzfzt9a.fsf@mail.linkov.net> <87k0uifp3w.fsf@mail.linkov.net> <87d009iykt.fsf@mail.linkov.net> <3341c426-3a86-4ef0-a0ca-9102191a925b@default> <87o8jsiems.fsf@mail.linkov.net> <87o8jmbbu9.fsf@tcd.ie> <878sapnb0k.fsf@mail.linkov.net> <87lfep5gmt.fsf@mail.linkov.net> <877dq8sdxa.fsf@tcd.ie> <87360wv58u.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22200"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: K-9 Mail for Android Cc: spacibba@aol.com, Andrii Kolomoiets , Jean Louis , rudalics@gmx.at, Stefan Monnier , Gregory Heytings , Drew Adams To: emacs-devel@gnu.org, Juri Linkov , "Basil L. Contovounesios" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 26 10:59:03 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 1kiE3L-0005fL-6Q for ged-emacs-devel@m.gmane-mx.org; Thu, 26 Nov 2020 10:59:03 +0100 Original-Received: from localhost ([::1]:38132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kiE3K-0001N7-5u for ged-emacs-devel@m.gmane-mx.org; Thu, 26 Nov 2020 04:59:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35406) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kiE2C-0000uS-N3 for emacs-devel@gnu.org; Thu, 26 Nov 2020 04:57:52 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38511) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kiE29-0006OU-Ek; Thu, 26 Nov 2020 04:57:49 -0500 Original-Received: from [2a02:14f:1fe:1afb::b910:720e] (port=41162) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1kiE1y-0000oG-B6; Thu, 26 Nov 2020 04:57:41 -0500 In-Reply-To: <87360wv58u.fsf@mail.linkov.net> 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:259831 Archived-At: On November 26, 2020 11:26:13 AM GMT+02:00, Juri Linkov = wrote: > >>>>>> + (when (> (length s) (- 40 b)) > >>>>>> + (add-text-properties > >>>>>> + (min (+ b 40) (length s)) > (length s) > >>>>>> + `(display ,ellipsis) s)) > >>>>> > >>>>> Any chance this threshold can be configurable? I don't mind > completions > >>>>> as wide as or wider than the frame in Ivy's minibuffer=2E > >> > >> As an intermediate fix, now code at least doesn't contain an > arbitrary > >> constant, but defaults to the frame width=2E > > > > Thanks, but don't scroll bars, fringes, etc=2E have to be subtracted > from > > the frame width? >=20 > Is this the correct formula? >=20 > (floor (- (frame-inner-width) > (frame-internal-border-width) > (frame-fringe-width) > (frame-scroll-bar-width)) > (frame-char-width)) I think you want simply to call frame-text-cols=2E