From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Tick Reduction Date: Tue, 23 Nov 2021 11:15:07 +0100 Message-ID: <87k0gzyy8k.fsf@gnus.org> References: <87bl2hyzca.fsf@gnus.org> <87sfvpmtl8.fsf@gnus.org> <83pmqtqvj5.fsf@gnu.org> <87bl2dmnfa.fsf@gnus.org> <83mtlxquh7.fsf@gnu.org> <877dd1mlsd.fsf@gnus.org> <83k0h1qss5.fsf@gnu.org> <8735npmkm5.fsf@gnus.org> <83h7c5qpag.fsf@gnu.org> <87czmtl2uv.fsf@gnus.org> <83fsrpqog1.fsf@gnu.org> <87wnl1jnfa.fsf@gnus.org> <83czmtqnl7.fsf@gnu.org> <87h7c5jmbg.fsf@gnus.org> <838rxhqmqv.fsf@gnu.org> <878rxhjlot.fsf@gnus.org> <874k85jlmq.fsf@gnus.org> <87v90khaa8.fsf@gnus.org> <83zgpwp7v2.fsf@gnu.org> <87tug4fdn7.fsf@gnus.org> <83pmqsp0m7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10831"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org, stefankangas@gmail.com, dgutov@yandex.ru To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 23 11:16:52 2021 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 1mpSr5-0002bQ-TO for ged-emacs-devel@m.gmane-mx.org; Tue, 23 Nov 2021 11:16:51 +0100 Original-Received: from localhost ([::1]:48982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpSr3-0005y8-Of for ged-emacs-devel@m.gmane-mx.org; Tue, 23 Nov 2021 05:16:49 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpSpg-0004WR-Pb for emacs-devel@gnu.org; Tue, 23 Nov 2021 05:15:24 -0500 Original-Received: from [2a01:4f9:2b:f0f::2] (port=34686 helo=quimby.gnus.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpSpc-0006iH-9x; Tue, 23 Nov 2021 05:15:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=UwtNPvydvW/BsE0ffA2VcxaiwUuVMpZZPW08mx0cV1Y=; b=ofpoTY8ZhKu+GpY5vVqiY5XHvL 4sMFYYQcnIH6Qz6L6MjAa9YyFhZ+NOPXxue3z7d9ihIHfnyPAj6KJuEFsa/p+4anUG90czGbT/4UV SnYp2ekH8m5BWSUDysJ6S+OfGxjsyFpmPLrNI36oDEEPJ3rWPhIT2srssuyvON+RB8Ic=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mpSpV-00078y-9D; Tue, 23 Nov 2021 11:15:16 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAAAXNSR0IArs4c6QAAAAlQTFRF LCkqy8fG////GdDKrAAAAAFiS0dEAmYLfGQAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfl CxcKBTaPGZqsAAAAWklEQVQoz63RSwqAMAwE0CnoDdr7xIX7BjL3v4pShIw7S53dI1nkA6yncMRm 4fTEwfIg7h5TIFGRaCaoSBCC2ARdK/YzKBOcDDRZuytiGbte9AVXzL/kA9ZyAS4GO9+aijnyAAAA WmVYSWZNTQAqAAAACAAFARIAAwAAAAEAAQAAARoABQAAAAEAAABKARsABQAAAAEAAABSASgAAwAA AAEAAgAAAhMAAwAAAAEAAQAAAAAAAAAAAEgAAAABAAAASAAAAAEfUvc0AAAAJXRFWHRkYXRlOmNy ZWF0ZQAyMDIxLTExLTIzVDEwOjA1OjU0KzAwOjAwk0ydXAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAy MS0xMS0yM1QxMDowNTo1NCswMDowMOIRJeAAAAAXdEVYdGV4aWY6WUNiQ3JQb3NpdGlvbmluZwAx rA+AYwAAADh0RVh0aWNjOmNvcHlyaWdodABDb3B5cmlnaHQgKGMpIDE5OTggSGV3bGV0dC1QYWNr YXJkIENvbXBhbnn5V3k3AAAAIXRFWHRpY2M6ZGVzY3JpcHRpb24Ac1JHQiBJRUM2MTk2Ni0yLjFX rdpHAAAAJnRFWHRpY2M6bWFudWZhY3R1cmVyAElFQyBodHRwOi8vd3d3LmllYy5jaBx/AEwAAAA3 dEVYdGljYzptb2RlbABJRUMgNjE5NjYtMi4xIERlZmF1bHQgUkdCIGNvbG91ciBzcGFjZSAtIHNS R0JEU0ipAAAAAElFTkSuQmCC X-Now-Playing: Irreversible Entanglements's _Open The Gates_: =?utf-8?Q?=22L=C3=A1grimas?= Del Mar" In-Reply-To: <83pmqsp0m7.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 22 Nov 2021 19:21:36 +0200") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a01:4f9:2b:f0f::2 (failed) Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 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, RCVD_IN_DNSWL_MED=-2.3, RDNS_NONE=0.793, 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.29 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:279942 Archived-At: Eli Zaretskii writes: > For starters, here's a thought: why not make this feature a variant of > the 'display' property, rather than inventing a new kind of property? > We already have similar variants of 'display': (height HEIGHT) and > (raise FACTOR), and this one sounds similar enough. Sure, that makes sense. (Perhaps we should add a convenience function a la `add-face-text-property', but for `display', because `min-width' is something you'd typically want to slap on arbitrary things, like a text that contains a small image mixed in with letters.) > In short: the processing of 'display' properties is already well > integrated into the overall design of the display engine, so adding > there one more variety should be relatively easy. Sounds good; I'll have a try at implementing it that way (but probably not today). > And one other important thing: never call append_FOO_glyph directly. > Instead, call produce_FOO_glyph. That's because produce_FOO_glyph > already takes care of many things that you otherwise will have to do > manually (and make mistakes). For example, this: > >> +static enum prop_handled >> +handle_min_width_prop (struct it *it) >> +{ >> + if (STRINGP (it->string) || !it->glyph_row) >> + return HANDLED_NORMALLY; > > is unacceptable: when it->glyph_row is NULL, it usually means we are > emulating redisplay without producing glyphs, but the data in 'it' > still needs to be maintained as if we did, because otherwise stuff > like vertical-motion and its callers will stop working. You will see > in produce_stretch_glyph that it does get this case correctly. Ah, I see. Thanks for the tips. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no