From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#62847: 29.0.90; Propertized space in Org Agenda's mode-name Date: Sat, 15 Apr 2023 15:15:12 +0200 Message-ID: <7C9FAA71-595D-47BD-B1DB-3256CF90CA63@acm.org> References: <87edollc2k.fsf@localhost> <83v8hxcw6k.fsf@gnu.org> <875y9xlayt.fsf@localhost> <83sfd1cuka.fsf@gnu.org> <873551l97f.fsf@localhost> <83h6thcr3k.fsf@gnu.org> <87jzyde5e3.fsf@localhost> <83cz45cqrw.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35864"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Ihor Radchenko , 62847@debbugs.gnu.org, Stefan Monnier , gusbrs.2016@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 15 15:16:19 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pnflJ-00098p-PJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Apr 2023 15:16:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pnfl6-00020h-Sm; Sat, 15 Apr 2023 09:16:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pnfl5-00020T-GH for bug-gnu-emacs@gnu.org; Sat, 15 Apr 2023 09:16:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pnfl5-00041B-8b for bug-gnu-emacs@gnu.org; Sat, 15 Apr 2023 09:16:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pnfl4-0008C3-Ge for bug-gnu-emacs@gnu.org; Sat, 15 Apr 2023 09:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Apr 2023 13:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62847 X-GNU-PR-Package: emacs Original-Received: via spool by 62847-submit@debbugs.gnu.org id=B62847.168156452631434 (code B ref 62847); Sat, 15 Apr 2023 13:16:02 +0000 Original-Received: (at 62847) by debbugs.gnu.org; 15 Apr 2023 13:15:26 +0000 Original-Received: from localhost ([127.0.0.1]:48525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnfkU-0008Av-2z for submit@debbugs.gnu.org; Sat, 15 Apr 2023 09:15:26 -0400 Original-Received: from mail1477c50.megamailservers.eu ([91.136.14.77]:46700 helo=mail118c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnfkR-0008AV-45 for 62847@debbugs.gnu.org; Sat, 15 Apr 2023 09:15:24 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1681564516; bh=psFvrbAh1nJ7FWdE9e3TtZLNF6mbEDvQtB4ijFwT1/w=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=pVEykMJLkhKAbhy7V0W+Is4X2Nu2jyzgsJbOF5fzrHQYg+7HL33pRotKqXo0sJMrf c2ML3LB/ukpoPqztkG2NKMiWTbu8svfd59bmsfgnYYOo1juI2u/uTLHzDNBT/gv2O4 iV9ncdyqr90z4rRf8/xWkYYn8CAnLQVfkoQAzcTQ= Feedback-ID: mattiase@acm.or Original-Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se [188.150.165.235]) (authenticated bits=0) by mail118c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 33FDFCH2087602; Sat, 15 Apr 2023 13:15:14 +0000 In-Reply-To: <83cz45cqrw.fsf@gnu.org> X-Mailer: Apple Mail (2.3654.120.0.1.15) X-VADE-SPAMSTATE: clean X-VADE-SPAMSCORE: -100 X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdelvddgheelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffquffvqffrkfetpdfqfgfvpdfgpfggqdevhedtnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpegtggfuhfgjffevgffkfhfvofesthhqmhdthhdtvdenucfhrhhomhepofgrthhtihgrshcugfhnghguvghgnohrugcuoehmrghtthhirghsvgesrggtmhdrohhrgheqnecuggftrfgrthhtvghrnhepudffveehlefhffdtieevgeekuddtgfduvefhteekgfeifeffgfegtdfgkeejvdefnecuffhomhgrihhnpegvgihplhhitghithhlhidrohhrghenucfkphepudekkedrudehtddrudeihedrvdefheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedukeekrdduhedtrdduieehrddvfeehpdhhvghlohepshhmthhptghlihgvnhhtrdgrphhplhgvpdhmrghilhhfrhhomhepmhgrthhtihgrshgvsegrtghmrdhorhhgpdhnsggprhgtphhtthhopeehpdhrtghpthhtohepvghlihiisehgnhhurdhorhhgpdhrtghpthhtohephigrnh htrghrledvsehpohhsthgvohdrnhgvthdprhgtphhtthhopehmohhnnhhivghrsehirhhordhumhhonhhtrhgvrghlrdgtrgdp X-Origin-Country: SE X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:260051 Archived-At: 15 apr. 2023 kl. 13.45 skrev Eli Zaretskii : >>> So maybe replace " " with (copy-sequence " "). >>=20 >> But that should not be necessary, right? Ideally not -- setting properties on literal strings should indeed be = avoided for a variety of reasons, one being that the byte compiler = shares equal string literals: (defun ff () (list "abc" (let ((s "abc")) (put-text-property 0 3 'aa 'bb s) s))) (ff) -> ("abc" #("abc" 0 3 (aa bb))) ; interpreted -> (#("abc" 0 3 (aa bb)) #("abc" 0 3 (aa bb))) ; byte-compiled `org-agenda-set-mode-name` uses the literal " " twice so if either is = modified the other will appear to be, too. Where this setting of = properties is done I have no idea There is currently no automatic sharing of string literals between = byte-code functions but this may change, and I've no idea what the = native compiler is up to in this respect. `propertize` is safe because it makes a copy of its string argument, so = there shouldn't be any reason to copy that argument explicitly. `org-add-props` calls `add-text-properties` and is clearly destructive. Interpreted code is less affected by the problem because literals aren't = shared throughout a function, but trouble can still occur: (defun hh (x) (let ((s "abc")) (when x (put-text-property 0 3 'aa 'bb s)) s)) (hh nil) -> "abc" (hh t) -> #("abc" 0 3 (aa bb)) (hh nil) -> #("abc" 0 3 (aa bb)) ...