From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#42424: 27.0.90; replace-match: point is NOT left at the end of replacement Date: Sun, 18 Oct 2020 10:24:19 +0200 Message-ID: <87tuusj618.fsf@gnus.org> References: <87zh4ltc5l.fsf@gnus.org> <83tuussr1v.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39437"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: victorhge@gmail.com, 42424@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 18 10:25:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kU406-000A8Z-7P for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Oct 2020 10:25:10 +0200 Original-Received: from localhost ([::1]:57380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kU404-0005bC-NI for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Oct 2020 04:25:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kU3zy-0005b2-2W for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2020 04:25:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52832) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kU3zx-0002ds-NW for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2020 04:25:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kU3zx-0006Vi-JY for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2020 04:25:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Oct 2020 08:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42424 X-GNU-PR-Package: emacs Original-Received: via spool by 42424-submit@debbugs.gnu.org id=B42424.160300947224987 (code B ref 42424); Sun, 18 Oct 2020 08:25:01 +0000 Original-Received: (at 42424) by debbugs.gnu.org; 18 Oct 2020 08:24:32 +0000 Original-Received: from localhost ([127.0.0.1]:36145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kU3zU-0006Ux-7z for submit@debbugs.gnu.org; Sun, 18 Oct 2020 04:24:32 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:48792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kU3zS-0006Uk-7q for 42424@debbugs.gnu.org; Sun, 18 Oct 2020 04:24:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=PK6CNu/Xy70A+DFTULuAJElasrx1T0ENXc9pwWN47GU=; b=iQ8tmsceItKafNHISSGLJjf4p6 M2P6D92vn0npnzfXbFZnglAk59Sm6q5khjxnooGJMgx04BXmFJNKGN7avUfTmeYIKaKG7vCv0nSjc bYN7GX6T51L9Z2pla1/mi4YYW/yws8eB/FR89ljqVqqMLGKn8XZSeCfhr1kmtrnrtIcg=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kU3zJ-0006PN-75; Sun, 18 Oct 2020 10:24:23 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEVDNUhYT2KHdIYf GCT0zK+oXWX////KAn60AAAAAWJLR0QGYWa4fQAAAAd0SU1FB+QKEgciIGgyBOwAAAG7SURBVDjL XZRBcsMgDEWlquzBHvY2SfakTA/Qjr13Oub+V6mEwNAyWWT0pP9BCAMAoHV1TZQSB6z8Iv+BC9yS LECnoFVMISRdkg14FTgXbqmhCBYHsAzAdXMX1g6InTq4UwMp4VhxXzqA0eP+TQ1E7CCE+zZ386sk CLhdQCuwgu/5OmIBVk4Z2GNu5qjnsKI3jQcEBQQqlkYgyaCdWUZQmkjFy7awycXcWqBS0uJ+24oU WydJqDuKHFeA5V7AaTfAnwr6BZd05/N2ASpAlPBV8qsUJQHISv5lNN5AqWPXPNd4ATMUQNHl/Lnl LkUVPH0+TB6kSDdFbz4TXlLcQQUoIJpt8KCyW5yRwXsHFitIi8/QAceoaGGyJhszANSOTOTM8e4H DwbiFGg1x3mMB+Qbj8iPZkV77gOQKREaA1q//QM8IPNHsHB5XyC4eXossfV2yxVMqyOew96RrHfq pgViCKuFP8AKwGd4vJz1/yr4UcXw+Fmduu/b0QDPFLKWU5PcgeMR4We+Kjh3HajyDig9xV7BVywf DlAgYk7c9/OQgUYlc5m2qQJTkgWgTnpEnsM9v7wagzyoOtEK8i+W2o66dNtRxAAAACV0RVh0ZGF0 ZTpjcmVhdGUAMjAyMC0xMC0xOFQwNzozNDozMiswMDowMGkk31EAAAAldEVYdGRhdGU6bW9kaWZ5 ADIwMjAtMTAtMThUMDc6MzQ6MzIrMDA6MDAYeWftAAAAAElFTkSuQmCC X-Now-Playing: Rocket To The Sky's _Cigars_: "Cigars" In-Reply-To: <83tuussr1v.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 17 Oct 2020 20:25:32 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:190870 Archived-At: Eli Zaretskii writes: >> Uhm... is that comment wrong? Aren't we moving point to the end of the >> inserted replacement? > > Yes, it should say "end", not "start". Fixed now. > Personally, I wonder what was expected here. If the modification > hooks modify the replaced text behind our back, how can the Lisp > program which does that expect to have point where it belongs? Am I > missing something? No, the semantics are pretty unclear, and it's not obvious whether we can guarantee anything here. But the bug reporter notes: > Other types of modification (insert or delete) do not have this issue. > `point' is adjusted before running modification hooks. So I think the suggestion is to move point to the end of the replacement before running the modification hooks, i.e., move the point logic to replace_range. But I'm not actually sure where the modification hooks are being run from... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no