GNU bug report logs - #49742
28.0.50; previous-single-property-change sometimes wrong?

Previous Next

Package: emacs;

Reported by: "T.V Raman" <raman <at> google.com>

Date: Mon, 26 Jul 2021 15:48:02 UTC

Severity: normal

Tags: notabug

Found in version 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 49742 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "T.V Raman" <raman <at> google.com>
Cc: 49742 <at> debbugs.gnu.org
Subject: Re: bug#49742: 28.0.50;
 previous-single-property-change sometimes wrong?
Date: Mon, 26 Jul 2021 19:29:41 +0300
> 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 <at> 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?




This bug report was last modified 3 years and 301 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.