unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Matt Armstrong <matt@rfc20.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>,
	Ihor Radchenko <yantar92@gmail.com>
Cc: 58479@debbugs.gnu.org
Subject: bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing
Date: Wed, 19 Oct 2022 16:49:06 -0700	[thread overview]
Message-ID: <87zgdrml1p.fsf@rfc20.org> (raw)
In-Reply-To: <878rlbo3gi.fsf@rfc20.org>

Matt Armstrong <matt@rfc20.org> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>> Thanks, I have fixed this specific problem with the patch below.
>> Let's hope it also fixes your original issue with notmuch.
>>
>>         Stefan
>>
>> diff --git a/src/textprop.c b/src/textprop.c
>> index 04fae528097..b34246f5bc7 100644
>> --- a/src/textprop.c
>> +++ b/src/textprop.c
>> @@ -649,7 +649,8 @@ get_char_property_and_overlay (Lisp_Object position, register Lisp_Object prop,
>>  	  Lisp_Object tem = Foverlay_get (node->data, prop);
>>            struct sortvec *this;
>>  
>> -	  if (NILP (tem) || (w && ! overlay_matches_window (w, node->data)))
>> +	  if (NILP (tem) || node->end < pos + 1
>> +	      || (w && ! overlay_matches_window (w, node->data)))
>>  	    continue;
>>  
>>            this = (result == items ? items + 1 : items);
>
> Hmm...spoke too soon.  Despite your fix Stefan

[...]

New repro, see function below.  Symptoms: despite inserting two lines of
text, and there being a single overlay at (1,1) with the 'invisible
prop, all I see in the buffer is the ellipsis.  I can cursor around and
see the position change in the mode line, but the display never changes.
With the cursor at EOB it appears after the ellipsis.  Anywhere else and
the cursor appears before it.

(defun my-b58479-4 ()
  (interactive)
  (with-current-buffer (get-buffer-create "*b58479*")
    (kill-all-local-variables)
    (delete-all-overlays)
    (setq buffer-read-only nil)
    (setq buffer-file-name nil)
    (setq buffer-undo-list nil)
    (let ((inhibit-read-only t)
          (inhibit-modification-hooks t))
      (erase-buffer))
    (add-to-invisibility-spec (cons 'ellipsis t))
    (goto-char (point-max))
    (insert "first line\nsecond line\n")
    (let ((overlay (make-overlay 1 1)))
      (overlay-put overlay 'invisible 'ellipsis))
    (display-buffer (current-buffer))))



----------------------------------------------------------------------
             position: 1 of 29 (0%), column: 0
            character: f (displayed as f) (codepoint 102, #o146, #x66)
              charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x66
               script: latin
               syntax: w 	which means: word
             category: .:Base, L:Strong L2R, a:ASCII, l:Latin, r:Roman
             to input: type "C-x 8 RET 66" or "C-x 8 RET LATIN SMALL LETTER F"
          buffer code: #x66
            file code: #x66 (encoded by coding system utf-8-unix)
              display: by this font (glyph code):
    ftcrhb:-    -Go Mono-regular-normal-normal-*-15-*-*-*-m-0-iso10646-1 (#x49)

Character code properties: customize what to show
  name: LATIN SMALL LETTER F
  general-category: Ll (Letter, Lowercase)
  decomposition: (102) ('f')

There is an overlay here:
 From 1 to 1
  invisible            ellipsis
----------------------------------------------------------------------
             position: 29 of 29 (97%), column: 5
            character: q (displayed as q) (codepoint 113, #o161, #x71)
              charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x71
               script: latin
               syntax: w 	which means: word
             category: .:Base, L:Strong L2R, a:ASCII, l:Latin, r:Roman
             to input: type "C-x 8 RET 71" or "C-x 8 RET LATIN SMALL LETTER Q"
          buffer code: #x71
            file code: #x71 (encoded by coding system utf-8-unix)
              display: by this font (glyph code):
    ftcrhb:-    -Go Mono-regular-normal-normal-*-15-*-*-*-m-0-iso10646-1 (#x54)

Character code properties: customize what to show
  name: LATIN SMALL LETTER Q
  general-category: Ll (Letter, Lowercase)
  decomposition: (113) ('q')





  reply	other threads:[~2022-10-19 23:49 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-13  2:17 bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing Ihor Radchenko
2022-10-13  4:25 ` Matt Armstrong
2022-10-14  4:56   ` Ihor Radchenko
2022-10-14 20:30     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-15  1:38       ` Ihor Radchenko
2022-10-15  3:52         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-15  4:11           ` Ihor Radchenko
2022-10-15 13:43             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-15 14:22               ` Ihor Radchenko
2022-10-16 23:41                 ` Matt Armstrong
2022-10-17  1:28                   ` Ihor Radchenko
2022-10-17  5:56                     ` Matt Armstrong
2022-10-17  8:21                       ` Ihor Radchenko
2022-10-17 18:53                         ` Matt Armstrong
2022-10-17 22:05                           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-18 20:38         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-19  8:09           ` Ihor Radchenko
2022-10-19 12:31             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-19 21:59               ` Matt Armstrong
2022-10-19 22:26       ` Matt Armstrong
2022-10-19 23:49         ` Matt Armstrong [this message]
2022-10-20  1:51           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-20 21:59             ` Matt Armstrong
2022-10-20 22:34               ` Stefan Monnier 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=87zgdrml1p.fsf@rfc20.org \
    --to=matt@rfc20.org \
    --cc=58479@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=yantar92@gmail.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).