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#55514: 29.0.50; Keyboard macros and visual-line-mode Date: Sat, 21 May 2022 15:41:13 +0300 Message-ID: <83pmk783di.fsf@gnu.org> References: <87o7zu9tay.fsf@gnus.org> <837d6idmot.fsf@gnu.org> <87leux8505.fsf@gnus.org> <83wnegbsbk.fsf@gnu.org> <87y1yw65gw.fsf@gnus.org> <83o7zsbrdk.fsf@gnu.org> <87tu9k64w5.fsf@gnus.org> <83mtfcbhxz.fsf@gnu.org> <87wnefyuyx.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30472"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 55514@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 21 14:42:10 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 1nsOQs-0007gF-Mt for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 21 May 2022 14:42:10 +0200 Original-Received: from localhost ([::1]:33674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nsOQr-0003cX-Ck for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 21 May 2022 08:42:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsOQk-0003cP-10 for bug-gnu-emacs@gnu.org; Sat, 21 May 2022 08:42:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46982) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nsOQj-0006jV-OP for bug-gnu-emacs@gnu.org; Sat, 21 May 2022 08:42:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nsOQj-0002LC-Lo for bug-gnu-emacs@gnu.org; Sat, 21 May 2022 08:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 May 2022 12:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55514 X-GNU-PR-Package: emacs Original-Received: via spool by 55514-submit@debbugs.gnu.org id=B55514.16531368938952 (code B ref 55514); Sat, 21 May 2022 12:42:01 +0000 Original-Received: (at 55514) by debbugs.gnu.org; 21 May 2022 12:41:33 +0000 Original-Received: from localhost ([127.0.0.1]:40879 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsOQH-0002KK-Fx for submit@debbugs.gnu.org; Sat, 21 May 2022 08:41:33 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58150) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsOQC-0002K4-Qz for 55514@debbugs.gnu.org; Sat, 21 May 2022 08:41:32 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51568) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsOQ7-0006bl-GV; Sat, 21 May 2022 08:41:23 -0400 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=149J41UE3FcEvJo/5JH889F44AJUOm9lpItoNHwAlus=; b=TQA8W/pu9Sc0 M20ZgyTKNnXsthcbuPkyKmZ0nlOQQ9nnNH2+liH3bjlMAjcoGRPGVIBgKcxcnK6I67suwlzbWPraQ dO7g9tHgiGvi/+brEKV9K8C1U5nLPYYaDSq5zuedPApAbKIoyOivgUbkUSjsRnJRmhiOU2+CxKoSA p3vlB0uzGnL1bsUgoFQJu+37qZt5EjUy7DX8a7tqkaZDT7SZzQGO6AD7+QZ0dysRFohCy5FWpT0Ll ngdr7Q4iO3J2eZoj4r3GHtydE27Ybw/f1SBf5rNksHB8/+vYN8uZjSFrCD5VYlC2jP+9/APe1qmog uuKlShG0jlbXdwZWRvU1rg==; Original-Received: from [87.69.77.57] (port=4376 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 1nsOQ6-0002cM-V8; Sat, 21 May 2022 08:41:23 -0400 In-Reply-To: <87wnefyuyx.fsf@gnus.org> (message from Lars Ingebrigtsen on Sat, 21 May 2022 13:40:38 +0200) 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:232821 Archived-At: > From: Lars Ingebrigtsen > Cc: 55514@debbugs.gnu.org > Date: Sat, 21 May 2022 13:40:38 +0200 > > Eli Zaretskii writes: > > > As I said earlier, we could add a special value of line-move-visual, > > which would mean "move by visual lines, except when executing macros", > > which would I think solve your problem. > > That seems like a heavier solution than I had envisioned (without > looking at the code). You can bind keyboard macros to keys and have > them executed, and the point is that they should execute the same way as > they were recorded. That's the fantastic utility of recording keyboard > macros, after all. I don't think I understand. Emacs always knows when it is executing a keyboard macro. And what do you mean by "execute the same as they were recorded"? With C-n, it can only be exactly "the same" if you move across exactly the same text. Once the text is different, the partition into physical and screen lines is different, and the effect is different. To my mind, keyboard macros are about repeating the _commands_; the effect of those commands is not guaranteed to be exactly the same in each case. > I don't think a setting that affects line-move-visual in this way would > be all that sturdy. You can, for instance, record a macro, save it to a > file, and use it later. It would be awkward if flipping a setting then > affects how the macro executes. The idea was that you won't flip the value, but set it once to that value, assuming that you always (or frequently) want C-n/C-p go by physical lines when invoked from a macro. Wasn't that your original request? > I think having recorded as `M-x next-logical-line' (etc), or > something to that effect, is the way to go here. That's trivial to program, so I'm not sure I understand why would we need that in core.