From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joshua Lambert Newsgroups: gmane.emacs.help Subject: Iterating over buffer lines Date: Fri, 16 Jun 2023 17:19:01 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25057"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 17 00:19:31 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qAHn0-0006QJ-Cy for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 17 Jun 2023 00:19:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qAHmo-0007UO-J0; Fri, 16 Jun 2023 18:19:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAHmn-0007SB-An for help-gnu-emacs@gnu.org; Fri, 16 Jun 2023 18:19:17 -0400 Original-Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qAHml-00060w-L5 for help-gnu-emacs@gnu.org; Fri, 16 Jun 2023 18:19:17 -0400 Original-Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f8d0d68530so11348455e9.0 for ; Fri, 16 Jun 2023 15:19:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686953953; x=1689545953; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=r7XqZCOjCvSkD0vjJ8z6ZoRxp/1Xe040dd7YzY4bluc=; b=lGnHd2t1P8wEoE9Ee5uEtdJcS1Wvln78pOu7ktL2UShzprSHSUOw8l61HV0Eqshs5d /RQM0DMbtUMAeE1QKUZX/owSYHKTNRWJzKtHDEcFZAEdc9WiOqjTdBFchhX71aLif3nh H4/1SKuVcvHYXe6hWkuLJJwGPIwz65CC6rPdR9snVQ4b7txrItHbKU/XOeC1cpFCkn/Y Oa+p2pWy6vBE9eur4KpkSYf8Bu3tYDBSiJZPRtkVhtaBfcIXLwqhtFrLjk3IZBNVeN/L DGyoPBv13OOpc2/7k5YrOwHoNEokedYGMP93Et4dAhmY81LPIgtOgMX/9azBqD0lVHXp QfGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686953953; x=1689545953; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=r7XqZCOjCvSkD0vjJ8z6ZoRxp/1Xe040dd7YzY4bluc=; b=ESQRB+7+nNcP5aB1eCOh0yPcq7PCj1yGLZbUvbvw4HtPYQIgvDQ4sO0dKswOXHjKdL ur+NKXONCZxC3Ley0VhB12KLSRqiNXprYdYx6iTwd2m1OLlAjFdAp1TVVABCH1QLFy1l 2LfN8kEYvsdtKDhYw1hZyhrFQcZrFgeW/4pJBBHhbDk/9ssKB0cLrphFAvCpNPpSgNdj jqtXSAIt94sR8DwsyKqPIglM3J8+MBMyb1yU4hh4JcH8vys4OrLQFmz7xttZc2onq/E8 6hH82h+RQKtHkvX6OnHf9hUtpC4QwaunGspsRNREHlLXif/5mOXgI6uZNsjPmBqbqqeB oTxQ== X-Gm-Message-State: AC+VfDy49eqEjkH50gVbnU3nBoTTipI2klwsX+ZNZjK/rOjUWfSSASa0 +HRpan0BTE03of6jnLl51bpADhc/f53CgNjLuuMdiEPCc9Q= X-Google-Smtp-Source: ACHHUZ7eSsJDrWcPrQr1mRc9bH/pYLPQp+lMWkjBQRHPKy1lCBB/577kPLxZ9rVLmqppPnY/+ZLXEaAr3KQsDWjSFMo= X-Received: by 2002:a05:600c:2042:b0:3f6:6da:3ad1 with SMTP id p2-20020a05600c204200b003f606da3ad1mr2931160wmg.34.1686953952847; Fri, 16 Jun 2023 15:19:12 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=jlambert.lis.tech@gmail.com; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143962 Archived-At: 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