From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.devel Subject: Re: Improve `replace-regexp-in-string' ergonomics? Date: Wed, 22 Sep 2021 19:24:56 +0100 Message-ID: <87k0j8pix3.fsf@tcd.ie> References: <878rzpw7jo.fsf@gnus.org> <8735pxjabj.fsf@gmail.com> <87mto5ja0y.fsf@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33694"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Adam Porter , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 22 21:03:31 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mT7Wk-0008VK-SQ for ged-emacs-devel@m.gmane-mx.org; Wed, 22 Sep 2021 21:03:31 +0200 Original-Received: from localhost ([::1]:47834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mT7Wj-0006yC-DA for ged-emacs-devel@m.gmane-mx.org; Wed, 22 Sep 2021 15:03:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mT6vY-0002Rm-Rv for emacs-devel@gnu.org; Wed, 22 Sep 2021 14:25:05 -0400 Original-Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:42830) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mT6vV-0002ln-7B for emacs-devel@gnu.org; Wed, 22 Sep 2021 14:25:04 -0400 Original-Received: by mail-wr1-x432.google.com with SMTP id q11so9573088wrr.9 for ; Wed, 22 Sep 2021 11:24:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=o0OXy6VGFnpfEnH70t0IJzwDnNrCSn/L4LC8pRz+H1g=; b=BrHkrZjgDOKzjG9GkQwzCIMd0Xn6/TL9S9ipHmZ4Hsk9p1V2JF6D6csy2AheVuVY8A voDlaGwLw4kaUQ0SRSmn1d4m0MTO/fvReXb+t0PFoz9yxuwf2k3t+gze58qWIpqAO5GE Af1YSYaXFwnXkkcihQ9/xK5YMXgYfbhWNtynvaXNg+KEAoNGazHy2l1uWXrvq7TjYrLx d1oxii1GTiNDz8bFsp3ipg7ENlg0Na1jQ3a4B6EPGUoIt3B5u7Q1Ant7E26phsFdEbIl zpxz1btIvya8oXTtPKQZQh9bOt0HoEdCElK7eJYfHk48zjw6JN5eE0zlhtqarwtJFrWX W62g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=o0OXy6VGFnpfEnH70t0IJzwDnNrCSn/L4LC8pRz+H1g=; b=EIq2qtmZ0zQhjorPNfJoMVxD3im/VXyHYeYlXl/8psX9zbK+QfSEbL0AfccasMhHuF pJaspzm2jksY8BgiIVHqbu9KXxJvyPw1Fpf/1Ij+7JHD/IFW9zNB4usAz26YvcKM2hem LNQESNxf4JlplN14T2Pn6Zn4G55abvdSyegzX7Mb3MZhNFkPNiX2olNrKRLYQP4ntnRo HCFAV0tobhtUsbH9TPIc6yp4X8LAnosc/vlnFzpYkstr5DyeSm+AD3Kl7UKPfw32e8pF J1LtGBt7XrFyIbFlh95iZwgFVL8HLuXOoNSFXblrhR/ncYNlDa5Iiz8eT6WoB3pysUUy hGQA== X-Gm-Message-State: AOAM530Ixi0bNC//Uh2dg9T29X/TL+VK6Yqd5TNS5jTCxCLah/coIEtd SsI5log5cgu4RQagFS7ZZoM5H1Ta8h1xKA== X-Google-Smtp-Source: ABdhPJwIT3VV+qoVZC1jyou39tTMkl1gTbNlxDwQXTWIWnD423zLpkOsN2Hx1nam5AOuFh3I0X5/wA== X-Received: by 2002:a5d:510b:: with SMTP id s11mr434567wrt.79.1632335098250; Wed, 22 Sep 2021 11:24:58 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:d15:339e:aa10:60f1]) by smtp.gmail.com with ESMTPSA id 61sm3009390wrl.94.2021.09.22.11.24.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Sep 2021 11:24:57 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Wed, 22 Sep 2021 14:01:48 -0400") Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=contovob@tcd.ie; helo=mail-wr1-x432.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:275332 Archived-At: Stefan Monnier [2021-09-22 14:01 -0400] wrote: >> (thread-as NAME EXPR &rest FORMS) >> >> I considered proposing one recently, but it seems like anaphoric macros >> aren't popular around here. :) > > I thought "anaphoric" is used for macros where you don't specify the > name of the variable (it's typically the hardcoded `it`), Someone must have confused the words "anaphora" and "anathema" ;). > whereas IIUC > here you do specify it. I don't like the usual anaphoric macros, but if > > (thread-as FOO x > (bar x 6) > ... > (toto 45 x)) > > turns into > > (let* ((x FOO) > (x (bar x 6)) > (x ...)) > (toto 45 x)) > > then I wouldn't consider that as "anaphoric" and so wouldn't stay away > from it. That would be a lot more hygienic, -- Basil