From: Jordi Burguet Castell <jordi.burguet-castell@cern.ch>
Subject: function to increase numbers in a buffer
Date: Tue, 22 Apr 2003 15:50:14 +0200 [thread overview]
Message-ID: <b84gt0$ctd$1@news.service.uci.edu> (raw)
Hello,
I am trying to write a function that would work like query-replace-regexp,
but instead of replacing each match with a fixed string, I want the matched
numbers to be increased by 3.
Or, easier, I have a file that looks like this:
20 1 23523
20 2 23874
20 3 23898
...
and I want to increase all the numbers in the third column by a certain
amount, say 3, from (point) to (point-max). A Perl script would not help,
because I need to do it several times and from different points.
I started following a tutorial in emacs-lisp, and also tried looking at the
code of some ".el" files, but it seems that I am still far from being able
to do such a simple(?) function. This post is in case some charitable
emacs-lisp expert soul knows how to do it.
Thanks,
Jordi
next reply other threads:[~2003-04-22 13:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-22 13:50 Jordi Burguet Castell [this message]
2003-04-23 6:04 ` function to increase numbers in a buffer Harry Putnam
2003-04-23 6:50 ` Joakim Hove
2003-04-23 12:01 ` Stefan Reichör
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='b84gt0$ctd$1@news.service.uci.edu' \
--to=jordi.burguet-castell@cern.ch \
/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).