unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: ghe@sdf.org, spacibba@aol.com, emacs-devel@gnu.org,
	casouri@gmail.com, juri@linkov.net
Subject: Re: feature/icomplete-vertical
Date: Mon, 05 Oct 2020 12:24:55 +0100	[thread overview]
Message-ID: <87mu10gbjs.fsf@gmail.com> (raw)
In-Reply-To: <83k0w5c4yt.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 05 Oct 2020 14:00:42 +0300")

Eli Zaretskii <eliz@gnu.org> 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.

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ão



  parent reply	other threads:[~2020-10-05 11:24 UTC|newest]

Thread overview: 118+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-12 13:10 feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-12 13:33 ` feature/icomplete-vertical Ergus
2020-09-12 14:30   ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-14  6:44   ` feature/icomplete-vertical jixiuf
2020-09-14  7:08     ` feature/icomplete-vertical Ergus
2020-09-14 15:02     ` feature/icomplete-vertical Ergus
2020-09-14 17:13       ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-14 17:31         ` feature/icomplete-vertical Ergus
2020-09-16 15:22       ` feature/icomplete-vertical jixiuf
     [not found]         ` <20200918005354.muskx2b7tssyqzzk@Ergus>
2020-09-18  3:08           ` feature/icomplete-vertical jixiuf
2020-09-18 11:58             ` feature/icomplete-vertical Ergus
2020-09-18 17:05             ` feature/icomplete-vertical Ergus
2020-09-18 19:52               ` feature/icomplete-vertical Eli Zaretskii
2020-09-20 10:55   ` feature/icomplete-vertical João Távora
2020-09-20 13:04     ` feature/icomplete-vertical Ergus
2020-09-20 13:15       ` feature/icomplete-vertical Eli Zaretskii
2020-09-20 13:37         ` feature/icomplete-vertical Ergus
2020-09-20 14:07         ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-20 14:28           ` feature/icomplete-vertical Eli Zaretskii
2020-09-20 15:04             ` feature/icomplete-vertical Ergus
2020-09-20 15:54               ` feature/icomplete-vertical Eli Zaretskii
2020-09-20 16:13                 ` feature/icomplete-vertical Ergus
2020-09-20 17:09             ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-20 17:43               ` feature/icomplete-vertical Eli Zaretskii
2020-10-01 16:48                 ` feature/icomplete-vertical Ergus
2020-10-02  4:45                   ` feature/icomplete-vertical jixiuf
2020-10-03  2:13                     ` feature/icomplete-vertical Ergus
2020-10-04 23:47                   ` feature/icomplete-vertical João Távora
2020-10-05  4:48                     ` feature/icomplete-vertical Ergus
2020-10-05  9:06                       ` feature/icomplete-vertical João Távora
2020-10-05 12:23                         ` feature/icomplete-vertical Ergus
2020-10-05 12:28                           ` feature/icomplete-vertical João Távora
2020-10-05 12:52                             ` feature/icomplete-vertical Ergus
2020-10-05  5:45                     ` feature/icomplete-vertical Eli Zaretskii
2020-10-05  9:13                       ` feature/icomplete-vertical João Távora
2020-10-05  9:46                         ` feature/icomplete-vertical Eli Zaretskii
2020-10-05  9:57                           ` feature/icomplete-vertical João Távora
2020-10-05 10:11                             ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 10:52                               ` feature/icomplete-vertical João Távora
2020-10-05 11:00                                 ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 11:11                                   ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-10-05 11:33                                     ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 11:48                                       ` feature/icomplete-vertical João Távora
2020-10-05 17:59                                     ` feature/icomplete-vertical martin rudalics
2020-10-05 18:24                                       ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-10-05 11:24                                   ` João Távora [this message]
2020-10-05 11:45                                     ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 11:54                                       ` feature/icomplete-vertical João Távora
2020-10-05 12:05                                         ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 13:07                                           ` feature/icomplete-vertical João Távora
2020-10-05 13:25                                             ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 19:03                                               ` feature/icomplete-vertical João Távora
2020-10-05 19:12                                                 ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 19:19                                                   ` feature/icomplete-vertical João Távora
2020-10-05 19:30                                                     ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 19:36                                                       ` feature/icomplete-vertical João Távora
2020-10-05 11:02                                 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-10-05 11:32                                   ` feature/icomplete-vertical João Távora
2020-10-05 11:54                                     ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-10-05 11:58                                       ` feature/icomplete-vertical João Távora
2020-10-05 12:02                                         ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-10-05 12:07                                           ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 12:25                                             ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-10-05 12:33                                               ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 13:19                                                 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-10-05 13:44                                                   ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 19:14                                                     ` feature/icomplete-vertical João Távora
2020-10-05 19:24                                                       ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 19:32                                                         ` feature/icomplete-vertical João Távora
2020-10-06  6:16                                                           ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 19:44                                                         ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-10-05 19:49                                                           ` feature/icomplete-vertical João Távora
2020-10-06  6:20                                                           ` feature/icomplete-vertical Eli Zaretskii
2020-10-05 13:13                               ` feature/icomplete-vertical Stefan Monnier
2020-10-05  7:52                     ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-10-05  8:22                       ` feature/icomplete-vertical Manuel Uberti
2020-10-05  9:40                       ` feature/icomplete-vertical João Távora
2020-10-05 10:53                         ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-20 14:49           ` feature/icomplete-vertical Ergus
2020-09-20 15:46             ` feature/icomplete-vertical Eli Zaretskii
2020-09-18 21:39 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-18 23:27   ` feature/icomplete-vertical Stefan Monnier
2020-09-19  1:59   ` feature/icomplete-vertical Ergus
2020-09-19  4:03     ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-19  6:15       ` feature/icomplete-vertical Ergus
2020-09-19  8:35         ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-19 10:30           ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-19 11:19             ` feature/icomplete-vertical Ergus
2020-09-19 11:56               ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-19 12:57                 ` feature/icomplete-vertical Ergus
2020-09-19 11:43             ` feature/icomplete-vertical Ergus
2020-09-19 13:00               ` feature/icomplete-vertical Stefan Monnier
2020-09-19 13:42                 ` feature/icomplete-vertical Ergus
2020-09-19 15:35                   ` feature/icomplete-vertical Stefan Monnier
2020-09-19 13:59                 ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-19 14:43                   ` feature/icomplete-vertical Ergus
2020-09-19 15:37                   ` feature/icomplete-vertical Stefan Monnier
2020-09-19 15:49                     ` feature/icomplete-vertical Ergus
2020-09-19 16:01                       ` feature/icomplete-vertical Stefan Monnier
2020-09-19 16:05                         ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-19 16:15                           ` feature/icomplete-vertical Stefan Monnier
2020-09-19 16:19                             ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-19 16:58                               ` feature/icomplete-vertical Eli Zaretskii
2020-09-19 17:06                                 ` feature/icomplete-vertical Ergus
2020-09-19 17:21                                   ` feature/icomplete-vertical Eli Zaretskii
2020-09-19 20:47                                     ` feature/icomplete-vertical Ergus
2020-09-19 22:07                                       ` feature/icomplete-vertical Stefan Monnier
2020-09-20  5:31                                       ` feature/icomplete-vertical Eli Zaretskii
2020-09-20 10:47                                       ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-20 13:04                                         ` feature/icomplete-vertical Ergus
2020-09-19 21:40                                     ` feature/icomplete-vertical Dmitry Gutov
2020-09-20  5:45                                       ` feature/icomplete-vertical Eli Zaretskii
2020-09-19 15:55                     ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-19 10:47           ` feature/icomplete-vertical Ergus
2020-09-19 17:08           ` feature/icomplete-vertical Drew Adams
2020-09-20  0:28             ` feature/icomplete-vertical Gregory Heytings via Emacs development discussions.
2020-09-20  1:18               ` feature/icomplete-vertical Drew Adams
  -- strict thread matches above, loose matches on Subject: below --
2020-10-02  6:37 feature/icomplete-vertical Manuel Uberti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mu10gbjs.fsf@gmail.com \
    --to=joaotavora@gmail.com \
    --cc=casouri@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=ghe@sdf.org \
    --cc=juri@linkov.net \
    --cc=spacibba@aol.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).