From: Gregory Heytings <gregory@heytings.org>
To: Emanuel Berg <moasenwood@zoho.eu>
Cc: help-gnu-emacs@gnu.org
Subject: Re: [External] : Re: Emacs: adding 1 to every number made of 2 digits inside a marked region.
Date: Fri, 24 Sep 2021 07:25:16 +0000 [thread overview]
Message-ID: <d70d4a91f26fef6fac6d@heytings.org> (raw)
In-Reply-To: <87a6k2j1hh.fsf@zoho.eu>
>>>> This is a typical job for a macro.
>>>> C-x (
>>>> C-e
>>>> M-b
>>>> M-: (insert (format "%d" (1+ (number-at-point))))
>>>> C-k
>>>> C-a
>>>> C-n
>>>> C-x )
>>>>
>>>> Then type C-x e e e ...
>>>
>>> Seems complicated :-)
>>
>> It's not. Just record the keystrokes you use to make one change, then
>> replay the recording.
>
> Poor man's programming, don't encourage him to start with that :)
>
The OP was asking for opinions, mine is not worth less than yours.
Apparently (I just looked at your init files) you do not use keyboard
macros, which is of course fine, but they are one of the tools in Emacs'
toolset.
My experience and opinion is that there are cases when it's faster to
"just do it", and that this is one such case. Using a macro for such a
task is, again in my experience and opinion, much more efficient than
finding / installing / understanding a package that does what you want, or
writing / debugging / tweaking a defun.
next prev parent reply other threads:[~2021-09-24 7:25 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-22 14:28 Emacs: adding 1 to every number made of 2 digits inside a marked region Hongyi Zhao
2021-09-22 19:50 ` Stephen Berman
2021-09-22 21:04 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-23 0:23 ` Hongyi Zhao
2021-09-23 7:24 ` Stephen Berman
2021-09-23 7:54 ` Hongyi Zhao
2021-09-23 8:07 ` Stephen Berman
2021-09-23 9:00 ` Hongyi Zhao
2021-09-23 10:07 ` Stephen Berman
2021-09-23 10:13 ` Hongyi Zhao
2021-09-23 10:23 ` Stephen Berman
2021-09-23 12:58 ` Hongyi Zhao
2021-09-23 13:29 ` Stephen Berman
2021-09-23 14:25 ` Hongyi Zhao
2021-09-22 20:38 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-23 0:42 ` Hongyi Zhao
2021-09-23 0:46 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-23 0:56 ` Hongyi Zhao
2021-09-23 2:06 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-23 2:12 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-23 0:57 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-23 8:02 ` Hongyi Zhao
2021-09-23 8:37 ` Andreas Röhler
2021-09-23 9:05 ` Hongyi Zhao
2021-09-23 9:58 ` Hongyi Zhao
2021-09-23 10:10 ` Gregory Heytings
2021-09-23 10:17 ` Hongyi Zhao
2021-09-23 13:08 ` Gregory Heytings
2021-09-23 11:59 ` Andreas Röhler
2021-09-23 13:14 ` Hongyi Zhao
2021-09-23 13:51 ` Andreas Röhler
2021-09-23 14:23 ` Hongyi Zhao
2021-09-23 9:26 ` Gregory Heytings
2021-09-23 9:53 ` Hongyi Zhao
2021-09-23 10:02 ` Gregory Heytings
2021-09-23 14:13 ` [External] : " Drew Adams
2021-09-23 23:50 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-24 0:23 ` Drew Adams
2021-09-24 2:34 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-24 3:01 ` Drew Adams
2021-09-24 7:25 ` Gregory Heytings [this message]
2021-09-24 7:32 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-23 11:50 ` Andreas Röhler
2021-09-26 22:54 ` Michael Heerdegen
2021-09-26 23:50 ` Arthur Miller
2021-09-27 1:02 ` Arthur Miller
2021-09-27 1:22 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-27 5:57 ` Hongyi Zhao
2021-09-28 1:32 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-27 10:59 ` Arthur Miller
2021-09-28 1:34 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-28 1:51 ` Arthur Miller
2021-09-27 1:03 ` Arthur Miller
2021-09-27 14:08 ` Arthur Miller
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=d70d4a91f26fef6fac6d@heytings.org \
--to=gregory@heytings.org \
--cc=help-gnu-emacs@gnu.org \
--cc=moasenwood@zoho.eu \
/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.
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).