all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "T.V Raman" <raman@google.com>
Cc: 49742@debbugs.gnu.org
Subject: bug#49742: 28.0.50; previous-single-property-change sometimes wrong?
Date: Mon, 26 Jul 2021 19:29:41 +0300	[thread overview]
Message-ID: <83sg01ujgq.fsf@gnu.org> (raw)
In-Reply-To: <p91im0x84ck.fsf@google.com> (bug-gnu-emacs@gnu.org)

> Date: Mon, 26 Jul 2021 08:47:07 -0700
> From:  "T.V Raman" via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> 
> This appears to a corner case where previous-single-property-change
> breaks in a surprizing way.
> 
> 1. ;;; Evaluate the below to get a string with properties.
> (setq s
> 
> #("-L Trace line evolution (-L)
> 
> History simplification" 0 2 (face transient-blue button (t) category transient-button-button command magit-log:-L) 2 25 (button (t) category transient-button-button command magit-log:-L) 25 27 (face transient-inactive-value button (t) category transient-button-button command magit-log:-L) 27 28 (button (t) category transient-button-button command magit-log:-L) 30 52 (face transient-heading)))
> 
> 
> 2.;;; Insert into a new buffer
> (switch-to-buffer "foo")
> (insert s)
> 
> 4. ;;; Place point on the 'H' of "history"
> 
>    5. ;;; eval
>    (previous-single-property-change (point 'face)
> 
>    Instead of returning value of point before the 'H', this returns a
>    value that is unexpected, it returns point  past the ')'

What does "M-x describe-text-properties RET" say at the position
returned by the above previous-single-property-change call?  Does that
value explain the result?  If not, why not?





  reply	other threads:[~2021-07-26 16:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26 15:47 bug#49742: 28.0.50; previous-single-property-change sometimes wrong? T.V Raman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-26 16:29 ` Eli Zaretskii [this message]
2021-07-26 17:19   ` T.V Raman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-26 18:59     ` Eli Zaretskii
2021-07-27  2:02       ` T.V Raman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-27  2:30         ` Eli Zaretskii
2021-07-27  3:06           ` T.V Raman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-27  4:23             ` Eli Zaretskii
2021-07-27 14:50               ` T.V Raman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-27 15:23                 ` Andreas Schwab
2021-07-27 15:40                   ` T.V Raman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-27 15:46                     ` Lars Ingebrigtsen
2021-07-27 16:02                       ` T.V Raman via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=83sg01ujgq.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=49742@debbugs.gnu.org \
    --cc=raman@google.com \
    /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.