From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: rmsbolt.el [Was: Colorful line numbers] Date: Sat, 23 Jul 2022 10:35:07 +0100 Message-ID: <87pmhwmat0.fsf@gmail.com> References: <87leslpow2.fsf@gmail.com> <83ilnpl8e0.fsf@gnu.org> <874jz9peq0.fsf@gmail.com> <837d45l6ge.fsf@gnu.org> <87zgh1nyo6.fsf@gmail.com> <831qudl1k3.fsf@gnu.org> <87v8rpntiv.fsf@gmail.com> <83sfmtjjy8.fsf@gnu.org> <87fsitnpxd.fsf@gmail.com> <83k085jgxr.fsf@gnu.org> <835yjojr0f.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19804"; 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 To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 23 11:35:19 2022 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 1oFBXa-0004zt-SR for ged-emacs-devel@m.gmane-mx.org; Sat, 23 Jul 2022 11:35:18 +0200 Original-Received: from localhost ([::1]:43634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFBXZ-0000Fh-FH for ged-emacs-devel@m.gmane-mx.org; Sat, 23 Jul 2022 05:35:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51780) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFBWH-0007zB-MC for emacs-devel@gnu.org; Sat, 23 Jul 2022 05:33:57 -0400 Original-Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:36490) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFBWF-00039S-SH; Sat, 23 Jul 2022 05:33:57 -0400 Original-Received: by mail-wr1-x436.google.com with SMTP id g2so1375821wru.3; Sat, 23 Jul 2022 02:33:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :user-agent:mime-version:content-transfer-encoding; bh=zOv1WiqurcJ0bzHZ3/cEqJXdKFWRpcAvT7/hcKJeIyM=; b=El5bs+QPZOYgvmFya4aYIRIYNUOt0wXp79FFqa7/6DQdZORXmm2W6mj5BbDiV5RZYW QAu2/K7NKZLIbiFKaaGtNJRJbuLZhV3QqsF8IAviaDpgs67AWkru4CaEVTB28pn094AP K2CosIaxCoLZ8zPMhNvirHKlpJKVy2nl40ioSK2M6blXdwpOFBQTHE9xpwASfo/KUlvn 2V93BltoI2My10mKvVVyLOWVBC+iQYjOU9z+4MiE269X00shlSgCnE0mAEnhP6jV/0NG b44BhL7QfcJiStu2Zes0Lbc+2cR9Mrauec4NirsLiTT50wgCnDOF38riTl6DGuyhJzQc W/IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:user-agent:mime-version:content-transfer-encoding; bh=zOv1WiqurcJ0bzHZ3/cEqJXdKFWRpcAvT7/hcKJeIyM=; b=Rd/PPUMQq+t5OUWMS2A9UAYgxvnxyJYuG8a2mYGX12KOXvwa7EsbZhhLtA9tvfu6d/ 2zU3l7n4I73LBnMaoGQl3ef1V30eHsndqZuERzeYOzPmkBA1tgaiZzb4C1qfR7eRhjtp 79yCa95hWB4mADawgclXrJvANPdqguFxlF5L/fjUNoGECVSlHY46Vn1RJPq6MEVydMA4 /PIHUvxSQGfWUa+wP0LhRxO4epw5cCyFzHd1+k4FLeURO0Y6lDTskJRvaM6leD3kyLPI N25uKYKcFKf/wgviLLD3y6hLocEtE1UivX9jFcz2Em86ec3mb6NXSoDCsnSJ3G5OVxRC cMRg== X-Gm-Message-State: AJIora/qUvdeWtnIwUkdSz47ctzKxQqo3mRRJU0ePRsDb45JhBnAHEup Y7Oz4iNGn8pRi4zBnz4/k/o7FEWmd+8= X-Google-Smtp-Source: AGRyM1vlIxhyiI8kaKlY4y6tIEsu3fYr6v2JIy1nTtch8VOcl5E/0Zruk5mMSbIqYq+qFsoY5MZ7CA== X-Received: by 2002:a5d:59a6:0:b0:21d:bc0b:d762 with SMTP id p6-20020a5d59a6000000b0021dbc0bd762mr2335507wrr.637.1658568832979; Sat, 23 Jul 2022 02:33:52 -0700 (PDT) Original-Received: from krug ([62.28.191.198]) by smtp.gmail.com with ESMTPSA id n7-20020a056000170700b0021d221daccfsm6406979wrc.78.2022.07.23.02.33.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Jul 2022 02:33:52 -0700 (PDT) In-Reply-To: <835yjojr0f.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 23 Jul 2022 09:13:20 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=joaotavora@gmail.com; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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:292513 Archived-At: Eli Zaretskii writes: >> Aaanyway, I think I'm happy with the current implementation that _doesn'= t_=20 >> use line numbers at all. I think this discussion has been productive (to= some >> degree). If I ever need this again (or someone else, like Dmitry), I'll= be sure >> to ping here again.=20 > > OK. Let me just say, for the future, that basing this on text > properties is IMO not the best idea. I think a better idea is to have > some buffer-local (or window-local) variable whose value is an > appropriate data structure that specifies faces for ranges of line > numbers. Of course that value will need to be updated at suitable > times, which in itself is not a trivial task. OK. Since we're in speculation territory, I don't see a big difference between that and using text properties, which are also a buffer-local structure. Looking up the line we're iterating in that hypothetical Lisp structure would seem to amount to about the same work as looking for a particulr text property in a known place of that same line. But without the complexity of a new data structure. But I'd have to see the proposed API and benchmark the two solutions to make sure. Jo=C3=A3o