From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Lisp primitives and their calling of the change hooks Date: Sat, 06 Jan 2018 10:51:30 -0500 Message-ID: References: <20180103124543.GA5435@ACM> <20180104155111.GB6846@ACM> <20180104211154.GC6846@ACM> <20180106151839.GB23284@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1515253822 9662 195.159.176.226 (6 Jan 2018 15:50:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 6 Jan 2018 15:50:22 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 06 16:50:18 2018 Return-path: Envelope-to: ged-emacs-devel@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 1eXqjh-0002BI-A8 for ged-emacs-devel@m.gmane.org; Sat, 06 Jan 2018 16:50:17 +0100 Original-Received: from localhost ([::1]:39976 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eXqlg-0001AU-OL for ged-emacs-devel@m.gmane.org; Sat, 06 Jan 2018 10:52:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eXqlJ-0000xj-3G for emacs-devel@gnu.org; Sat, 06 Jan 2018 10:51:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eXqlG-0003Pc-IT for emacs-devel@gnu.org; Sat, 06 Jan 2018 10:51:57 -0500 Original-Received: from [195.159.176.226] (port=36178 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eXqlG-0003Mg-C0 for emacs-devel@gnu.org; Sat, 06 Jan 2018 10:51:54 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eXqj8-0008Dl-4B for emacs-devel@gnu.org; Sat, 06 Jan 2018 16:49:42 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 22 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:cwV+vQkV/SBKFfJXAUkcWdsU/xs= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:221645 Archived-At: > I've found a discrepancy. Just one. In (transpose-regions 1 10 11 20), > the hook calls are, in order, ((1 10) (11 20) (1 20 19)). The two > consecutive b-c-f's happen when the two regions are of equal size and > non-contiguous. Sounds like a bug alright. > The cause of this is not hard to find: in Ftranspose_region, editfns.c > L5204, there are two calls to modify_text on consecutive lines. This > seems to be some sort of optimisation. It is not done elsewhere in > Ftranspose_region. I dare say this could be fixed easily. Feel free to fix it (on master). > Perhaps for Emacs-27, if we want to fix transpose-regions. AFAIC this text can be installed in emacs-26 even if there's still a known bug where we don't behave as promised. For all we know, there are yet more (not yet known) such bugs anyway. Stefan