From: Alex Bochannek <alex@bochannek.com>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: Eli Zaretskii <eliz@gnu.org>,
larsi@gnus.org, 61549@debbugs.gnu.org, monnier@iro.umontreal.ca
Subject: bug#61549: 30.0.50; [PATCH] New keyboard macro counter functions
Date: Mon, 03 Jun 2024 19:01:04 -0700 [thread overview]
Message-ID: <m2zfs1wjof.fsf@bochannek.com> (raw)
In-Reply-To: <871q5da5l6.fsf@web.de> (Michael Heerdegen's message of "Tue, 04 Jun 2024 02:56:21 +0200")
Michael, Eli,
Michael Heerdegen <michael_heerdegen@web.de> writes:
> Eli Zaretskii <eliz@gnu.org> writes:
>
>> Thanks, but please in the future try to chime in earlier [...]
>
> Sure - I'm sorry that I failed this time.
>
>> > (1) "kmacro-add-counter" and related functions... I wonder why these are
>> > not named "kmacro-increase-counter" [...]
>
>> If we want to rename this, IMO kmacro-add-to-counter is a better name.
>
> Sounds reasonable.
I tried to make these function names descriptive and if there is
something more obvious, I am happy to rename them. (Also see below)
>> > (3) I actually don't understand the usage of the
>> > `kmacro-reg-add-counter-*' named functions (did you, Eli?). An example
>> > would maybe help.
>>
>> Did you read the doc string before or after I install the changes?
>
> Both times in this case, actually. My question was more about how this
> is supposed to be used, not what it does. Maybe it's obvious when one
> uses kmacros often.
I had some examples in the documentation in the original patch proposal.
The first set of functions lets you easily construct loops that change
the stepping of the counter based on a register value, so something
like:
C-x C-k TAB C-x C-k C-r a > T RET C-u 20 C-x C-k C-q >
When register T is set to 10 this will loop in steps of one to 10, then
in steps of two until it quits at 20.
I think the functions may be somewhat inconsistent because the first set
takes a prefix as an increment value and a register name as an argument
whereas the second uses the prefix as a the comparison value. A more
general approach would be to allow numeric registers for both types of
functions.
The problem I was trying to solve was how to use keyboard macros to
auto-create lists of numbers. I have found it useful and I can see how
other people might discover other uses. I figured it's been a over a
year since I originally proposed this, let's get this in and improve it
as there is some usage.
>> > In addition I want to say the suggested manual additions are useful.
>> > Would it make sense to add at least some parts to the file header or
>> > some pieces to the docstrings, or as comments?
>>
>> No, I think these are sufficiently obscure to not be in the manual.
>
> I agree - but the focus here was on the second sentence.
--
Alex.
next prev parent reply other threads:[~2024-06-04 2:01 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-16 8:17 bug#61549: 30.0.50; [PATCH] New keyboard macro counter functions Alex Bochannek
2023-02-17 8:13 ` Eli Zaretskii
2023-02-19 1:59 ` Alex Bochannek
2023-02-19 6:54 ` Eli Zaretskii
2023-03-06 3:37 ` Alex Bochannek
2023-03-11 8:49 ` Eli Zaretskii
2023-03-12 0:19 ` Michael Heerdegen
2024-05-22 23:57 ` Alex Bochannek
2024-05-23 5:36 ` Eli Zaretskii
2024-06-01 0:19 ` Alex Bochannek
2024-06-02 6:01 ` Eli Zaretskii
2024-06-02 23:33 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-03 11:33 ` Eli Zaretskii
2024-06-04 0:56 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-04 1:40 ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-04 2:01 ` Alex Bochannek [this message]
2024-06-05 13:52 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-07 19:07 ` Alex Bochannek
2024-06-08 13:45 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-11 3:06 ` Alex Bochannek
2024-06-08 2:18 ` Pranshu
2024-06-04 14:37 ` 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=m2zfs1wjof.fsf@bochannek.com \
--to=alex@bochannek.com \
--cc=61549@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=larsi@gnus.org \
--cc=michael_heerdegen@web.de \
--cc=monnier@iro.umontreal.ca \
/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).