all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#36190: 27.0.50; `put-text-property' etc. with buffer argument calls current buffer's `after-change-functions'
@ 2019-06-13 13:48 Pip Cet
  2019-06-13 16:36 ` Eli Zaretskii
  0 siblings, 1 reply; 22+ messages in thread
From: Pip Cet @ 2019-06-13 13:48 UTC (permalink / raw)
  To: 36190

In emacs -Q, evaluating:

(let ((buffer1 (generate-new-buffer "A"))
      (buffer2 (generate-new-buffer "B")))
  (with-current-buffer buffer2
    (insert "BBB"))
  (with-current-buffer buffer1
    (add-hook 'after-change-functions
          (lambda (beg end len)
        (message "%S %S %S"
             beg end len))
          nil t)
    (put-text-property 1 4 'read-only t buffer2)))

results in a "1 4 3" message. I would have expected no message, as
buffer2 was modified and buffer1, whose after-change-functions I'd
set, wasn't.

I've looked at the code, and it appears no particular provisions are
being made to make sure we switch to the modified buffer before
calling signal_after_change().

As far as I can tell, this makes `put-text-property' with a buffer
argument pretty useless. Am I missing something? Is this expected
behavior somehow?





^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2019-07-06 16:22 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-13 13:48 bug#36190: 27.0.50; `put-text-property' etc. with buffer argument calls current buffer's `after-change-functions' Pip Cet
2019-06-13 16:36 ` Eli Zaretskii
2019-06-13 18:48   ` Pip Cet
2019-06-13 19:05     ` Eli Zaretskii
2019-06-13 19:27       ` Eli Zaretskii
2019-06-13 19:42       ` Pip Cet
2019-06-13 20:01         ` Eli Zaretskii
2019-06-13 20:57           ` Pip Cet
2019-06-13 21:37             ` Pip Cet
2019-06-14  7:41               ` Eli Zaretskii
2019-06-14 11:14                 ` Pip Cet
2019-06-14 12:10                   ` Eli Zaretskii
2019-06-15 15:14                     ` Pip Cet
2019-06-15 15:23                       ` Eli Zaretskii
2019-06-15 19:27                         ` Pip Cet
2019-07-06  8:08                           ` Eli Zaretskii
2019-07-06 15:27                             ` Pip Cet
2019-07-06 16:22                               ` Eli Zaretskii
2019-06-14  7:36             ` Eli Zaretskii
2019-06-17 11:38               ` Pip Cet
2019-06-17 15:59                 ` Eli Zaretskii
2019-06-18 17:14                   ` Pip Cet

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.