unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "T.V Raman" via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 49742@debbugs.gnu.org
Subject: bug#49742: 28.0.50; previous-single-property-change sometimes wrong?
Date: Mon, 26 Jul 2021 10:19:13 -0700	[thread overview]
Message-ID: <p91bl6p8032.fsf@google.com> (raw)
In-Reply-To: <83sg01ujgq.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 26 Jul 2021 19:29:41 +0300")

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030, Size: 1930 bytes --]

Eli Zaretskii <eliz@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@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)
7©4 Id: kg:/m/0285kf1  •0Ü8





  reply	other threads:[~2021-07-26 17:19 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
2021-07-26 17:19   ` T.V Raman via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
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

  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=p91bl6p8032.fsf@google.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=49742@debbugs.gnu.org \
    --cc=eliz@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 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).