From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Tick Reduction Date: Wed, 24 Nov 2021 16:20:35 +0200 Message-ID: <83sfvl8wjw.fsf@gnu.org> References: <87bl2hyzca.fsf@gnus.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> <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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16325"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, stefankangas@gmail.com, dgutov@yandex.ru To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 24 15:21:50 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 1mpt9h-000446-Af for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Nov 2021 15:21:49 +0100 Original-Received: from localhost ([::1]:42262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpt9g-0005v1-6j for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Nov 2021 09:21:48 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpt8W-0004cA-Ru for emacs-devel@gnu.org; Wed, 24 Nov 2021 09:20:36 -0500 Original-Received: from [2001:470:142:3::e] (port=59868 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpt8W-00050L-ES; Wed, 24 Nov 2021 09:20:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=G32aURPxMEyVEfyAcARQm3xZUwTyi05YFkyrcQwSj/c=; b=AFR5NR+YZNdW MUrwcZCqytpQhsWS/a47opIntTiaabSDisSrZELl7+HuapyKbdOI6qksMy+Dmh1MjOo/rfAg1JW0w hXd9li5XMtpx4tHO57h3w4A1VZMEAL69sTc8rLhk5raP8QMx6Ufjh3RBFJ6CQ52Q9AHsHntmt8An5 kDwigFRbPkTAJxrJa7SLuL7vs/DCsNVFQAdpQarhzM6tU4Ax2KEmuK9y8EjeL2Pbw0dtq/sRbwUpM lrrT4vcJNLHp3tgYbf7q45n22kcMfDWN8zST0QTpgJTACMu1Viu0o8bru4SPFJp4ikolpdsT/I5s3 27WHpDOzHhcDLFN/y6FlJA==; Original-Received: from [87.69.77.57] (port=3898 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpt8W-0005C2-49; Wed, 24 Nov 2021 09:20:36 -0500 In-Reply-To: <874k81vmlf.fsf@gnus.org> (message from Lars Ingebrigtsen on Wed, 24 Nov 2021 12:07:08 +0100) 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:280000 Archived-At: > From: Lars Ingebrigtsen > Cc: dgutov@yandex.ru, stefankangas@gmail.com, emacs-devel@gnu.org > Date: Wed, 24 Nov 2021 12:07:08 +0100 > > I've now pushed the new min-width thing, but there's things here that > could be tweaked. > > Basically, you can now say > > (insert "|" (propertize "foo" 'display '(min-width (8.0)) 'face 'match) "|") > > and then this will occupy eight normal character widths: Thanks. A couple of comments/questions: Is it possible to use an integer value instead of a float, and if so, what is the semantics of that? > 1) Should the stretch have been inserted "before the foo ended", i.e., > with that face extending to the end of the range? You are saying that the stretch doesn't use the same face as the characters "covered" by this property? If so, why not use the same face ID? If that's not what you are saying, then what are you saying? > 2) To identify a range, we need an identity You are saying "a range", here and in the documentation you installed, but you never explain what that means in this context. Can you explain what you mean by that, and why do you need to identify that range? And finally, I don't understand this recent addition: /* When called form display_string (i.e., the mode line), we're being called with a string as the object, and we may be called with many sub-strings belonging to the same :propertize run. */ if ((bufpos == 0 && !EQ (it->min_width_property, get_display_property (0, Qmin_width, object))) /* In a buffer -- check that we're really right after the sequence of characters covered by this `min-width'. */ || (bufpos > BEGV && EQ (it->min_width_property, get_display_property (bufpos - 1, Qmin_width, object)))) To support a Lisp string as OBJECT, you need first to test for that: if (STRINGP (object)) .... Then, if it _is_ a string, I don't understand the test for bufpos == 0 vs bufpos > BEGV in the case of a buffer, and I also don't understand the reverse condition of the property equality. Can you explain what is going on here and why?