GNU bug report logs - #58928
29.0.50; overlays in org-mode are disrupted after call `org-capture`

Previous Next

Package: emacs;

Reported by: Eli Qian <eli.q.qian <at> gmail.com>

Date: Mon, 31 Oct 2022 15:00:02 UTC

Severity: normal

Found in version 29.0.50

Full log


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

From: Matt Armstrong <matt <at> rfc20.org>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>, Ihor
 Radchenko <yantar92 <at> posteo.net>
Cc: 58928 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, Eli Qian <eli.q.qian <at> gmail.com>
Subject: Re: bug#58928: 29.0.50; overlays in org-mode are disrupted after
 call `org-capture`
Date: Tue, 01 Nov 2022 16:25:22 -0700
[Message part 1 (text/plain, inline)]
I've created a simpler repro that demonstrates how inserts/deletes in an
indirect buffer does not update positions for overlays its base buffer.

This function creates a temp buffer with some text and one overlay, then
an indirect buffer against it.  Editing text in the indirect buffer
fails to update overlay positions in the base buffer.

(defun repro58928 ()
  (interactive)
  (with-current-buffer (get-buffer-create "*b58928*")
    (erase-buffer)
    (delete-all-overlays)
    (insert "My dog has fleas,\nlots and lots of fleas!\n")
    (let ((overlay (make-overlay 18 (point-max))))
      (overlay-put overlay 'face 'match))
    (pop-to-buffer (current-buffer))
    (ignore-errors
      (kill-buffer "*INDIRECT-b58928*"))
    (let ((indirect (make-indirect-buffer (current-buffer)
					  "*INDIRECT-b58928*")))
      (with-current-buffer indirect
	(goto-char (point-min)))
      (pop-to-buffer indirect))))

I'm not sure where the bug is, but the good news is that the regression
test will be easy to express in lisp.

[before-typing.png (image/png, inline)]
[after-typing.png (image/png, inline)]

This bug report was last modified 2 years and 226 days ago.

Previous Next


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