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: Sun, 16 Apr 2023 16:53:54 +0200 Message-ID: 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> <7C9FAA71-595D-47BD-B1DB-3256CF90CA63@acm.org> <87mt38t69l.fsf@localhost> <191D1749-C594-498C-B498-2C1770BBF413@acm.org> <9F74A07C-5B48-448F-B284-17FD05E7AC94@acm.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_C4628742-612B-4E5F-9EB0-57D24C107458" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25929"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gusbrs.2016@gmail.com, Ihor Radchenko , 62847@debbugs.gnu.org, Eli Zaretskii , Stefan Monnier To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 16 16:55:23 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 1po3ml-0006XV-Er for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 16 Apr 2023 16:55:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1po3mT-0004hA-PB; Sun, 16 Apr 2023 10:55:05 -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 1po3mQ-0004gw-PK for bug-gnu-emacs@gnu.org; Sun, 16 Apr 2023 10:55: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 1po3mQ-0008S9-Cw for bug-gnu-emacs@gnu.org; Sun, 16 Apr 2023 10:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1po3mQ-0005OI-90 for bug-gnu-emacs@gnu.org; Sun, 16 Apr 2023 10:55: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: Sun, 16 Apr 2023 14:55: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.168165685620416 (code B ref 62847); Sun, 16 Apr 2023 14:55:02 +0000 Original-Received: (at 62847) by debbugs.gnu.org; 16 Apr 2023 14:54:16 +0000 Original-Received: from localhost ([127.0.0.1]:52302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1po3lf-0005JC-L9 for submit@debbugs.gnu.org; Sun, 16 Apr 2023 10:54:15 -0400 Original-Received: from mail200c50.megamailservers.eu ([91.136.10.210]:48048 helo=mail193c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1po3lc-0005Ik-8I for 62847@debbugs.gnu.org; Sun, 16 Apr 2023 10:54:13 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1681656837; bh=YGKd5DpbhhP/cnEx860Y02H+P6ewOeVWxsPDI2TKy7U=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=n73ipCBlt+wsu0ppbJbWSvYXFTx/FTokhiWA2YzcVFOEyniZvPrPP0aje5eud695q 5+OVs+LEEvCei4jSklas6ObWDNwQe6CWaoM7PuxWXZIueYB9QjF153OfE9LusWCRWk LYcOL6+ywJ0I0MOuAWK/X5MgRft/rZ8AHVn4gGVg= 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 mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 33GErs9p048762; Sun, 16 Apr 2023 14:53:56 +0000 In-Reply-To: <9F74A07C-5B48-448F-B284-17FD05E7AC94@acm.org> X-Mailer: Apple Mail (2.3654.120.0.1.15) X-VADE-SPAMSTATE: clean X-VADE-SPAMSCORE: -85 X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdelgedgfeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffquffvqffrkfetpdfqfgfvpdfgpfggqdevhedtnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenogetfedtuddqtdduucdludehmdenucfjughrpefhkfgtggfuffgjvefvfhfosehmtdhmrehhtddvnecuhfhrohhmpeforghtthhirghsucfgnhhguggvghonrhguuceomhgrthhtihgrshgvsegrtghmrdhorhhgqeenucggtffrrghtthgvrhhnpeeiuddvteeuteduleegueektdeguddvgeefteejkedvhedtlefhvdfgheeigeeuheenucfkphepudekkedrudehtddrudeihedrvdefheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedukeekrdduhedtrdduieehrddvfeehpdhhvghlohepshhmthhptghlihgvnhhtrdgrphhplhgvpdhmrghilhhfrhhomhepmhgrthhtihgrshgvsegrtghmrdhorhhgpdhnsggprhgtphhtthhopeeipdhrtghpthhtohepmhgrthhtihgrshgvsegrtghmrdhorhhgpdhrtghpthhtohephigrnhhtrghrledvse hpohhsthgvohdrnhgvthdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrghdprhgtphhtthhopehmohhnnhhivghrsehirhho 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:260133 Archived-At: --Apple-Mail=_C4628742-612B-4E5F-9EB0-57D24C107458 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > Here's a patch And here's one that I actually attached. Sorry! --Apple-Mail=_C4628742-612B-4E5F-9EB0-57D24C107458 Content-Disposition: attachment; filename=string-literal-prop-change.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="string-literal-prop-change.diff" Content-Transfer-Encoding: quoted-printable diff=20--git=20a/src/alloc.c=20b/src/alloc.c=0Aindex=20= d09fc41dec6..616b4fa7a66=20100644=0A---=20a/src/alloc.c=0A+++=20= b/src/alloc.c=0A@@=20-2606,6=20+2606,9=20@@=20= make_clear_multibyte_string=20(EMACS_INT=20nchars,=20EMACS_INT=20nbytes,=20= bool=20clearit)=0A=20=0A=20=20=20s=20=3D=20allocate_string=20();=0A=20=20= =20s->u.s.intervals=20=3D=20NULL;=0A+#ifdef=20CHECK_STRING_LITERALS=0A+=20= =20s->u.s.literal=20=3D=20false;=0A+#endif=0A=20=20=20= allocate_string_data=20(s,=20nchars,=20nbytes,=20clearit,=20false);=0A=20= =20=20XSETSTRING=20(string,=20s);=0A=20=20=20string_chars_consed=20+=3D=20= nbytes;=0Adiff=20--git=20a/src/lisp.h=20b/src/lisp.h=0Aindex=20= 4e17e369312..30c0a001c34=20100644=0A---=20a/src/lisp.h=0A+++=20= b/src/lisp.h=0A@@=20-1560,6=20+1560,8=20@@=20CDR_SAFE=20(Lisp_Object=20= c)=0A=20=20=20return=20CONSP=20(c)=20?=20XCDR=20(c)=20:=20Qnil;=0A=20}=0A= =20=0A+#define=20CHECK_STRING_LITERALS=201=0A+=0A=20/*=20In=20a=20string=20= or=20vector,=20the=20sign=20bit=20of=20u.s.size=20is=20the=20gc=20mark=20= bit.=20=20*/=0A=20=0A=20struct=20Lisp_String=0A@@=20-1579,6=20+1581,10=20= @@=20CDR_SAFE=20(Lisp_Object=20c)=0A=20=0A=20=20=20=20=20=20=20INTERVAL=20= intervals;=09/*=20Text=20properties=20in=20this=20string.=20=20*/=0A=20=20= =20=20=20=20=20unsigned=20char=20*data;=0A+#ifdef=20= CHECK_STRING_LITERALS=0A+=20=20=20=20=20=20/*=20Whether=20this=20string=20= originated=20as=20a=20string=20literal=20in=20Lisp=20code.=20=20*/=0A+=20= =20=20=20=20=20bool=20literal;=0A+#endif=0A=20=20=20=20=20}=20s;=0A=20=20= =20=20=20struct=20Lisp_String=20*next;=0A=20=20=20=20=20= GCALIGNED_UNION_MEMBER=0Adiff=20--git=20a/src/lread.c=20b/src/lread.c=0A= index=20273120315df..23d8a1489c1=20100644=0A---=20a/src/lread.c=0A+++=20= b/src/lread.c=0A@@=20-1411,6=20+1411,10=20@@=20DEFUN=20("load",=20Fload,=20= Sload,=201,=205,=200,=0A=20=20=20specbind=20= (Qlread_unescaped_character_literals,=20Qnil);=0A=20=20=20= record_unwind_protect=20(load_warn_unescaped_character_literals,=20= file);=0A=20=0A+#ifdef=20CHECK_STRING_LITERALS=0A+=20=20specbind=20= (Qlread_unescaped_character_literals,=20Qnil);=0A+#endif=0A+=0A=20=20=20= bool=20is_elc=20=3D=20suffix_p=20(found,=20".elc");=0A=20=20=20if=20= (is_elc=0A=20=20=20=20=20=20=20/*=20version=20=3D=201=20means=20the=20= file=20is=20empty,=20in=20which=20case=20we=20can=0A@@=20-2230,6=20= +2234,10=20@@=20readevalloop=20(Lisp_Object=20readcharfun,=0A=20=09=20=20= =20=20=20?=20Qnil=20:=20list1=20(Qt)));=0A=20=20=20specbind=20= (Qmacroexp__dynvars,=20Vmacroexp__dynvars);=0A=20=0A+#ifdef=20= CHECK_STRING_LITERALS=0A+=20=20specbind=20(Qread_string_literals,=20Qt);=0A= +#endif=0A+=0A=20=20=20/*=20Ensure=20sourcename=20is=20absolute,=20= except=20whilst=20preloading.=20=20*/=0A=20=20=20if=20(!will_dump_p=20()=0A= =20=20=20=20=20=20=20&&=20!NILP=20(sourcename)=20&&=20!NILP=20= (Ffile_name_absolute_p=20(sourcename)))=0A@@=20-3163,6=20+3171,10=20@@=20= read_string_literal=20(Lisp_Object=20readcharfun)=0A=20=20=20Lisp_Object=20= obj=20=3D=20make_specified_string=20(read_buffer,=20nchars,=20p=20-=20= read_buffer,=0A=20=09=09=09=09=09=20=20=20(force_multibyte=0A=20=09=09=09= =09=09=20=20=20=20||=20(p=20-=20read_buffer=20!=3D=20nchars)));=0A= +#ifdef=20CHECK_STRING_LITERALS=0A+=20=20if=20(!NILP=20= (Vread_string_literals))=0A+=20=20=20=20XSTRING=20(obj)->u.s.literal=20=3D= =20true;=0A+#endif=0A=20=20=20return=20unbind_to=20(count,=20obj);=0A=20= }=0A=20=0A@@=20-3363,7=20+3375,14=20@@=20string_props_from_rev_list=20= (Lisp_Object=20elems,=20Lisp_Object=20readcharfun)=0A=20=09= invalid_syntax=20("Invalid=20string=20property=20list",=20readcharfun);=0A= =20=20=20=20=20=20=20Lisp_Object=20plist=20=3D=20XCAR=20(tl);=0A=20=20=20= =20=20=20=20tl=20=3D=20XCDR=20(tl);=0A+#ifdef=20CHECK_STRING_LITERALS=0A= +=20=20=20=20=20=20bool=20lit=20=3D=20XSTRING=20(obj)->u.s.literal;=0A+=20= =20=20=20=20=20XSTRING=20(obj)->u.s.literal=20=3D=20false;=0A+#endif=0A=20= =20=20=20=20=20=20Fset_text_properties=20(beg,=20end,=20plist,=20obj);=0A= +#ifdef=20CHECK_STRING_LITERALS=0A+=20=20=20=20=20=20XSTRING=20= (obj)->u.s.literal=20=3D=20lit;=0A+#endif=0A=20=20=20=20=20}=0A=20=20=20= return=20obj;=0A=20}=0A@@=20-5452,6=20+5471,21=20@@=20syms_of_lread=20= (void)=0A=20=09=20=20=20=20=20=20=20doc:=20/*=20Non-nil=20means=20read=20= recursive=20structures=20using=20#N=3D=20and=20#N#=20syntax.=20=20*/);=0A= =20=20=20Vread_circle=20=3D=20Qt;=0A=20=0A+#ifdef=20= CHECK_STRING_LITERALS=0A+=20=20DEFVAR_LISP=20("read-string-literals",=20= Vread_string_literals,=0A+=09=20=20=20=20=20=20=20doc:=20/*=20Non-nil=20= means=20read=20string=20literals=20as=20literals.=20=20*/);=0A+=20=20= Vread_string_literals=20=3D=20Qnil;=0A+=20=20DEFSYM=20= (Qread_string_literals,=20"read-string-literals");=0A+=20=20DEFVAR_LISP=20= ("string-literal-property-change",=0A+=09=20=20=20=20=20=20=20= Vstring_literal_property_change,=0A+=09=20=20=20=20=20=20=20doc:=20/*=20= How=20to=20handle=20changes=20to=20properties=20in=20literal=20strings.=0A= +If=20`error',=20raise=20an=20error.=0A+If=20`warn',=20emit=20a=20= warning.=0A+If=20`nil',=20do=20nothing.=20=20*/);=0A+=20=20= Vstring_literal_property_change=20=3D=20Qerror;=0A+=20=20DEFSYM=20= (Qwarn,=20"warn");=0A+#endif=0A+=0A=20=20=20DEFVAR_LISP=20("load-path",=20= Vload_path,=0A=20=09=20=20=20=20=20=20=20doc:=20/*=20List=20of=20= directories=20to=20search=20for=20files=20to=20load.=0A=20Each=20element=20= is=20a=20string=20(directory=20file=20name)=20or=20nil=20(meaning=0Adiff=20= --git=20a/src/textprop.c=20b/src/textprop.c=0Aindex=20= f88fff19c59..2a57262ec67=20100644=0A---=20a/src/textprop.c=0A+++=20= b/src/textprop.c=0A@@=20-1164,6=20+1164,36=20@@=20DEFUN=20= ("previous-single-property-change",=20Fprevious_single_property_change,=0A= =20=20=20=20=20return=20make_fixnum=20(previous->position=20+=20LENGTH=20= (previous));=0A=20}=0A=20=0C=0A+=0A+#ifdef=20CHECK_STRING_LITERALS=0A= +__attribute__((noinline))=20void=0A+string_literal_prop_change=20= (Lisp_Object=20object);=0A+=0A+__attribute__((noinline))=20void=0A= +string_literal_prop_change=20(Lisp_Object=20object)=0A+{=0A+=20=20= Lisp_Object=20how=20=3D=20Vstring_literal_property_change;=0A+=20=20if=20= (EQ=20(how,=20Qerror))=0A+=20=20=20=20error=20("Attempt=20to=20modify=20= properties=20of=20literal=20string=20\"%s\"",=0A+=09=20=20=20SSDATA=20= (object));=0A+=20=20else=20if=20(EQ=20(how,=20Qwarn))=0A+=20=20=20=20= call2=20(intern=20("warn"),=0A+=09=20=20=20build_string=0A+=09=20=20=20= ("Attempt=20to=20modify=20properties=20of=20literal=20string=20%S"),=0A+=09= =20=20=20object);=0A+}=0A+#endif=0A+=0A+static=20void=0A= +check_string_literal_prop_change=20(Lisp_Object=20object)=0A+{=0A= +#ifdef=20CHECK_STRING_LITERALS=0A+=20=20if=20(STRINGP=20(object)=20&&=20= XSTRING=20(object)->u.s.literal=0A+=20=20=20=20=20=20&&=20SCHARS=20= (object)=20>=200)=0A+=20=20=20=20string_literal_prop_change=20(object);=0A= +#endif=0A+}=0A+=0A=20/*=20Used=20by=20add-text-properties=20and=20= add-face-text-property.=20*/=0A=20=0A=20static=20Lisp_Object=0A@@=20= -1184,6=20+1214,8=20@@=20add_text_properties_1=20(Lisp_Object=20start,=20= Lisp_Object=20end,=0A=20=09=09=09=09=09=09=20=20=20=20=20=20= destructive));=0A=20=20=20=20=20}=0A=20=0A+=20=20= check_string_literal_prop_change=20(object);=0A+=0A=20=20=20INTERVAL=20= i,=20unchanged;=0A=20=20=20ptrdiff_t=20s,=20len;=0A=20=20=20bool=20= modified=20=3D=20false;=0A@@=20-1399,6=20+1431,15=20@@=20= set_text_properties=20(Lisp_Object=20start,=20Lisp_Object=20end,=20= Lisp_Object=20properties,=0A=20=09=09=09=09=09=20=20=20=20=20object,=20= coherent_change_p));=0A=20=20=20=20=20}=0A=20=0A+#ifdef=20= CHECK_STRING_LITERALS=0A+=20=20//=20Don't=20complain=20about=20removal=20= of=20properties=20from=20a=20string=20without=20any.=0A+=20=20if=20= (STRINGP=20(object)=20&&=20!(!string_intervals=20(object)=0A+=09=09=09=20= =20=20=20&&=20NILP=20(properties)=0A+=09=09=09=20=20=20=20&&=20BASE_EQ=20= (start,=20make_fixnum=20(0))=0A+=09=09=09=20=20=20=20&&=20BASE_EQ=20= (end,=20make_fixnum=20(SCHARS=20(object)))))=0A+=20=20=20=20= check_string_literal_prop_change=20(object);=0A+#endif=0A+=0A=20=20=20= INTERVAL=20i;=0A=20=20=20bool=20first_time=20=3D=20true;=0A=20=0A@@=20= -1483,6=20+1524,8=20@@=20set_text_properties_1=20(Lisp_Object=20start,=20= Lisp_Object=20end,=0A=20=20=20=20=20=20=20return;=0A=20=20=20=20=20}=0A=20= =0A+=20=20check_string_literal_prop_change=20(object);=0A+=0A=20=20=20= INTERVAL=20prev_changed=20=3D=20NULL;=0A=20=20=20ptrdiff_t=20s=20=3D=20= XFIXNUM=20(start);=0A=20=20=20ptrdiff_t=20len=20=3D=20XFIXNUM=20(end)=20= -=20s;=0A@@=20-1578,6=20+1621,8=20@@=20DEFUN=20= ("remove-text-properties",=20Fremove_text_properties,=0A=20=09=09=09=09=09= =09=20object));=0A=20=20=20=20=20}=0A=20=0A+=20=20= check_string_literal_prop_change=20(object);=0A+=0A=20=20=20INTERVAL=20= i,=20unchanged;=0A=20=20=20ptrdiff_t=20s,=20len;=0A=20=20=20bool=20= modified=20=3D=20false;=0A@@=20-1704,6=20+1749,8=20@@=20DEFUN=20= ("remove-list-of-text-properties",=20Fremove_list_of_text_properties,=0A=20= =09=09=09=09=09=09=09=20object));=0A=20=20=20=20=20}=0A=20=0A+=20=20= check_string_literal_prop_change=20(object);=0A+=0A=20=20=20INTERVAL=20= i,=20unchanged;=0A=20=20=20ptrdiff_t=20s,=20len;=0A=20=20=20bool=20= modified=20=3D=20false;=0A= --Apple-Mail=_C4628742-612B-4E5F-9EB0-57D24C107458--