From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Micha=C5=82?= Kondraciuk Newsgroups: gmane.emacs.bugs Subject: 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:39:26 +0200 Message-ID: <503f92da-ee58-ceaa-2dab-a5216bd18e7e@zoho.com> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1532193850 7032 195.159.176.226 (21 Jul 2018 17:24:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 21 Jul 2018 17:24:10 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 To: 32237@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 21 19:24:06 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgvbx-0001h1-Ar for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Jul 2018 19:24:05 +0200 Original-Received: from localhost ([::1]:53406 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgve2-0006y5-6f for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Jul 2018 13:26:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42032) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgvdt-0006y0-Mc for bug-gnu-emacs@gnu.org; Sat, 21 Jul 2018 13:26:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fgvdq-0004Ew-IF for bug-gnu-emacs@gnu.org; Sat, 21 Jul 2018 13:26:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46256) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fgvdq-0004Er-ET for bug-gnu-emacs@gnu.org; Sat, 21 Jul 2018 13:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fgvdq-0002YR-5z for bug-gnu-emacs@gnu.org; Sat, 21 Jul 2018 13:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Micha=C5=82?= Kondraciuk Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Jul 2018 17:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 32237 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15321939189758 (code B ref -1); Sat, 21 Jul 2018 17:26:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Jul 2018 17:25:18 +0000 Original-Received: from localhost ([127.0.0.1]:51274 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgvd8-0002XK-HJ for submit@debbugs.gnu.org; Sat, 21 Jul 2018 13:25:18 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgvd6-0002X6-2Z for submit@debbugs.gnu.org; Sat, 21 Jul 2018 13:25:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fgvd0-0003qu-0i for submit@debbugs.gnu.org; Sat, 21 Jul 2018 13:25:10 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:49273) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fgvcz-0003qp-Sp for submit@debbugs.gnu.org; Sat, 21 Jul 2018 13:25:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgvcy-0006r4-Nv for bug-gnu-emacs@gnu.org; Sat, 21 Jul 2018 13:25:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fgvcv-0003op-KG for bug-gnu-emacs@gnu.org; Sat, 21 Jul 2018 13:25:08 -0400 Original-Received: from sender-pp-092.zoho.com ([135.84.80.237]:25463) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fgvcv-0003lA-Bu for bug-gnu-emacs@gnu.org; Sat, 21 Jul 2018 13:25:05 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=subject:from:to:references:message-id:date:user-agent:mime-version:in-reply-to:content-type; b=vTZFn61FrH3rh5mxpRyjketoBNFqrBemWjCfSbKn+/hxBMFbog/MrmNCV/7zrOx+6j2WfBaChFc2 1UVxS20U2lGWxmFGwhs8CpRBbw+MMvhGJOzPGeoKo+gCoVOKQw7x Original-Received: from [192.168.0.87] (84-10-171-192.static.chello.pl [84.10.171.192]) by mx.zohomail.com with SMTPS id 1532191168897570.5227197576309; Sat, 21 Jul 2018 09:39:28 -0700 (PDT) In-Reply-To: Content-Language: en-US X-ZohoMailClient: External X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:148790 Archived-At: 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