bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#57727: 29.0.50; Optimize tty display updates


From: Gerd Möllmann
Subject: bug#57727: 29.0.50; Optimize tty display updates
Date: Sun, 18 Sep 2022 07:34:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin)

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

> What should tty--output-buffer-size do when called from a graphical
> terminal (i.e. when decode_tty_terminal returns NULL)?
>
> It currently crashes, but that's what every other C program is doing,
> very banal.  Maybe Emacs should do something more eccentric, like return
> 0 or -1, signal an error, or do my taxes as consolation.

Oops, it should signal.

> Just curious: given this is an internal "--" function, do we want to
> tell the user what a valid size would be?  E.g. along the lines of:
>
>   size_t sz = check_uinteger_max (size, min (MOST_POSITIVE_FIXNUM, SIZE_MAX));
>
> Or would that be too much?
>
> BTW, is there a known upper limit for the buffer size in the OS?

I didn't want to do that because I don't know how to determine SIZE_MAX,
so I let users do what the like, as long as it doesn't make Emacs crash
:-).

>
>> +  Fsuspend_tty(tty);
>> +  struct terminal *terminal = decode_tty_terminal (tty);
>
> Here, terminal should theoretically be non-NULL, as Fsuspend_tty would
> have otherwise signalled.  Maybe we should eassert this assumption, or
> explicitly check for NULL?

I don't think that's necessary, or in other words, I think eassert
wouldn't give as valuable addtional information here.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]