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


View this message in rfc822 format

From: "T.V Raman" <raman <at> google.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 49742 <at> debbugs.gnu.org
Subject: bug#49742: 28.0.50; previous-single-property-change sometimes wrong?
Date: Mon, 26 Jul 2021 10:19:13 -0700
Eli Zaretskii <eliz <at> gnu.org> writes:


See below for the results you ask. It does not explain itself because
property 'face is nil at positions  30 and 29.

Contents of help buffer after describe-text-properties below:
Text content at position 28:


Here is a ‘nil’ button labeled ‘)’.


There are text properties here:
  button               (t)
  category             transient-button-button
  command              magit-log:-L

[back]

>> 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?

-- 

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
♈ Id: kg:/m/0285kf1  🦮




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.