From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adam Porter Newsgroups: gmane.emacs.devel Subject: Re: Improve `replace-regexp-in-string' ergonomics? Date: Wed, 22 Sep 2021 17:56:56 -0500 Message-ID: References: <878rzpw7jo.fsf@gnus.org> <8735pxjabj.fsf@gmail.com> <87mto5ja0y.fsf@alphapapa.net> 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="36102"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 23 00:59:23 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 1mTBD1-0009Cz-8A for ged-emacs-devel@m.gmane-mx.org; Thu, 23 Sep 2021 00:59:23 +0200 Original-Received: from localhost ([::1]:60778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTBCz-0000Cr-AK for ged-emacs-devel@m.gmane-mx.org; Wed, 22 Sep 2021 18:59:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42288) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTBAt-0007ug-5A for emacs-devel@gnu.org; Wed, 22 Sep 2021 18:57:12 -0400 Original-Received: from mail-lf1-f45.google.com ([209.85.167.45]:35792) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTBAr-0006Qi-De for emacs-devel@gnu.org; Wed, 22 Sep 2021 18:57:10 -0400 Original-Received: by mail-lf1-f45.google.com with SMTP id m3so18545560lfu.2 for ; Wed, 22 Sep 2021 15:57:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xL7/dykqpfGFv0BeNDSiJMjlLnJT06IaetFW6pxt9xc=; b=oSqEaA+oBRLHNlVXz7Ayf72cnVzUI/3x/1Z/cej4I6o8CLkgJ50idopFPO/4xiSlp6 JUteMG7MJSx2Exiita4/S7dFSLWPJbj3GuIanulkltEVseToYCNBuvFMwrvS6OvAGLHj MAtNCMZG6BKJ+HMBs1gIZvAT4GUHPGp3GkSquI7/CWSWJLOsnkQFO48BNTdOEumzbzPs lTSIx2RXpmwU3RhNPwaytwuvwFZsj3y8fXuIXQ9zAFyz9rNX/ODb+Ez/36F6j78oeG3/ /TZ5XwTsDtGqbP6NdU34IH7EaVv0919Kd+5Q4199Z3vkJreIyABQkDmTbexkPJdOHmUj wPAQ== X-Gm-Message-State: AOAM531jSACBF5JN4d9gVNNwvxIZtINsOXSFfB5RJ94MyQzdlieKfQQJ qGvHh06BKZeUJAv9fkAX1yXQu5CHk7QCxyltAjvuP2ahxFM= X-Google-Smtp-Source: ABdhPJyokHoCq0RwS3IXvLpWxWNVcIViW0Ny/iUKOGh+f7ut1Ku58+2LJN0t+uPhb3ZILylLkh5mHLO+PSpdjZ+e//E= X-Received: by 2002:a2e:b894:: with SMTP id r20mr1821839ljp.291.1632351427515; Wed, 22 Sep 2021 15:57:07 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=209.85.167.45; envelope-from=alphadeltapapa@gmail.com; helo=mail-lf1-f45.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:275345 Archived-At: 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? :)