unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 55514@debbugs.gnu.org
Subject: bug#55514: 29.0.50; Keyboard macros and visual-line-mode
Date: Sat, 21 May 2022 15:41:13 +0300	[thread overview]
Message-ID: <83pmk783di.fsf@gnu.org> (raw)
In-Reply-To: <87wnefyuyx.fsf@gnus.org> (message from Lars Ingebrigtsen on Sat,  21 May 2022 13:40:38 +0200)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: 55514@debbugs.gnu.org
> Date: Sat, 21 May 2022 13:40:38 +0200
> 
> Eli Zaretskii <eliz@gnu.org> 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 <down> 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.





  reply	other threads:[~2022-05-21 12:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19  1:59 bug#55514: 29.0.50; Keyboard macros and visual-line-mode Lars Ingebrigtsen
2022-05-19  7:08 ` Eli Zaretskii
2022-05-19 23:41   ` Lars Ingebrigtsen
2022-05-20  7:01     ` Eli Zaretskii
2022-05-20  7:14       ` Lars Ingebrigtsen
2022-05-20  7:22         ` Eli Zaretskii
2022-05-20  7:26           ` Lars Ingebrigtsen
2022-05-20 10:46             ` Eli Zaretskii
2022-05-21 11:40               ` Lars Ingebrigtsen
2022-05-21 12:41                 ` Eli Zaretskii [this message]
2022-05-21 13:38                   ` Lars Ingebrigtsen
2022-05-21 13:59                     ` Eli Zaretskii
2022-05-22 11:14                       ` Lars Ingebrigtsen
2022-05-22 13:00                         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83pmk783di.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=55514@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).