From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#59828: Fundamental Mode buffers fail to keep text properties Date: Wed, 07 Dec 2022 00:53:17 +0000 Message-ID: References: <83edtd99p2.fsf@gnu.org> <83cz8x97uk.fsf@gnu.org> <-vvz_2yrqjb2Eck0fqcM6KaTnwqc4Q2n5nn6vsVuZxHe1gRjV8gnJvyGQAPGuE2fXiAkJ_JpUp_Q6j9qdX2WegKM2vslVdpjt342CTznuc0=@protonmail.com> <2557E415-E1C9-4BDA-ACFB-8242FF363B63@gmail.com> <6626BA91-D7E0-4AEC-9897-4220F96C143D@gmail.com> Reply-To: Heime 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="6440"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 59828-done@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 07 01:54:27 2022 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 1p2ihf-0001U7-1R for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Dec 2022 01:54:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2ihM-0002PQ-Tv; Tue, 06 Dec 2022 19:54:08 -0500 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 1p2ihH-0002P4-BE for bug-gnu-emacs@gnu.org; Tue, 06 Dec 2022 19:54:03 -0500 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 1p2ihG-0005zR-UY for bug-gnu-emacs@gnu.org; Tue, 06 Dec 2022 19:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p2ihG-00006v-2s for bug-gnu-emacs@gnu.org; Tue, 06 Dec 2022 19:54:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Heime Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Dec 2022 00:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59828 X-GNU-PR-Package: emacs Original-Received: via spool by 59828-done@debbugs.gnu.org id=D59828.1670374413416 (code D ref 59828); Wed, 07 Dec 2022 00:54:02 +0000 Original-Received: (at 59828-done) by debbugs.gnu.org; 7 Dec 2022 00:53:33 +0000 Original-Received: from localhost ([127.0.0.1]:46191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2ign-00006c-HD for submit@debbugs.gnu.org; Tue, 06 Dec 2022 19:53:33 -0500 Original-Received: from mail-40137.protonmail.ch ([185.70.40.137]:58079) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2igj-00006T-5z for 59828-done@debbugs.gnu.org; Tue, 06 Dec 2022 19:53:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1670374403; x=1670633603; bh=5XrCEBP5+0ySsdQHrWZf3IsPxUHzojxICtujIM0QbL4=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=oedGUBvOcJSS9ZG7qZ8APi+3JI7bBekuS+7eDBNot7Ztly8VPArc1ArN//2D2mfrH nyKbgOEecvEECTgxGz+SOgZfVm6k40WZJdligGPtvQn/FKBvBb3/c3tI0HO4IywFCq zKwpOXw6XZtYRkuhg7Vg0sXKA48bRImRHYwsm6IvNuXwLe9S6uuB9JrevbKt6Z2+yv WIQwGw+D2n9V6bchgiEd2SynzPgtCc6D3UNxUqg7dk8WxEZ9w8SUHJIMdkzHWhdVvP e88pja24vEXm0RkrlM722/rjfhD0fCAdclaGLVhVJKx+UYhQ8LffruFbrTCzolA7qS toT0bZ+Ftfw7A== In-Reply-To: <6626BA91-D7E0-4AEC-9897-4220F96C143D@gmail.com> Feedback-ID: 57735886:user:proton 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:250152 Archived-At: ------- Original Message ------- On Tuesday, December 6th, 2022 at 5:41 AM, Yuan Fu wrot= e: > > > > Just to clarify: > > > >=20 > > > > 1. If font-lock-mode is off, you should use (propertize =E2=80= =A6 =E2=80=98face =E2=80=A6) > > > > 2. If font-lock-mode is on, you should use (propertize =E2=80=A6 = =E2=80=98font-lock-face =E2=80=A6) > >=20 > > If I have a function that does the inserts, should I include the two di= fferent conditions, > > whether "font-lock-mode" in "off" or "on" ? > >=20 > > Test whether font-lock-mode is off, then use (propertize =E2=80=A6 = =E2=80=98face =E2=80=A6) > > Test whether font-lock-mode is on, then use (propertize =E2=80=A6 = =E2=80=98font-lock-face =E2=80=A6) >=20 >=20 > It depends on your use-case. If you want to be safe you can just apply bo= th properties, then it will work no matter font-lock-mode is on or not. >=20 > Yuan I thought that the procedure is to enable "font-lock-mode", then use (prope= rtize =E2=80=A6 =E2=80=98font-lock-face =E2=80=A6). You are saying to disregard "font-lock-mode" and use (propertize =E2=80= =A6 =E2=80=98face =E2=80=A6) when it is determined that "font-lock-mode" is= off. Can I have a deeper explanation on how to handle this good?