unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Iterating over buffer lines
@ 2023-06-16 22:19 Joshua Lambert
  2023-06-17  0:10 ` Platon Pronko
  0 siblings, 1 reply; 6+ messages in thread
From: Joshua Lambert @ 2023-06-16 22:19 UTC (permalink / raw)
  To: help-gnu-emacs

I have created some functions that make changes to one buffer line of
a csv file. Let's call those functions a, b and c. Each of those take
one or more arguments. I want to create a separate interactive
function that does what function a, b, and c do, but on every line of
the region. I successfully created a function (act-on-region-by-line)
to go through all lines in a region and then call function a, function
b, or function c. But, It seems redundant to have multiple functions
that have 9-15 lines similar and one line different, the one that
specifies function a, b or c. What is the best way to be efficient in
this situation?

I have attempted to pass function b as a parameter, but I am slow to
understand how to do that. Is that the best way, or is there another?

Thanks,
J Lambert



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

end of thread, other threads:[~2023-06-18  1:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-16 22:19 Iterating over buffer lines Joshua Lambert
2023-06-17  0:10 ` Platon Pronko
2023-06-17  3:28   ` Joshua Lambert
2023-06-17  4:48     ` tomas
     [not found]       ` <CAGGu9j1gub_8kb92kkD30QmxLmZz8XJrwhyAPtYONE3OLe_zew@mail.gmail.com>
2023-06-17 19:17         ` tomas
2023-06-18  1:17     ` Platon Pronko

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