unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* function to increase numbers in a buffer
@ 2003-04-22 13:50 Jordi Burguet Castell
  2003-04-23  6:04 ` Harry Putnam
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jordi Burguet Castell @ 2003-04-22 13:50 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-04-23 12:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-22 13:50 function to increase numbers in a buffer Jordi Burguet Castell
2003-04-23  6:04 ` Harry Putnam
2003-04-23  6:50 ` Joakim Hove
2003-04-23 12:01 ` Stefan Reichör

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).