From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@iro.umontreal.ca>
Cc: 8174@debbugs.gnu.org
Subject: bug#8174: 24.0.50; `replace-match' doesn't work right with propertized text
Date: Fri, 4 Mar 2011 21:05:32 -0800 [thread overview]
Message-ID: <E377C9A2076748B6A2F69235CE64952F@us.oracle.com> (raw)
In-Reply-To: <jwvlj0uursa.fsf-monnier+emacs@gnu.org>
> > (re-search-forward "tata")
> > (let* ((file "@@@@@")
> > (strg (apply #'propertize "AAAAAA"
> > `(display ,(image-dired-get-thumbnail-image file)
> > rear-nonsticky (display)))))
> > (replace-match strg))))
>
> First things first: (ignoring the lack of check that
> re-search-forward indeed succeeded)
The real code uses (when (re-search-forward... nil t)...).
> the only things allowed between the string match and
> the use of the match-data are a few Emacs primitives known to
> leave the match-data untouched. image-dired-get-thumbnail-image
> is not one of those primitives.
Yes, that's the problem here, so no bug. I was not expecting to need to wrap
the `(apply... )' in `save-match-data'. Usually I can pretty much tell when the
match data gets modified, but I guess I should have looked closer at
`image-dired-get-thumbnail-image'.
prev parent reply other threads:[~2011-03-05 5:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-04 22:16 bug#8174: 24.0.50; `replace-match' doesn't work right with propertized text Drew Adams
2011-03-04 22:42 ` Drew Adams
2011-03-05 0:01 ` Drew Adams
2011-03-05 4:18 ` Stefan Monnier
2011-03-05 5:05 ` Drew Adams [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E377C9A2076748B6A2F69235CE64952F@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=8174@debbugs.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).