GNU bug report logs - #32237
27.0.50; Function in before-change-functions is called with first argument greater than the second

Previous Next

Package: emacs;

Reported by: Michał Kondraciuk <k.michal <at> zoho.com>

Date: Sat, 21 Jul 2018 17:26:01 UTC

Severity: normal

Found in version 27.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Michał Kondraciuk <k.michal <at> zoho.com>
Subject: bug#32237: closed (Re: bug#32237: 27.0.50; Function in
 before-change-functions is called with first argument greater than the
 second)
Date: Sat, 21 Jul 2018 18:07:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#32237: 27.0.50; Function in before-change-functions is called with first argument greater than the second

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 32237 <at> debbugs.gnu.org.

-- 
32237: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=32237
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Michał Kondraciuk <k.michal <at> zoho.com>
Cc: 32237-done <at> debbugs.gnu.org
Subject: Re: bug#32237: 27.0.50;
 Function in before-change-functions is called with first argument
 greater than the second
Date: Sat, 21 Jul 2018 21:06:50 +0300
> From: Michał Kondraciuk <k.michal <at> zoho.com>
> Date: Sat, 21 Jul 2018 18:39:26 +0200
> 
> If I eveluate the sexp below with M-: in emacs -Q, I get the message
> "before change 4 1", which is unexpected.  The second argument should be
> greater than the first one, according to the documentation.

Thanks, fixed on the emacs-26 branch.

[Message part 3 (message/rfc822, inline)]
From: Michał Kondraciuk <k.michal <at> zoho.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; Function in before-change-functions is called with first
 argument greater than the second
Date: Sat, 21 Jul 2018 18:39:26 +0200
If I eveluate the sexp below with M-: in emacs -Q, I get the message
"before change 4 1", which is unexpected.  The second argument should be
greater than the first one, according to the documentation.

(with-current-buffer "*scratch*"
  (erase-buffer)
  (insert "foo")
  (add-hook 'before-change-functions
            (lambda (beg end)
              (message "before change %d %d" beg end))
            nil t)
  (with-temp-buffer
    (insert "foo")
    (let ((temp (current-buffer)))
      (with-current-buffer "*scratch*"
        (replace-buffer-contents temp)))))


Repository revision: 2c242cb1a2956ecfa894d0110b837d4ecc43a69c




This bug report was last modified 7 years and 21 days ago.

Previous Next


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