From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: daanturo Newsgroups: gmane.emacs.bugs Subject: bug#49316: Add apply-partially's right version Date: Mon, 5 Jul 2021 11:29:15 +0700 Message-ID: <03694a85-9f3c-78d8-d06c-8bd5c6fae297@gmail.com> References: <2315db79-00cf-b2f0-b5df-93cd53392292@gmail.com> <87r1ghr7d1.fsf@web.de> <5a08f089-3a19-d747-5098-4751c92a5b79@gmail.com> <875yxsxfit.fsf@web.de> <8b10e4966ad9a1f621b5d9a6b069c7c7@webmail.orcon.net.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1276"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 Cc: 49316@debbugs.gnu.org To: Phil Sainty , Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 05 06:34:45 2021 Return-path: Envelope-to: geb-bug-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 1m0GJh-0000DN-Mk for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Jul 2021 06:34:45 +0200 Original-Received: from localhost ([::1]:59024 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0GJg-0000dh-Nf for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Jul 2021 00:34:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39550) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0GF8-0007na-Vs for bug-gnu-emacs@gnu.org; Mon, 05 Jul 2021 00:30:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60246) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0GF8-00061h-Mn for bug-gnu-emacs@gnu.org; Mon, 05 Jul 2021 00:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m0GF8-0007v4-Dt for bug-gnu-emacs@gnu.org; Mon, 05 Jul 2021 00:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: daanturo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Jul 2021 04:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49316 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 49316-submit@debbugs.gnu.org id=B49316.162545936730373 (code B ref 49316); Mon, 05 Jul 2021 04:30:02 +0000 Original-Received: (at 49316) by debbugs.gnu.org; 5 Jul 2021 04:29:27 +0000 Original-Received: from localhost ([127.0.0.1]:43559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0GEZ-0007tp-9B for submit@debbugs.gnu.org; Mon, 05 Jul 2021 00:29:27 -0400 Original-Received: from mail-pj1-f42.google.com ([209.85.216.42]:39817) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0GEW-0007tb-Dc for 49316@debbugs.gnu.org; Mon, 05 Jul 2021 00:29:26 -0400 Original-Received: by mail-pj1-f42.google.com with SMTP id in17-20020a17090b4391b0290170ba0ec7fcso13737463pjb.4 for <49316@debbugs.gnu.org>; Sun, 04 Jul 2021 21:29:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=bOhFkCGbYkYEmEL7+67yhPnZz9nadqB7K+urZPBG68c=; b=GT0ub4uAcHKgYSCIElQDzT8XP47ZUj9ceGne+7L4M+X/LsGZPv/PdVb0Jzbb6eldWv N/7VosXtYaQlUc0S3TZLFoz1jF9cDDwKxeXnac7JrjS35TMTX57NODXfMTjz7jtJgM8q hrvj1YhfkSkijxRQE99nlImRetBD1jhCKGz5O5VOz3mL4sqvWh+Ui0MQ9jphBxhzvX/d P0pDrB0qTzkCN25Mx2iBBxPfZm8phvCCSfm2iYxUN/rBDU+gwC+evC8gaaa3O9B3zCet apo+Wis67XY2wwr54Gw9E8hsk3bZ65738ZxHL8HXcn/+vr/4yolceJ8jEJ8DE3tC5igx aA4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=bOhFkCGbYkYEmEL7+67yhPnZz9nadqB7K+urZPBG68c=; b=hlNliIlV8WeBPmbisW5N2WLZshoq0SWmhzbjUZmgn2CDYdG8bQSn2406spKuZ4dGF9 b8kOxOHQmZT2Di9edY+XQKUlNXHWpf7yP/i1A8SQihx4ls46QKgX4eamzIjW3/FCM2bX CZ0inUhRrnQO43109oEUIjswGnyEyRv1f0fX3JoCMT4JbO2ZFZJkLi2wHurvColc5P6M cwGBSXn5yGFtKbaiaePIcKlFkBC1Rc0g0sXr6JvaS8j4F2WQqSTUNMMibNvmVIQeTADD 8qYdctclRk4hs5Xo35h19JwwhZSr/poiVi4r+HB8T+UR1bIj3uFQ9q9KbcDF1o4aK9Cu VcdA== X-Gm-Message-State: AOAM531d5b3QwG/DTYRB3U9+lCGwPsqaL+Uq0+tPbTyEyVbU4UxNYEQ5 1goJtwFk5tQQBqbmlu7ze2ZgpRmHBXu8QA== X-Google-Smtp-Source: ABdhPJxmq6zrpy4vLsdicmNFkip5k4Z2wdCCeYXzXibRWqml8mdvYJV2Q0ulz9vc0SVbGxwLh+1Tvw== X-Received: by 2002:a17:90a:454e:: with SMTP id r14mr13288194pjm.71.1625459358350; Sun, 04 Jul 2021 21:29:18 -0700 (PDT) Original-Received: from ?IPv6:2402:800:630f:53b:ee3a:5256:1634:1e03? ([2402:800:630f:53b:ee3a:5256:1634:1e03]) by smtp.gmail.com with ESMTPSA id k20sm19569528pji.3.2021.07.04.21.29.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 04 Jul 2021 21:29:17 -0700 (PDT) In-Reply-To: <8b10e4966ad9a1f621b5d9a6b069c7c7@webmail.orcon.net.nz> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:209438 Archived-At: On 7/3/21 9:13 PM, Phil Sainty wrote: > On 2021-07-03 15:06, Michael Heerdegen wrote: >> A placeholder (e.g. the symbol `_' which should normally be unbound) >> stands for an argument that is used from the args provided in the actual >> call: >> >> (defalias 'my-list-with-some-elts >>   (applying-partially (list 0 _ 2 _ 4))) >> >> (my-list-with-some-elts 'a 'b 'c 'd) ; => (0 a 2 b 4 c d) > > I like the flexibility of the placeholder approach.  I'm not > sold on the extra parens used here -- I don't feel too strongly > about it, but it's inconsistent with how `apply-partially' is > called. The author has mentioned that the reason for being a macro with extra parentheses was the ability to work with `eldoc`: inside the inner pair of parentheses, we can look at parameters suggestion which is normally not possible with `apply-partially`. `applying-partially` is bit confusing given the name of the existing function. To differentiate it, can we name this macro differently? Like `any-partial-application`, `partially-apply-at_`, etc. -- Daanturo.