|
From: | Gregory Heytings |
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 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |