From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: feature/icomplete-vertical Date: Mon, 05 Oct 2020 12:24:55 +0100 Message-ID: <87mu10gbjs.fsf@gmail.com> 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> <83k0w5c4yt.fsf@gnu.org> 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="34404"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: ghe@sdf.org, spacibba@aol.com, emacs-devel@gnu.org, casouri@gmail.com, juri@linkov.net To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 05 13:26:04 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 1kPOd1-0008ol-Fu for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Oct 2020 13:26:03 +0200 Original-Received: from localhost ([::1]:36542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPOcz-0001v1-4i for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Oct 2020 07:26:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPOc4-00010G-8B for emacs-devel@gnu.org; Mon, 05 Oct 2020 07:25:04 -0400 Original-Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:36515) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kPOc0-0005ju-QF; Mon, 05 Oct 2020 07:25:03 -0400 Original-Received: by mail-wm1-x330.google.com with SMTP id e2so8380960wme.1; Mon, 05 Oct 2020 04:25:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=rnwioWX7CFxhiZ3OXxLnWiX99DZzeTooCMHkI8Y5qiw=; b=kxJQOlJBQT6Omazum/iOvcJ3XoAc6iyxTtCnX/HR6wP74GC+lmV/n1vIxRpWA+NGau xjJN5ghitjtMtHtTTxt2VFdpQg9vKKqSGnZvf3W/uSbw1kW7MQ0LpOjDaqbQjUUpFbCO Kca9+PeynIy1j+y6xGkrYULroi/vsVzObf0yuX8N1KmGtta2Uq0ZfeIM4FNZqkMgQvO1 TskIlsPqYJ5SPDnHAD9i/m16qPFz5IqAMbDNgOnqWONSFTXwTxXuo4SUMoye0YAB379F w1gJuoE82fD0SlzOw3qVlgRDgkgMSRoygx2L7ZjZuHBkM3Sku/HXzK/HBq5gPqNmPY4t Aotg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=rnwioWX7CFxhiZ3OXxLnWiX99DZzeTooCMHkI8Y5qiw=; b=ZmAgb6G5Wz8a9DozcwotMgdPRIY9b8PbM7hqC52/IuwwA3zJ1pWg8YuppmUa55eaG8 oEgu/jsdRfKcnKlronZpakpLHwB0KzTm3HqX93s5WZZhVZpX1JWEhGZKf+w1Ak7y0At+ KlfyAkADo39J99PnODpFPIOHlr7A8Ngogv5Pttn63slep8JhrNHgedzus9+9zT9jtPfl H/Oevs+la/a5Yq1ytaRBE1q3sfF7evAADxEatsHr09YSGsiyR1BdeDimfaQjwtz3TdAN v3ufRwfxlUEbdqaRCAcHJfQaUZtsqPm6toN7VuIrVThnVwff29KX+aVSs8am1kRiNErS wFNg== X-Gm-Message-State: AOAM530vnJI7BIbfc4IuVYe/XZQQ7lgMGmc7scR+sCUbr8nSKN+z84aJ GXG2LQ8N4YScVPjaqs+6AaJr1tUq4qE= X-Google-Smtp-Source: ABdhPJwB3p7k8M3w4Y9Zd1K8+e/12xb6P0TWSYvwM/t16eGrpujmFox8qpqoFROl9s/bip6GZadkXQ== X-Received: by 2002:a1c:7d4d:: with SMTP id y74mr10881698wmc.73.1601897098440; Mon, 05 Oct 2020 04:24:58 -0700 (PDT) Original-Received: from krug (89-180-147-115.net.novis.pt. [89.180.147.115]) by smtp.gmail.com with ESMTPSA id u12sm13345109wrt.81.2020.10.05.04.24.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 04:24:57 -0700 (PDT) In-Reply-To: <83k0w5c4yt.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 05 Oct 2020 14:00:42 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x330.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:257107 Archived-At: 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. >>=20 >> 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. Well, it's not my code, it's Gregory's. I just evaluated it and it seems to be working decently for the day or so. But I'm fine to admit there may be corner cases where it would fail, I just haven't detected those failures. >> > 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"? Don't worry. I meant I have that variable set to 3, but I'm seeing a 6-line-high minibuffer prompt, so something in Gregory's code seems to be overriding it. By "should be" I'm stating that that overriding shouldn't happen, i.e. I'm searching for a better solution. >> 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". Truncation is being given something to display, such as here: (let ((minibuffer-setup-hook (lambda () (insert (format "one\ntwo\nthree\nfour")))= )) (read-minibuffer "hey")) and _not_ actually displaying it becasue of some window size constraint. > 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. Right. But is there a very large cost in implementing a mechanism of notification that applications can optionally subscribe to take action when this common thing happens to them? > 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. Thanks, but I don't understand how that could help here. The docstring says: This function exists to allow Lisp programs to adjust the dimensions of WINDOW to the buffer text it needs to display. But we need a subtly different use which would be: This function exists to allow Lisp programs to adjust the buffer text so that it fits visually in WINDOW. I don't know how to use the function to do this. In other words, I have some buffer text and I would like to know: 1) If it fits in WINDOW; 2) If it doesn't, where is the cutoff, as a text position. I'm re-reading the docstring to see it this is possible, but I don't think the function is tailored for this use case. Anyway, if that function existed it would be what I called the canonical solution for this case. Jo=C3=A3o