From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#59559: 28.1; `minibuffer-with-setup-hook' with :append Date: Mon, 23 Jan 2023 03:14:20 +0000 Message-ID: References: <87pmbmnvdd.fsf@web.de> <87358iuqsj.fsf@web.de> <87edro6jl7.fsf@web.de> <837cxflm9c.fsf@gnu.org> <875ycz7hvt.fsf@web.de> <835yczkt4k.fsf@gnu.org> <87h6wip0ly.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16309"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , "59559@debbugs.gnu.org" <59559@debbugs.gnu.org> To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 23 04:15:18 2023 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 1pJnIi-00044s-MR for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Jan 2023 04:15:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJnIV-0002Sv-V2; Sun, 22 Jan 2023 22:15:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJnIU-0002Sn-TN for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 22:15:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJnIU-0004gw-K2 for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 22:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pJnIU-0004aE-5g for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 22:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Jan 2023 03:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59559 X-GNU-PR-Package: emacs Original-Received: via spool by 59559-submit@debbugs.gnu.org id=B59559.167444367117561 (code B ref 59559); Mon, 23 Jan 2023 03:15:02 +0000 Original-Received: (at 59559) by debbugs.gnu.org; 23 Jan 2023 03:14:31 +0000 Original-Received: from localhost ([127.0.0.1]:52920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJnHy-0004ZB-QD for submit@debbugs.gnu.org; Sun, 22 Jan 2023 22:14:31 -0500 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:8734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJnHt-0004Yx-6M for 59559@debbugs.gnu.org; Sun, 22 Jan 2023 22:14:29 -0500 Original-Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30MNS5s4004936; Mon, 23 Jan 2023 03:14:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=kWDoZs5SB6TZlGSr7+AXy0n3rxQWdSPzganaFr9ZTx4=; b=ChJNYeejq0XGQ/BGJpPG8P/BzqpNPh0adQmMbvdOVHrg8yhKnMqGbvOZ6BXaB/hszB5P Vom85T83hiCtAhpinTWoo6ARoyumI6NMSTIh9ZMeCP9V6N2H1q9u0yk1Mxo1Mq1gqoBF NlUAFBBKmCxzqQ4pzaxqlab+8zIsfgUbYCxvpimBMkmXzq2gjLohK1uOrC7J0vpZiSWX nU7hFckkVASuquc82pe3zLwJvr/Oy21z2oZe4xj7ejlx82CXGNqLDf4XuEFPAQzI5MbF 4JzIRtEvP5IW4urp05kfQZ4nhAeq5LySTEiH/Tt3dSFZ5F4g37yCRMigZXcdGW++bde/ IQ== Original-Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3n87xa1tpu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 23 Jan 2023 03:14:23 +0000 Original-Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 30N2CtJt034289; Mon, 23 Jan 2023 03:14:23 GMT Original-Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2045.outbound.protection.outlook.com [104.47.74.45]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3n86g2ysdb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 23 Jan 2023 03:14:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MK2lJ3Kj+BYcdJ1b4Ln4cEjSlCMCzrlo2may8EiVzif+2igU8DzO0VssnldZuoSx/g3usJf0bk1V5ZxfONIG9C4biXEc7V35tsrFU3x+Jv3Vj73EtBFbntpLnaDnz68mariB1xih2lz6+L0PYmmFXbbRCoNaDIoiOURmyYC8nT6/ijd5iim5+RsZfXRx3i3N2yI+SWiHpUFyTKM0i1VF4x+xjcthnYDHeV/TPDwGT5wFCb5gp2B2zsJ8971FO87JTiQxUuGdTfFtYy5W6sWt3t9vcvRxcU1EkFLy+MCfmSRpIkZODKcJLaP5AIKxAzsEGT12ofKSevnMaqRyNTZHww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kWDoZs5SB6TZlGSr7+AXy0n3rxQWdSPzganaFr9ZTx4=; b=XAaP7cb9KCJ8tcQyK2AyLJHf8hX+h5LN0g5u6sF7qnSDDpf9IL084r7tZ4XOZaqj/NF9cUiOuhVgnHv8ruc0vgycHvdN9Djvkct9gzm5dIZ8m1XIBOp4KMRInkJCCwBwCDG40D/KIdTyQMs2oMsmc1gNd9G93Kp5XBv/nGemKwi8hgKnUzyIB1a7ut6Zmfy4Erz2heEQd6NsYRZ26rvJACfGDeQ1LcrWYUOKnGL0b62mur7pTZyBPp8xy51EzlT/zF9MRweRXlJUrFkTvUzEP82QI3WamG5JyZqO9hz23vj0oZKRfaYhdQkYVnMh6dIEb9EF0W9glQhGrdt5ILmpow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kWDoZs5SB6TZlGSr7+AXy0n3rxQWdSPzganaFr9ZTx4=; b=tvaTglFqbZy/SguAltHocpFKVTOAWXz8cAbUA8Oahz+5wBZtoj8BnJ2TeujHTPxtoo2UGmIeYzCGe9QNvXujl41gvcm29d6kWFZbhaUs5zhJriR113RJa/FnX3GdhbQBAG9sZa4dt6ttm/3FYSTzyhjV28b+C6d+mzuCX7/E21w= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by CO6PR10MB5792.namprd10.prod.outlook.com (2603:10b6:303:14d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.9; Mon, 23 Jan 2023 03:14:20 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::7c3c:e53d:5276:ef29]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::7c3c:e53d:5276:ef29%7]) with mapi id 15.20.6043.014; Mon, 23 Jan 2023 03:14:20 +0000 Thread-Topic: [External] : Re: bug#59559: 28.1; `minibuffer-with-setup-hook' with :append Thread-Index: AQHZLr/XFZghXt1fykCP+DBnzjEWsa6rSL/Q In-Reply-To: <87h6wip0ly.fsf@web.de> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|CO6PR10MB5792:EE_ x-ms-office365-filtering-correlation-id: 00dd0d07-6765-49c9-22bc-08dafcefeb9a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jmDG06PUM9hpv76FkU08A2IA5rgcHfi8l2Jo4sp6BDvGOU5LWDe0OEXigtGeqYMD7zchT+r5Rma/rmdIj9KUGCFpXMDTURO/SSKr9FP76+5ScmT50Z26O6sqZhqr0zhjGhGhykfrcTGz9Plrz3tJ9Xs+kH/ahS/+IGkePumLAVHmKMLLvLgrr2EcQCxPBvysoSTrJ9fScGiRI+bixvEhA7QH9U0fPM6y/+Xkk94X+2NucaruMaVYnxlMhrLXhTG+HSVUV9uXohCzT2HXM9l+IZnGIGwrU+03eRwYEuzBF7DVIjVvwPbGTByUdD0TtNScr3r1FIsvdXLLWcGQJWVjDGl64hYCfM8yDRpWpMIGQshbr8iK7+5RGBvEsoSU0KltcQCtOBGSRnW1KFRPc91iQXeSB8aHPgQPQzxQs/bF61G8B6P8lPkJHw/jGxWy7KvoP+G1vJKuKUJMsd+NoZMQSS8YdvwJaKtaS1SRf92Ht5BVAkLPjudsx/Et+voD7Gx9T/b3FzESfSu7Hn9b6U9xADX4VI4fWzaAPW4peMEZ/ShW0U6ztIYANT7pjAMlZEjxpuzNZ2o4YXLwKtC9+31mgKN0t6w/EsKTxH6S4aNxa6yoZPg+wqe5EGY44KMrHfrnYlzjftJYv84oPnHTe/7JfP3XZsN9Sv84It/RBxcKAMxolJDtxJ7f1cirlwkealM4zyuzUk7wWBtCVO4itKVhpUySeAenABHUnrTvOB8iFbo= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(39860400002)(366004)(376002)(396003)(136003)(346002)(451199015)(6506007)(122000001)(38100700002)(71200400001)(7696005)(66476007)(4326008)(76116006)(8676002)(66946007)(6916009)(66556008)(64756008)(66446008)(478600001)(26005)(9686003)(186003)(8936002)(52536014)(5660300002)(44832011)(2906002)(83380400001)(41300700001)(38070700005)(33656002)(55016003)(86362001)(316002)(54906003)(81973001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: Yw19hDcCNY2eDm5YXyuXdLOI8GSmdD/R/fKWT0B9Mo0XKcy2KnAa27c/BSom4i32552KZH+Hr1r22UVmy7wQPVP3RBRiv2wwNxc1l5fn6xHfzuamcwO5UmEOoLOVnyJrjfPUIG2NzDFxz0Si+0kqlIfXe11PfvqiTHrTMYgSNvItLz3Z6TVrajNdfcKBOr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uhnB4PD4ad7+mobftAmh+lrSdh5h/N5d+eCut/F44GJXmRCBMLXGpUuF334xwOOTuEKg7R+kCBS0N8VKWLl1NYhwq7vxwpnjwllIMC9HVjhjKAUpCbLZ8Cgzqokqfot3BAwu/2nKg+6H7AFI8dV464kETRS4TIa8cUWfpI78m1ZGp0tbrOpdt6EhGQjSOmN+P9u8MqUzehl9Hu2ooVGLvPspB/M5cKcCmM8Ri0r5weHxQ++VWgiHFJoNR4eNOWzdZgRYPFT3A5HDodNfcgvVqzHfQQ61/8lKdDYHDrjxE2y1RHqi2ZsB3MyoO+mUcV8sBSMLrU880NkFwQni4kdB/owYijZDGurzQye0W+kzBjo9sFHNKkw2nsw3RtG+RoGdLOMJoYz/6mkwotSg4ncOIRauerABEPTLSbBbCBnXTv UfaC7wRxO14zQTklL1PqgO+/mYKjo6gNOsxKRZe66x/NoDNktYCVos4G3nuNE= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 00dd0d07-6765-49c9-22bc-08dafcefeb9a X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jan 2023 03:14:20.6008 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: emXan76VN6iE5aHdJMfFRnzQDl7InGO7EHC6ANg1bR4ccvDvUW/d/hXdt2R+UagCttdIehUpjz+6pQi6S5r8/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5792 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-22_18,2023-01-20_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 bulkscore=0 mlxscore=0 mlxlogscore=525 adultscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301230030 X-Proofpoint-GUID: 9Epdv0UmUSnmkhQDpc6p9jrLDUNno4Dk X-Proofpoint-ORIG-GUID: 9Epdv0UmUSnmkhQDpc6p9jrLDUNno4Dk 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:253972 Archived-At: > Well yes, I know, I expected that behavior after reading > the docstring. You obviously don't. >=20 > Nowhere is said that FUN should be a function _name_ or a symbol. If it's not evaluated, and we say that it's added to a hook, then it must be a sexp that represents a function in some way, no? What kinds of sexps represent/name functions? Lambda forms and defined-function names (symbols). (And maybe someone could think the symbol name does also.) > Unless stated otherwise, what you specify as an argument > is an expression. But given that assumption, what expressions are expected for argument FUN? The doc says that FUN is added to the hook. Only functions are added to a hook. So FUN, the sexp, must be a function? A sexp isn't a function, and a function isn't a sexp. So one guesses that maybe it means a sexp that _represents_ a function. OK. What kinds of specs represent functions? You see where this leads, I hope. Is that sexp evaluated? Do I quote a function name or just pass the function name (which certainly represents/names a function)? That info is missing. It's not enough to know that macro args are sexps. And then we get to the part about the other, more particular form of spec you can use for FUN - the other sexp that represents a function, (:append FUN1). Here we're told not that the whole thing (which is FUN from the signature and the first line) is added to the hook, but that FUN1 is added to the hook. So already there's a contradiction from the the first line. Even so, now we have that the FUN1 sexp part of the sexp (:append FUN1) is actually what gets added. OK. And we're back to the same question as for FUN: a sexp that represents a function. Is it eval'd? Quoted or unquoted function representation? Doesn't matter for a lambda, but does matter for a function name. Note that the doc string even goes to the trouble of adding the detail that "This macro actually adds an auxiliary function that calls FUN, rather than FUN itself, to 'minibuffer-setup-hook'." Is that so important for users? And yet we don't want to make clear whether the sexps (FUN and FUN1) that represent functions that get added (oops - in an auxiliary function) get evaluated, i.e., whether you pass foobar or #'foobar? Why isn't that important to communicate? The doc isn't clear, IMO, and it doesn't help to say that if a reader just understands that macros don't eval their args then it should be clear. > Here only with the exception that two syntaxes are > possible, the alternative one is a list, like we e.g.=20 > know from cl arglists. I see a vague here with CL keyword args, if that's what you're suggesting. But CL doc would never show the lambda list in a way that doesn't make a keyword arg clear, and it would specifically call out the use of the supported keyword arg. (And of course, Elisp doesn't have or allow keyword args in a lambda list.) > My patch tried to make that part clearer: the argument is of the form > FUN or (:append FUN) (an macro _argument_ described as of a certain form > always speaks about the unevaluated s-exp), and FUN is an expression > evaluating to the function that will be added to the hook. Yes, your text was a big improvement, and yes, you tried to address the problems I raised. My only comment was a minor one: to avoid talking about an "unquoted list". And I pointed to another problem: is it true, as it is for `add-hook', that the function "is not added if already present"? If so, the doc should say that. A reader can't assume that that's what happens - there's no mention that `add-hook' is involved, for instance. Neither of you have spoken to this question. I think the doc should make clear (explicit) that there're two _alternative_ FUNC arg forms, that both are sexps, and that in one form the entire sexp is eval'd to produce the function that's added, and in the (:append F) form the F part is eval'd to give the function that's added. Also, I don't think that the non-(:append F) form is any more of a "default" than the (:append F) form. There are two acceptable forms for that sexp arg; neither is default.