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: Wed, 24 Nov 2021 18:50:45 +0100 Message-ID: <8735nlwih6.fsf@gnus.org> References: <87bl2hyzca.fsf@gnus.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> <87k0gzyy8k.fsf@gnus.org> <835ysjoupv.fsf@gnu.org> <8735nnyob1.fsf@gnus.org> <83y25fneeh.fsf@gnu.org> <87pmqrx7rh.fsf@gnus.org> <83tug3ndaj.fsf@gnu.org> <874k81vmlf.fsf@gnus.org> <83sfvl8wjw.fsf@gnu.org> <87o869y0v2.fsf@gnus.org> <83fsrl8owz.fsf@gnu.org> <87o869wkcx.fsf@gnus.org> <83bl298n9b.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="19691"; 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 Wed Nov 24 18:51:55 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 1mpwR1-0004qu-8M for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Nov 2021 18:51:55 +0100 Original-Received: from localhost ([::1]:52694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpwQz-0004B0-4A for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Nov 2021 12:51:53 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38242) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpwQE-000357-4J for emacs-devel@gnu.org; Wed, 24 Nov 2021 12:51:06 -0500 Original-Received: from [2a01:4f9:2b:f0f::2] (port=49288 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 1mpwQ6-000128-AG; Wed, 24 Nov 2021 12:51:05 -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=2Crr8qwAnH80N0juYgFEAY7u215hoSjSlX9qJ0Vigns=; b=Kn/fiOJtXmA/J7S9tKvVjquYsw 1CFbGoezUxX73Bbaal/V3IHm60KGD1fbiNsOZ5camBhKyUGs0oF6QJqtdmrF1kzoNptq/bq0vTYVn BGAzIn0uTozBh5gs7/yKxPdSdlmWeHXef7kSeh/BewZFohL48Zx6dgGBsglIVrZn7WLc=; 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 1mpwPx-00048h-6P; Wed, 24 Nov 2021 18:50:52 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEXJyMayr7OWlKBX V2P28xr///9HRQ2EAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+ULGA8LEwQ2sdgAAAG0SURBVDjLrZPr deQwCIWFtwHADRipgYzoYE/6r2kvV35McpJ/y5mxZX1CvFu7RMXMVM+vrb2JgJrhKVbrc88oahJc eN1B5H12SuI/C0isS2szYsFOUCqqVhRXrCvdsYsteCMqTeyUEKfReqjIZR+u2dZON8q9S0HpFZey vt6EQCsi+w5g25AOpdqjWBpCh+Xe1cqDNw/4yR9UgmoVz51E7AB5WHgxebIrfuCh1geve0v7HqUX e97ZvVSYLSGAPj/krVp7hsDJpx4MHu/McD+vKtfX22A7P+qUPxYq9CZb5utLH+hKraK0syokzRY5 Tq25ZyrbZx3c4mynHJnHA2yfKvQgIVPuQtmKl2HMnMjyfmugA2ox8gBoMp6Oseoqz/zY42iSdCWu giK8MbeM9ie/1Xpkz8gJmzeIar8OlyrEGASXEQ+HQskFgl1A7gR9zGZ3w+JAh3WCPphitADOR8cb YNSgDLaBEZh3wJzj5QSqZyRRg2P5Gq/uAOw7GudIGXKFeQKgM6UgNWHlVa+ACtTi0uBwcvVMMpLo lcX+qnT66o2ouULgYGNN7d4+f5a/v4HP/wj+AQY+Z1k/V1ZPAAAAJXRFWHRkYXRlOmNyZWF0ZQAy MDIxLTExLTI0VDE1OjExOjE5KzAwOjAwXmLGugAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0xMS0y NFQxNToxMToxOSswMDowMC8/fgYAAAAASUVORK5CYII= X-Now-Playing: DJ Rupture's _Curiosity Slowdown_: "Curiosity Slowdown (part 3)" In-Reply-To: <83bl298n9b.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 24 Nov 2021 19:41:20 +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: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=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:280033 Archived-At: Eli Zaretskii writes: > There's the display_prop_end function we normally use for that. I don't quite understand. If I have a max-width going from 5 to 15, and a height going from 10 to 12, I think this function is going to be called at 5, 10, 12 and 15? I need to know that this consecutive series of characters ends at 15. It's the same issue when called from display_string -- the mode line machinery will call the function several times, even if the :propertize is around all the specs. > I guessed that much, but again: if you just want to test that you are > called from display_string, the test STRINGP (object) should be > enough. Ah, I see. > And I'm confused by the fact that for buffers you test > > if (bufpos > BEGV && EQ (FOO, BAR)) > > whereas for a string you test > > if (bufpos == 0 && !EQ (FOO, BAR)) The bufpos == 0 is just testing that we're being called from the mode line (where it's always 0). > The equivalent of BEGV in strings is zero, so I'd expect > > if (bufpos > 0 > > and also why is the first case tests equality, whereas the second one > tests INequality? Looks correct to me -- one is testing the start of the range and one is testing whether we're at the end. > IOW, the issue here AFAIU is that you might be called to display > buffer text with this property or to display a Lisp string with this > property, so the tests should be equivalent, and the only difference > between strings and buffers is that text starts at BEGV in buffers but > at zero in strings. So why there are more differences that that? > What am I missing? Like I said, there's no strings -- only buffers and mode lines. I.e., this doesn't work: (string-pixel-width (propertize "foo" 'display '(min-width (1000)))) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no