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: feature/icomplete-vertical Date: Mon, 05 Oct 2020 14:00:42 +0300 Message-ID: <83k0w5c4yt.fsf@gnu.org> References: <20200912133311.6ujtgczj6wyclufy@Ergus> <20200920130435.heye7bk73pm252km@Ergus> <83sgbczj0i.fsf@gnu.org> <83lfh4zfml.fsf@gnu.org> <838sd4z6lz.fsf@gnu.org> <20201001164804.mqqyxtet4ttweuyv@Ergus> <83blhhdy3w.fsf@gnu.org> <87d01xghmt.fsf@gmail.com> <83sgatc8er.fsf@gnu.org> <83mu11c78j.fsf@gnu.org> <87tuv9eygk.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11188"; mail-complaints-to="usenet@ciao.gmane.io" Cc: ghe@sdf.org, spacibba@aol.com, emacs-devel@gnu.org, casouri@gmail.com, juri@linkov.net To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 05 13:02:09 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 1kPOFs-0002l5-Cs for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Oct 2020 13:02:08 +0200 Original-Received: from localhost ([::1]:48716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPOFr-0002KP-DL for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Oct 2020 07:02:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPOEY-0001QT-Iz for emacs-devel@gnu.org; Mon, 05 Oct 2020 07:00:46 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56516) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPOEW-0002xQ-O7; Mon, 05 Oct 2020 07:00:44 -0400 Original-Received: from [176.228.60.248] (port=3737 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kPOET-0001vd-Vc; Mon, 05 Oct 2020 07:00:42 -0400 In-Reply-To: <87tuv9eygk.fsf@gmail.com> (message from =?utf-8?B?Sm/Do28g?= =?utf-8?B?VMOhdm9yYQ==?= on Mon, 05 Oct 2020 11:52:59 +0100) 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:257103 Archived-At: > From: João Távora > Cc: ghe@sdf.org, spacibba@aol.com, juri@linkov.net, casouri@gmail.com, > emacs-devel@gnu.org > Date: Mon, 05 Oct 2020 11:52:59 +0100 > > Eli Zaretskii writes: > > >> That's odd, I've been C-x C-f'ing to directories with "a lot" of files > >> and I don't notice any problems. What size of "lot" did you have in > >> mind? > > > > More than can be displayed, one candidate on each line, by the frame's > > dimensions, I guess. > > I've certainly got more than that, and the problem doesn't happen. Then either you truncate the candidate's (i.e., don't show all of it), or your code isn't working properly. > > The code which displays the min-window is more-or-less the generic > > Emacs window-display code, it doesn't care that not all of the stuff > > fits in the window. > > That's the code that honours max-mini-window-height, right? Yes. Followed by the normal window redisplay. > Though that doesn't seem to be what's kicking in here, I believe it > should be. Not sure I can parse this properly. What exactly isn't "kicking in"? > Anyway, I think it's reasonable to suggest I think, that whoever is > truncating the display has someway of notifying the client (whoever > requested the display), that truncation happened, or is about to happen. I think whoever truncates the display is the same as the client. Unless I misunderstand what you mean by "truncate". > > If an application wants to fit the buffer in the window, or display > > some hint about truncation, it's the application's business to do > > these things. > > I guess you can argue that, but this implies there are ways to predict > truncation (since being notified of it seems to be what you're opposed > to). There are ways. They aren't necessarily easy, but if your application does care about not everything being visible in a window, the application must do something about it, because the "normal" Emacs display doesn't treat partial display of a buffer as something special, since that is what happens all the time in Emacs. > So how is the application to know if its n lines, of lengths L = {l1, > ..., li, ..., ln}, it wants to display (not necessarily by buffer > insertion) in the mini-window need truncation and starting in which > line? We have window-text-pixel-size for that. > Does it need to perform calculations with max-mini-window-height? Yes. > If so, is there a "canonical" way to perform these calculations that > accounts for fontsizes, frame widths, etc? To be clear, I find this > information useful for other domais, notably designing the way the Eldoc > should show information in the echo area. Not sure what should be canonical here. AFAIU, just using window-text-pixel-size and comparing with the window dimensions is all that's needed.