From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#53795: 27.2; unexpected column change while kbd-macro Date: Sat, 05 Feb 2022 13:06:21 +0200 Message-ID: <83mtj51sk2.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22640"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 53795-done@debbugs.gnu.org To: awrhygty@outlook.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 05 12:07:30 2022 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 1nGIuf-0005me-Tx for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Feb 2022 12:07:30 +0100 Original-Received: from localhost ([::1]:43950 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGIue-0006et-3d for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Feb 2022 06:07:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGIuE-0006ee-8s for bug-gnu-emacs@gnu.org; Sat, 05 Feb 2022 06:07:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39964) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGIuD-0008Gl-Vm for bug-gnu-emacs@gnu.org; Sat, 05 Feb 2022 06:07:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nGIuD-0004mL-SV for bug-gnu-emacs@gnu.org; Sat, 05 Feb 2022 06:07:01 -0500 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Feb 2022 11:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 53795 X-GNU-PR-Package: emacs Mail-Followup-To: 53795@debbugs.gnu.org, eliz@gnu.org, awrhygty@outlook.com Original-Received: via spool by 53795-done@debbugs.gnu.org id=D53795.164405920818345 (code D ref 53795); Sat, 05 Feb 2022 11:07:01 +0000 Original-Received: (at 53795-done) by debbugs.gnu.org; 5 Feb 2022 11:06:48 +0000 Original-Received: from localhost ([127.0.0.1]:33860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nGIu0-0004lp-Ee for submit@debbugs.gnu.org; Sat, 05 Feb 2022 06:06:48 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nGIty-0004lc-T0 for 53795-done@debbugs.gnu.org; Sat, 05 Feb 2022 06:06:47 -0500 Original-Received: from [2001:470:142:3::e] (port=32886 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGItt-0008G1-G5; Sat, 05 Feb 2022 06:06:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=poBrD8G4UtorwiyauRG3bzZxtY09JsD7x/EGW0d4X+0=; b=ESOth521lG7a t7ax4U3+u1TVNe0zrWckgAE+97f6ZjPWiTcgD5nCRYkptXrHXNCTOv1TZtp0xYgvm0r1U5rpspUak HNm7u83k5VGed7qWsYTTGZJgl0jUdUGRzNN6v/aoKuBOz2NH5MqYnZ4eTAiMTzscNZf6xm6y0R7nN ywx/8NcPLbh61uRVMpItriMdhxG3mLYwfUKO6fBLwWmDVCnsyQGQuFN51rRtCFKUo4w2sg1F0qhji 2ib/OUOzejp/1+N+WBvpVLkLnRPYYJd2ev6NKj54cHTLQydAateLaT+mqHZUTXCOkF2GDfih9MX9w OlYnGfaac48pzdidCkUF+w==; Original-Received: from [87.69.77.57] (port=4817 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGIts-0004GA-S3; Sat, 05 Feb 2022 06:06:41 -0500 In-Reply-To: (awrhygty@outlook.com) 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:226061 Archived-At: > From: awrhygty@outlook.com > Date: Sat, 05 Feb 2022 18:40:46 +0900 > > Evaluate the form below, I expect all lines look like "abc". > But some of the lines look like "cycaby". > > (let ((buf (generate-new-buffer "tmp"))) > (switch-to-buffer buf) > (dotimes (i 100) > (insert (propertize "x" 'display "ab") "y\n")) > (goto-char (point-min)) > (end-of-line) > (execute-kbd-macro "\C-b\C-dc\C-n" 100)) That's because current-column returned an incorrect value when display strings are used. In the "tmp" buffer, go to the first line, move cursor to the 'y' character, and type "C-x =" -- you will see that Emacs thinks this is column 1, not 2. I've now fixed current-column in this case (on the master branch), so the above snippet now behaves as expected.