From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id WBMEOSFLBWDfcAAA0tVLHw (envelope-from ) for ; Mon, 18 Jan 2021 08:47:29 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id qOaRNCFLBWD2DgAA1q6Kng (envelope-from ) for ; Mon, 18 Jan 2021 08:47:29 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 51126940341 for ; Mon, 18 Jan 2021 08:47:29 +0000 (UTC) Received: from localhost ([::1]:60442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1QC6-0002aQ-RX for larch@yhetil.org; Mon, 18 Jan 2021 03:47:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1QBS-0002Yz-AJ for emacs-orgmode@gnu.org; Mon, 18 Jan 2021 03:46:47 -0500 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:37479) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1QBQ-0006LL-T8 for emacs-orgmode@gnu.org; Mon, 18 Jan 2021 03:46:46 -0500 Received: by mail-pl1-x62f.google.com with SMTP id be12so8269881plb.4 for ; Mon, 18 Jan 2021 00:46:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=VcQ7ytQVOgv9oJx3IDS0p3ScfVzdwxb/i5lvfYRpVUY=; b=nvERx6+b5Cbxn65rIyDzo60G41d1oDefoVueAGrXQYk8HxGfeKdYAs5jHECu4v3JpL gTCAg7jo/K8RktewgTOeCoZjYy7X8KezGrlWXjXyHTHQOmWRyoWzZ5yN6u85TCk41HE/ dGWr2EwhAEioijsxCNBiqVtnpPJkbI6/p6q7F/wtmPEG6TEZGHvkLaOAa/XS7a+WiGTi tl9C+X6Anqq+FcyCzYfvuklHgfM1HgGRD/8HYerfsnF8M1QpLudmaZq9xXLqVocKVYGK 0t30rICYvR9uQSjuUj9GQ0FZHHIrZ2Z87J+rTFSF3+gU87mDF5voAliN3wTNi69afB2O Ou/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=VcQ7ytQVOgv9oJx3IDS0p3ScfVzdwxb/i5lvfYRpVUY=; b=mWJCpwJif810k2WyChRVTAzbNOGPHirWaz93bfEA7Cet+HHKomO19UQCpt29uo21wM 7xR6N3bOteNYjpbafMXfrQzC60hat/9vVRosL2KpcyDamyVOmHh6ezHE740sYM1yq9Qp M3/glKELNd/3PUhe+mnYEefbChjHpG1b9rjyWcWwHWU0dmXaCSJPrVrTYaygRPiavB/t pjZFOumt10sIQe+wv3WW5ef0Nh8R1NgpeeUbNxFYQ3S5Nw2yY/v41NG15Ucx1Zc0QglD dksEzn974yiiT/qUAmT7bolIGgmP3TknsAL5wQalJ7L/K6LnEOdTiO+PdW0l7u74Ldb9 n+OA== X-Gm-Message-State: AOAM531OkXrsd7bKgB27pVXFEhO+8ILaS6bkEncJxBWf7W5yQEuaXJ0D ykzzGkweT4Q2GB1veT5X/xXKHaBF9RD2MA== X-Google-Smtp-Source: ABdhPJx1AvYOSC+JFosMBD6GyqLxi9rXw5EfeUWXdyZ8IOvdsW6a3TIOSks0cCkvSURWvx0PrPWjFA== X-Received: by 2002:a17:90a:2e82:: with SMTP id r2mr24570977pjd.46.1610959603095; Mon, 18 Jan 2021 00:46:43 -0800 (PST) Received: from localhost ([104.250.131.79]) by smtp.gmail.com with ESMTPSA id 82sm15796987pfv.117.2021.01.18.00.46.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jan 2021 00:46:42 -0800 (PST) From: Ihor Radchenko To: Kevin Foley , emacs-orgmode@gnu.org Subject: Re: Custom Bulk Functions With Prompt In-Reply-To: References: <871rekxgpf.fsf@localhost> <87lfcrvvro.fsf@localhost> Date: Mon, 18 Jan 2021 16:50:48 +0800 Message-ID: <878s8qwrvb.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=yantar92@gmail.com; helo=mail-pl1-x62f.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, 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-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.06 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=nvERx6+b; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 51126940341 X-Spam-Score: -1.06 X-Migadu-Scanner: scn0.migadu.com X-TUID: gj4xWi7O3mAH Kevin Foley writes: > + (`(,_ ,f) > + (when (listp f) > + (let ((args (funcall (nth 1 f))) > + (func (nth 0 f))) > + (setq f (apply #'apply-partially func args)))) > + (setq cmd f) (setq redo-at-end t)) That will not work. pcase will not even match list of 3+ elements using `(,_ ,f): (pcase '(a b c) (`(,_ ,f) (if (listp f) "List!" "Not list!")) (_ "No match!")) => "No match!" You need to add extra matcher `(,_ ,argf ,f). Best, Ihor