From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: add-face-text-property destructively modified properties
Date: Sat, 12 Oct 2019 23:32:46 +0200 [thread overview]
Message-ID: <878sppir9d.fsf@gnus.org> (raw)
In-Reply-To: <jwv4l0f5scd.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 11 Oct 2019 09:25:01 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> When I added add-face-text-property, it was for shr, which only uses it
>> for buffers where this isn't a problem (I think...?),
>
> I'm pretty sure the problem can occur in buffers as well.
> E.g. if you (put-text-property X Y 'face '(a b c d)) at variable places
> (hence using the exact same list object as `face` property at various
> places) and then use add-face-text-property on some of those places.
> [ both within a given buffer and between different buffers. ]
Ah, yes, that's true. Mixing and matching put-text-property with
add-face-text-property could also lead to similar problems as in
strings.
But can `buffer-substring' give us the same problems, or are the text
properties deep-copied in that case?
(I've now changed add-face-text-property to be non-destructive when
changing buffer face properties, too.)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2019-10-12 21:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-09 18:14 add-face-text-property destructively modified properties Lars Ingebrigtsen
2019-10-09 21:45 ` Stefan Monnier
2019-10-11 7:57 ` Lars Ingebrigtsen
2019-10-11 13:25 ` Stefan Monnier
2019-10-12 21:32 ` Lars Ingebrigtsen [this message]
2019-10-13 14:31 ` Stefan Monnier
2019-10-10 6:51 ` Eli Zaretskii
2019-10-10 12:56 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878sppir9d.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.