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: Sun, 22 Jan 2023 22:10:49 +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> 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="18704"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "59559@debbugs.gnu.org" <59559@debbugs.gnu.org> To: Eli Zaretskii , Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 22 23:11:15 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 1pJiYU-0004jd-NG for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 Jan 2023 23:11:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJiYI-0008UX-VD; Sun, 22 Jan 2023 17:11:02 -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 1pJiYI-0008UC-C6 for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 17:11: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 1pJiYI-0006NI-2H for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 17:11:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pJiYH-0002bY-U3 for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 17:11:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Jan 2023 22:11:01 +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.16744254569990 (code B ref 59559); Sun, 22 Jan 2023 22:11:01 +0000 Original-Received: (at 59559) by debbugs.gnu.org; 22 Jan 2023 22:10:56 +0000 Original-Received: from localhost ([127.0.0.1]:52762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJiYC-0002b4-23 for submit@debbugs.gnu.org; Sun, 22 Jan 2023 17:10:56 -0500 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:53594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJiYA-0002aw-4u for 59559@debbugs.gnu.org; Sun, 22 Jan 2023 17:10:55 -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 30MLotbJ017854; Sun, 22 Jan 2023 22:10:52 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=LwU2LWB/wYutnC2RlVMCfGC0kV3K70cPbzNlV8Omxi0=; b=iAcsehtItRZsV3k/AOh2UnigMW4kzEf9zPqiy3h7mZyltVvHMdmXW2tpXERkS4GvLf0O pCOif4a2HtjXBbetI72x/bYtS5s/g4Ily0VxsNsXew9Oul232PlRF4Cnu2Sd1YP8Sg9n RWZyKvHDid3+lvIa0YWJOo9IkPMa0H69MzEI0eXMoAf/EaxUgkDjTuRMKX7cmR2R0zNP DDlGRPVwSA4e4Ah0teYMzXOQz9uLImJzZGJYVfr3mnGDN9ExB0rCRxKmB7Xv4NIfirME fR5LVUxy6p5wM0zXlNKm0N0fZEtjKpN9DOTmjKaTywpqUI0JUZzEB6fLcmjO36btLVfV Ow== Original-Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3n87xa1mx4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 22 Jan 2023 22:10:52 +0000 Original-Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 30MLFgbm035111; Sun, 22 Jan 2023 22:10:52 GMT Original-Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2047.outbound.protection.outlook.com [104.47.74.47]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3n86g2bb2m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 22 Jan 2023 22:10:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LLepULmYlACY3R1afFopZ4I4LIprOmaJ0qCpn0UbPFBE62IbstsbHUCmAFDUwYj9VfVAqANT1dg4O3bTDUpkFPMDetRGpZKTkCGf0ML1QC4NbCdSVnhsqvFXZ5/2PO9A1EhCW4Oo8JncSWIVI8CWze14RTFnuKV4xD76sXQ02iv3B7phXUM01C9pfic5Ex7N3QzIFoYO20Oazb4R66ZEQVluA9aBgbsyHD1xlhwyb8Z9zmnylruGqH8Lr0gazdFQIbe6yCJGDlQiSfF+95/lpun3B5Nkw8i3Om2JWZ0OBdbP+W+CyQb6TsbcUa23kQ4ZFZDP2xgt3f1uBFNe2UjuyA== 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=LwU2LWB/wYutnC2RlVMCfGC0kV3K70cPbzNlV8Omxi0=; b=HKWTXpqQfdYaU+Z94phXLIkVQMIgNrNy7snOIfmEz+fCzQrelNtT3ERW59Obj/Q/WLaRtHaro7kA+mR0o+PLRAZPRmx2f3058lFgrrYAwhUDxz2ahGh7KaFnGunP78O5vkpFV/33CulpC9+k8o9hvMlG6G9aF7I6macuLNXF1UREnk2j2NyV1IRCK4KAbArzokm/VJI0Rga7c7g+7J92wsI4YwXDRw9Kanj+mVL2vfMqDjaL3ZUQrF8WwqQhxVFyqiAaXPIZceJmXOEqebnwD6GVW0Yj+M9ou3bgJ+nb4OYy5JR85Df68X2wMI3kcm0ZdZ3MZo+/PpOhGL+uyVLi4w== 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=LwU2LWB/wYutnC2RlVMCfGC0kV3K70cPbzNlV8Omxi0=; b=x71bLqsaDl6W7Qu+xhUuLeht4M9N9KzeX/Yotx4apCW29RK6F5G84ed0vz+bF2MATrSiiGWo47Ek6BZA6pLNwg1BGwIV2SwsyLuw0/U5qCuz7SExCBViYF0kve6PZPzsB+uBJs86j1rncAWs4taBwr9T4qwZkXzEdIx0VO6E5KU= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by PH0PR10MB4470.namprd10.prod.outlook.com (2603:10b6:510:41::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.16; Sun, 22 Jan 2023 22:10:49 +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; Sun, 22 Jan 2023 22:10:49 +0000 Thread-Topic: [External] : Re: bug#59559: 28.1; `minibuffer-with-setup-hook' with :append Thread-Index: AQHZLiaU/Tekb5FBiUy+TZ9FPKO71q6qtFSw In-Reply-To: <835yczkt4k.fsf@gnu.org> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|PH0PR10MB4470:EE_ x-ms-office365-filtering-correlation-id: 9aadd061-7c37-4444-436e-08dafcc584be x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: LXU85bMHAw95c5dbi06Lywjdu18kKh3zu1dS/m6GnMNkRcVwnDR0ObIgqiMZTeqyeVyiYxPZD6LJVNtcLLP6/JuMUTl/ho9aZnV6Czw/6AgiN0HEhRrRe2q/J0tMoE6YpJQMPp4lEFxh9hMQbf7RMu0lOp2XyEDMc1TJ52afi9xKieWycvuLWVCtCM5cRqJeDAuBqdbO7CQDCCx4Rac2f/XtHp5qdjL88XXqdfV9NOlleU9PhxGZb59o98TiHQuvdfanVm0sXQJ4pce3jDY7RziEkQo5N67g6Sc6RmEziHpJtJdmlL63lRfE7yrZM66uiVU0imRosEfYvmxk71W26wnuj4mBBCFIAARQ3nWVSbRzdtAA6yauuXMsAjo9IpFtFtTHyIl9TI/HlNqBAS7hZ6mQ/lQT8pW+1coXuXpWdnuBqGScRdtiCEANspdmoxhVWGEh7KD5ozTJg25iPuIoWn+x8YevfMzgaHhwk59aqpV0z9scPKbo4heb4mmV/T3M2Wk7tm9feWNT16wmSOqbyoXmuBuACgxQ83a5TJzIF8juIMwB1NwFFYtCxXzZTCAYm0Fqz4Zr0aHAptY8+oJK5QSWxsdFwDwSAAtp2vX3V1ZP+JqLQkaRabGF1WnPrnzwVvIugMhGSwnHNQcmZa+tdHwz13y0mtMTSLFDm25NaLd7v+vSqWfioN4PJYj2hpRGvCxF6cOFZm013ZGjJJlCnrZWqmzust2CG3DF7NUd8Tk= 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)(396003)(39860400002)(136003)(346002)(366004)(376002)(451199015)(38070700005)(55016003)(33656002)(86362001)(316002)(110136005)(76116006)(66556008)(66476007)(66446008)(64756008)(26005)(186003)(9686003)(478600001)(6506007)(71200400001)(7696005)(66946007)(122000001)(38100700002)(83380400001)(8936002)(52536014)(41300700001)(2906002)(8676002)(4326008)(5660300002)(44832011)(81973001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: 8tW+MAeW/7G48Ez3ROoApfMTtp623In+QK+Oj/ZM4kDf+pVs65dKOa97DAu1JKokCNqiEMjGc2Q9KvHeNO0iJMHpvsp5KY8O5lB+klyM6q/TrAph0HFz52Do8oYEPcI6TWL+JtBhTFIFCrg1zFXWG+oi3MJt25pNtk3w2uY273EVP/pjTkXv/qHEWe0ysIulAmg4q/6lT3V4KS+axjSt1kJfAiuo5Cp0uK8zup2AUHxUylyfRtDsIJFjWtAFdFsg9UNOPdk+aAH82nWYZBm3kELRXOQIvgOXV+iM8sm19Qb6mP6HqkDRTzrCa5jlt0t96Qo6LK6RVQSqlYQuaxMLz4OCgx33eZ9Gc7qyGoo5p+BmrzxdUwcokyE/z5Z8HjrybAmbWLWGzfqSVLxg+b2pC+l1Amv8x09l2m21iPEGp5e2ROUZf3U47KiA17BVKKYUEBT4hfnRn4hzJxcsxuGADak1zPdwFCg/rnS/kSNja1WA++iK5xC3qMG9zd6ZyTGUH9/KchF8k+iByD/NdnMI1Ntj4XQ9GJdty8Y1+qn5zPgGp1FnJWQCoke/HTXFmo9QLdKbFG5DCNV2gwsIZcpq0QipeG14po2uFQpHhh62A9h9NrFNLHVd+pJzvb+kSq3tppKKFPjAG/ixKuce4MX5ddITNreqmByRs4zrH9lKORXMA4iewSNV/NC/tdlo93xRIpLeJAV5qSyHHSDRpAAwm6oiDzLiai6+UMafw8/ixH9zvVbMh7DoldNssn 9OPuJ5MTo2T+ADpULTRj/HTP388Fw+GV71nhFg1RCrFt1BmLuPMU+to9Mz4mb0DZAiSPSrTJqcFaASePilrRNRkayXP1I0LWp4 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: dSXNT8zioEmRizZaWkIb//yx7n6FGnNwP3JxCFN5E+ySlb1OSgtIiOd8GWZhGV6dOOEwf1swPbjE//gtNJ7WX1kLsitmBlFdkPYKvKd0b4i6iXjj0a5c8NsPPihD9uOwGmLJ4CNcY3jhloZEj+NyvEqaYbdCoGxZdoFH2ljFlh46/TdS807JfLRfxh36z4cGABsrn/85QvAWSXRB8yY/mzTc4YWFy/QnZA37iB4KrqejzP/kSQmLazfTahrHJxui2txMThHI6CVLZgmhrnR+TSCOcWOPZgramOEkFDczgVKs/nLaX268UIn73Ywfen9m4uLM0E9vDcHyvn+zudS7369kzSYkjo1QjY3uWRDmOPw6nK3MOLCOFFRz3fRYuyzal9c6TAgM5Char0DCkMGV3bDbrcWb/pDWyTROP3u4P8TSP63nhmkneJmDvGGfQzZj+x7yRev1cWraTmsnNgJBzzFOk7BALfa2P7A4PqMZxxnVw8qVMR1uhDtL29XZKimiM/lzA5pM2JPdRJCpPvSDotWwjC3sFpi2nvKn2FhgvOJ4yuHLuoDWbpmpz0vWVbYedh7RzDT6SdAU4CNKuIWY6iSMjGNVwbpKSNuSonOq2+UfRg98Wvt6erRmO1BCRY00ZR2GJN24YnqKYWMeeKj10GT3ZP2ue7leIckUYU1tDP4u8uR11kZTeC/VhcAyxbBd/SNtyv4zjHQSH9QVH30wArWfspzOtctdHGck+FntUfTJIO 5WPXyWpotS3yylgI7gAigs7/wjoB2Gl+k+4/T0oxTGpgkrcahcHcIaD2twnNBWd+hP1pTvYuWfEgClQP+g 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: 9aadd061-7c37-4444-436e-08dafcc584be X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jan 2023 22:10:49.1540 (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: WVcwrHtkiDxhPM+LbQeBX8fAvmu95PPBj0o96ivgk5CS8WYGAYU9nE0Xegy8Bt7QSvwLRxdFgFI3GvMkK6FzEw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4470 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 spamscore=0 mlxlogscore=326 malwarescore=0 mlxscore=0 bulkscore=0 adultscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301220217 X-Proofpoint-GUID: T-n1V8nYvFUP7RhJ9SLKrfG_Ga5xhPqO X-Proofpoint-ORIG-GUID: T-n1V8nYvFUP7RhJ9SLKrfG_Ga5xhPqO 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:253964 Archived-At: > > While the syntax of this macro is a bit unusual, with the background of > > the terminology used in the rest of Emacs the description allows only > > one interpretation: when we say that the argument (of a macro) is of a > > certain form, the unevaluated s-exp is meant. But that's _not_ what's meant here. The doc string: By default, FUN is prepended to 'minibuffer-setup-hook'. But if FUN is of the form '(:append FUN1)', FUN1 will be appended to 'minibuffer-setup-hook' instead of prepending it. Whether FUN is or is not of that :append form, per your presumption - "the terminology used in the rest of Emacs", the UNevaluated sexp is meant. But that's not the case here. Try it: (defun toto () (message "@@@@@@@@@@@@@@")) (minibuffer-with-setup-hook toto (message "************")) Debugger entered--Lisp error: (void-variable toto) (let ((fun toto) (setup-hook (make-symbol "minibuffer-setup"))) (fset setup-hook #'(lambda nil (remove-hook 'minibuffer-setup-hook setup-hook) (funcall fun))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook setup-hook) (message "************")) (remove-hook 'minibuffer-setup-hook setup-hook))) Not to mention that the unevaluated form (:append toto) also exhibits the same problem - it too doesn't fit "the terminology used in the rest of Emacs". It is just not the case that "the unevaluated s-exp is meant" for macro `minibuffer-with-setup-hook'. The _evaluated_ sexp is meant for FUN as the arg, and the _evaluated_ FUN1 _part_ of the sexp (:append FUN1) is meant for that form of the arg. That's what this bug report is about. And yes, this _is_ quite unusual. IMO it's not the best interface design, but there's nothing really "wrong" with defining a macro whose argument handling is this complicated. There is something wrong, however, with not making this unusual behavior clear in the macro's doc, IMHO. > Full agreement, my thoughts exactly. >=20 > > Else we explicitly say that the value or=20 > > evaluation result should have certain properties. >=20 > That would require us to write a much more complex doc string in this > case, and then do the same for all the other macros we have. So I > don't think this is a good idea. The "much more complex doc string", which is not much more complex IMO, is needed because the behavior of the macro itself is complex - it is _not_ the simple behavior you've both said it is. It's not the usual case for a macro (that the args aren't evaluated). And it's not the also usual case that some of the args are evaluated but others are not. It's the unusual case that one of the args is eval'd if it has one form, and only _part_ of that arg is eval'd and used if it has another form. I say all this because it seems like you two are still discussing this. But if Eli has reached a decision that there's no bug (have you, Eli?) then end of story.