From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: Make format-spec accept a function as the substitution Date: Thu, 29 Sep 2022 05:59:48 -0700 Message-ID: References: <166336105908.23797.12319380359602540227@vcs2.savannah.gnu.org> <20220916204419.B124FC00872@vcs2.savannah.gnu.org> <87edwavjyc.fsf@yahoo.com> <87wna1tr7z.fsf@yahoo.com> <87y1u51ddf.fsf@posteo.net> <87edvwrfg7.fsf@gmail.com> <83wn9oixdr.fsf@gnu.org> <83tu4sivtq.fsf@gnu.org> <87fsgatzvo.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31686"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , visuweshm@gmail.com, luangruo@yahoo.com, emacs-devel@gnu.org To: Stefan Monnier , Thierry Volpiatto Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 29 17:08:21 2022 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 1odv9A-0007xT-HO for ged-emacs-devel@m.gmane-mx.org; Thu, 29 Sep 2022 17:08:20 +0200 Original-Received: from localhost ([::1]:46296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odv99-0006QP-HV for ged-emacs-devel@m.gmane-mx.org; Thu, 29 Sep 2022 11:08:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56328) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odt8s-0000oU-5R for emacs-devel@gnu.org; Thu, 29 Sep 2022 08:59:54 -0400 Original-Received: from mail-oa1-x29.google.com ([2001:4860:4864:20::29]:34542) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1odt8q-0006yo-Ko; Thu, 29 Sep 2022 08:59:53 -0400 Original-Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-1280590722dso1714919fac.1; Thu, 29 Sep 2022 05:59:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date; bh=sCcvTvcUtegXDQJZNxc/0f10/WzYd9sOcvEAY4rg5gI=; b=Jb/He1w3VT6Lra3ONQzNUIWxRxjUI8vUl9LMRhFQui/PO1SqNI6Gp4ubk9Tgx3Dzgf nyAmwhZR9neciAEXDj3B8y2Z3FxoRMs7QV6NF80gBnUBb2Xec7I8Tj5wyZO2CD7yJoqP L/ZUPR9mueWKFvcoT1gPcAaUImGg+yVjdAk30nTD6Hd6L4DS5xzcGX/yDW2J1ZL/Hk5C MjSuKhO2BW0aoiethW2E+qAjAIhajf676MCJ2usMjbRDljTQG/bjv1vLcRZ4iICUR7dy Tql1FhbOP0tVmEJmyp4mRUfPQazjuRzcdtBkD+aIQhh7OnxlilqxEngBDfjdIf2Fg/WU Znbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date; bh=sCcvTvcUtegXDQJZNxc/0f10/WzYd9sOcvEAY4rg5gI=; b=lg9zuSHiBTEdUl5RZHxrnNzRZCuB6mDa9Y0yUrLbeiOBcIegEU4cqjr/ws5ZByP0tc 8vvVUNnfAvEcnF7aABI/UiD4ycQ2claUPYuc1EY5/4HovLX7d8sKXxT/RmxBcHdQmK+e 7GRIdDOA/Ftxka6k+KlpmGWS1jdyHb//lU5jGVMl2/X9sxt9afCsAAVWiaCUTPjU1tME rLQPNoS1a55WdhKdo4yRIdvUTRWq5P+XL8TfEQNVeWn7t9s01JVYezMgV1hMmxc7y1Z2 eszx3IgQ/24oGNfBns/gzr9oJDkaJq6YspXCLyn6G5qEGO/w0ytIj454XKoI33y5MMzd QkdQ== X-Gm-Message-State: ACrzQf16DyZEUrkAsXELoJMIxZtgG9NYn79iVj4TeBAxt9i5BYB3yDQG 3eMwWeJlNa5F18LP/lyl7MiIP0pYUS5OqWZjDTY= X-Google-Smtp-Source: AMsMyM4v9OtNVjIVxhgsXDt6QhMu57vxh17JAmu+KnnFfiteiZvbljo3+hykHPBWvCxzbvGPdlalKPKTo8loyWRzjjw= X-Received: by 2002:a05:6870:b508:b0:12d:1c59:90d9 with SMTP id v8-20020a056870b50800b0012d1c5990d9mr8367820oap.199.1664456389613; Thu, 29 Sep 2022 05:59:49 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 29 Sep 2022 05:59:48 -0700 In-Reply-To: X-Hashcash: 1:20:220929:emacs-devel@gnu.org::aCLa4iqKQGhW9+Ye:2AVk Received-SPF: pass client-ip=2001:4860:4864:20::29; envelope-from=stefankangas@gmail.com; helo=mail-oa1-x29.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, 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-devel@gnu.org X-Mailman-Version: 2.1.29 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:296461 Archived-At: Stefan Monnier writes: > Code should be quoted with `lambda` (which you run with `funcall` or > `apply`), not with `quote` (for which you need to use `eval`). > > So we should aim for a source code of the form: > > (format-spec "Go to line %n in file %f %g" > `((?n . ,(=CE=BB () (read-number "Number: "))) > (?g . "now") > (?f . ,(=CE=BB () (read-file-name "File: "))))) I agree, which is why that's what my patch does.