emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#36190: closed (27.0.50; `put-text-property' etc. w


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#36190: closed (27.0.50; `put-text-property' etc. with buffer argument calls current buffer's `after-change-functions')
Date: Sat, 06 Jul 2019 16:23:02 +0000

Your message dated Sat, 06 Jul 2019 19:22:32 +0300
with message-id <address@hidden>
and subject line Re: bug#36190: 27.0.50; `put-text-property' etc. with buffer 
argument calls current buffer's `after-change-functions'
has caused the debbugs.gnu.org bug report #36190,
regarding 27.0.50; `put-text-property' etc. with buffer argument calls current 
buffer's `after-change-functions'
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden.)


-- 
36190: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=36190
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 27.0.50; `put-text-property' etc. with buffer argument calls current buffer's `after-change-functions' Date: Thu, 13 Jun 2019 13:48:40 +0000
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?



--- End Message ---
--- Begin Message --- Subject: Re: bug#36190: 27.0.50; `put-text-property' etc. with buffer argument calls current buffer's `after-change-functions' Date: Sat, 06 Jul 2019 19:22:32 +0300
> From: Pip Cet <address@hidden>
> Date: Sat, 6 Jul 2019 15:27:41 +0000
> Cc: address@hidden
> 
> > LGTM, with a couple of minor comments below.  Feel free to push after
> > fixing those.
> 
> I don't have push access, so I hope it's okay just to send the new patch.

Thanks, pushed.  Please in the future mention the bug number in the
log message, and be sure NOT to end with a period the header line of
the log message, per CONTRIBUTE.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]