From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: Improve `replace-regexp-in-string' ergonomics? Date: Wed, 22 Sep 2021 16:53:20 -0700 Message-ID: <87y27oyxov.fsf@ericabrahamsen.net> 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="8326"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Stefan Monnier , emacs-devel To: Adam Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 23 01:54:15 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 1mTC47-0001ul-DH for ged-emacs-devel@m.gmane-mx.org; Thu, 23 Sep 2021 01:54:15 +0200 Original-Received: from localhost ([::1]:44378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTC45-0004sE-Ff for ged-emacs-devel@m.gmane-mx.org; Wed, 22 Sep 2021 19:54:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48272) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTC3Q-0004Bn-6B for emacs-devel@gnu.org; Wed, 22 Sep 2021 19:53:32 -0400 Original-Received: from mail.ericabrahamsen.net ([52.70.2.18]:58300) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTC3O-0001oo-At for emacs-devel@gnu.org; Wed, 22 Sep 2021 19:53:31 -0400 Original-Received: from localhost (c-71-197-232-156.hsd1.wa.comcast.net [71.197.232.156]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 6B27BFA024; Wed, 22 Sep 2021 23:53:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1632354801; bh=SnaOx2bk+vWDiGdlC2Tbjg8pjFquBFjohVISJU3aPZQ=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=RTZC80whpMExMhlK9AAO6WGha/rgSFxGx/oCZgMtrULZlWuFnzM4o9FHQ66nzJ621 nHnF78xDG0/ynb7navfLth+1LEQWMSFKyh6MsACWsMvzY+qxuZSaqxqDFIS/nAHdM0 mMsjxzKeES+6UJ4eM0rcCGwTrj0qc6zzBowKXOec= In-Reply-To: (Adam Porter's message of "Wed, 22 Sep 2021 17:56:56 -0500") Received-SPF: pass client-ip=52.70.2.18; envelope-from=eric@ericabrahamsen.net; helo=mail.ericabrahamsen.net X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, 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:275347 Archived-At: Adam Porter writes: > On Wed, Sep 22, 2021 at 1:02 PM Stefan Monnier 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`), 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. > > Maybe we need a new name for that kind of macro, then. Euphemistic? :) Eponymous!