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.help Subject: RE: [External] : Re: (interactive) and &optional Date: Mon, 27 Mar 2023 01:52:15 +0000 Message-ID: References: <25628.42021.832534.376361@woitok.gmail.com> <87sfdt6feg.fsf@posteo.net> <87tty9x3hp.fsf@dataswamp.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="8673"; mail-complaints-to="usenet@ciao.gmane.io" To: Emanuel Berg , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 27 03:53:13 2023 Return-path: Envelope-to: geh-help-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 1pgc2p-0001xV-Ud for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 27 Mar 2023 03:53:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pgc2E-0008Bb-88; Sun, 26 Mar 2023 21:52:34 -0400 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 1pgc2C-0008BD-Ka for help-gnu-emacs@gnu.org; Sun, 26 Mar 2023 21:52:32 -0400 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pgc26-0005qi-5g for help-gnu-emacs@gnu.org; Sun, 26 Mar 2023 21:52:32 -0400 Original-Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32R1jsk7017800; Mon, 27 Mar 2023 01:52:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=vy9937iiDmfXPbBG/ug8AD6qscj5wQWFwzDSk+9wtbQ=; b=QavNhBeo/L7zMkNsFcl4gAC3ulw+v2+XcTPla8zpCMwfi2YJxysLWmRkYoEyHIYw/Y+2 Mxvl5D7mbbVwporNsbFReypsRI8zIC6RivbsqusMd+iXeUw6fQ7VR1XmASwRGmBPJiQQ a0wxDFB7qYXuLov4jGpnKLS6d9m+Pbd+MTfXu+nr+0FPLnrTD8BeV6tllSvgTW/LrTwD xJSkyrInSyYutHXqY7k9wvS3xNulVcSZDjMnF+88giTD8mZOVhI2OT8S6+mZyBWargKf 5u1nkSXuh234CJyDMKDRApjKdPuh+50CrAfe8TwPYO6x6Gme4Laukdxn3XXEnWg16JCh Sg== Original-Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3pk1rjr0qd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Mar 2023 01:52:18 +0000 Original-Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 32R02T5K008677; Mon, 27 Mar 2023 01:52:17 GMT Original-Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2108.outbound.protection.outlook.com [104.47.70.108]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3phqdam7va-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Mar 2023 01:52:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LrAeJxdgLM1Fu4Yya082bQFhekJRoyOyTnr6kYfki1e1oAuTWaeok1T60Easl5rCkS3vnxu43WRcsT2DBO56X63Bo7IyxTvtf8RG+j0KYsJHmaTFojwg+oMxmMh7+SMNhzBs6tKkyXLT7AFScVOyosONhhtJUpE1bK7Gd2zUCUO3lupKQMPppxrerCvBmOJqx2Abbol1jkg11uUg9NtgBavH8m0gdGJJiJZG60BdH2WQ9QtFCd5g0v0WqfEUCWRVMwT9zo6iCxtra17d1yF6tYqJb0SlvSIl/d7afyrBG9xKXHpfuI51URc/UuqH9JN0KioOcehFeN1qSFoqnBdGkA== 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=vy9937iiDmfXPbBG/ug8AD6qscj5wQWFwzDSk+9wtbQ=; b=d2fcB8+CnJk3vBoBz/AKI/8RimmRiJmbzgN95mFuxovRMVrLIWORyG/rl2p1kn1HKz7qxKHTNSRmzfz7mYDX9VQa3glE1P0iindTdCY6T8ZpPnXSxJDxlH12DtA5/RUQdIxB7D1HiRmKPpiBuclwvG1/AXmA0OU5LHqmOS7rWqLTHprusrm6FmQRWLiOHZ0Dh1F2yjOrvW3W22apdEE7cZz4Q+fz6JSwqdu+WgFi6d4Rxb98LJ4uQuxgG+rc8Da4sqFW3zCaD2Ubh5GNpUODLgA3OvwYK9S2Ry0wCAddWx/ztwy/8mcxZ0UudVUg7mH0cE5v4lRT7ueDTusBA1CeTw== 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=vy9937iiDmfXPbBG/ug8AD6qscj5wQWFwzDSk+9wtbQ=; b=BkpZGUbFMUh1LDh/0o7wXLIfXYytFkVnn/BNlbL42MlVNJ9xy7/9ScBxk3SYi16/+iXh6IiDrvZt0aRHrT4FC46L356mHuGEXLAjI59aP5+pPXAUKw7v43N2QZBrJ4USVE7gEyfWDXqz2kxHNiafqEZsNbywhSL/tXcTh/aUM5k= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by CYYPR10MB7607.namprd10.prod.outlook.com (2603:10b6:930:bf::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.28; Mon, 27 Mar 2023 01:52:15 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::a995:2ae5:2745:24ff]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::a995:2ae5:2745:24ff%5]) with mapi id 15.20.6222.030; Mon, 27 Mar 2023 01:52:15 +0000 Thread-Topic: [External] : Re: (interactive) and &optional Thread-Index: AQHZYEIK4HKO3VvT7ES+kMVK5TLGV68N2bDw In-Reply-To: <87tty9x3hp.fsf@dataswamp.org> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|CYYPR10MB7607:EE_ x-ms-office365-filtering-correlation-id: dd140314-a673-4563-c510-08db2e65e3ea x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Vac4GgyHH+nZ3skROlZ/mB+4VIDX/6wWRA94myGZvCznGzoOxZI9+7KiEaN//Ma7y8QotRyFGjeSiDYH26/BzDXK8gxNws8n64bP2UB7QTa4MCD5ErVAhRX6XqKw1xMAp5xrkPbUZbxwAw7KcaYQbucrpQ+FJDYTYP3lZ4z+W5dscWy7LFT4DYPGPVD2X2IbRzm4OrPjPxhu5NTCqStAkdGfsWrqNyOGvNKSv5aHk6P0atRxM1qbcdV/dQBOt6T6FpxiE7KERP3CkyLkSqDp4Kvpk4lTyH9Tpv7m10ZM2cxnaaT1Zb6/2LHp9gWMlM8VQmVjFYtF2gWwL6u7W5LU2R9r6oYst2u4h2qjfNescIca8ACDRXZNvHcukMvMPU/HDSaB9y4L+lTUmL8z7U5dkiiIQ3XGTq7aHiLa/nCLUdr20w73Tp53HrWDPrwZ0+2HpvCTtF1olKoax0eIGlpik+tZYdgtOJypxe/xH7ihaM3AGwZp2D8TXZw3uDNSkYEf3Tadv6Si0MkPnm6SZTadFStGRcLp4cxZLKJnj8R9HhBYa++0YSVZUre1xNZ27hiYFA5FxXgMzZ0O5fa+qg3VtEN5ormja12rJpmil9JBTg29NEjGaXOPkAgloQRIQ5Wp 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:(13230028)(366004)(376002)(136003)(396003)(346002)(39860400002)(451199021)(83380400001)(76116006)(66446008)(66476007)(66946007)(66556008)(64756008)(8676002)(7696005)(71200400001)(478600001)(9686003)(6506007)(26005)(186003)(110136005)(316002)(55016003)(38070700005)(2906002)(4744005)(44832011)(33656002)(86362001)(41300700001)(52536014)(38100700002)(5660300002)(8936002)(122000001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?yuTNK+Fqap6tZmWhx3v/wlNF6fEq1E/a7mBJT4nn94rZDqKvn3y7FwD4e+RC?= =?us-ascii?Q?bZ1N0ZiqpLL2ZBuCOQX/ZnOR2GeItJMdoDxkLBDNOYDXhC2xbDwm8qqQfBfd?= =?us-ascii?Q?cwjnNl7NVpmRAoqpl74vvj2SqMitKvY7VY1OKi/mUHjgs+SMsWWkTDefGErh?= =?us-ascii?Q?zO1eLaO+2KAKs4AxNaYjHeOio4slJNzXteRf5LPNbGIcx4XBzMzOpfjuhCPQ?= =?us-ascii?Q?kkVC1TYxHNWvQxQShkivD3Y0kPffg9PM7GE1IzXrDhqtcKnFnivgh+6Ao3w9?= =?us-ascii?Q?A7ZZ4R/YTTQzMUexWjL0e35xVxCGPY2GBhcN07vFp4New8UQev40Zcxd+U16?= =?us-ascii?Q?bJP5FmH6PiN+AHHy8kxBdiY3DUitolOL2nqM1dG5gCvKRch77YCc5aQqTudI?= =?us-ascii?Q?1WKnMiuQ1IckwKwNy4xPm8wX1FYmB3tK7Tuh1tg2im2m6HAMgg8213Z989tN?= =?us-ascii?Q?7pP13FyW8tPQ0NRuqCnMjzJ1vTZs+yX7XV6r3cLM0hrOSCmTldDFsI0aOOmv?= =?us-ascii?Q?PitfdP344kuhtTmINjE/EGcq4qGjR0REEAVwqMEOS/6pvfz2XgWdHbOWPtKJ?= =?us-ascii?Q?PWir5XDmNgUoT5LVM1PPYFAvUJztiGsGx90S48IeBT41V3HszQWs9rXC2Gc0?= =?us-ascii?Q?pE X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: pOUS+WYxtiAM14I7MHCQgqNIy++GQmDvXsraB9pvkTMfO1wd0wWElwTnjQOCBN10mD4Wupy3V2syqFhsxgiH6Qc/epv9CFYKHpP/IROAzp6DIu82KkGVNvLQppviYaDJKyhIIf56raW1gmylQymADsshyRHgUtVeMRh85M7ClElpH6i+WaEDp2I5w7SOOBySCAruSwXFhm7lYJujVRy7wWiP1eB9GaTH8XLlXaR9qdwt4H/j1oCUFEGynz6On3dBAc/cLKR2l+zTklMpiamjrzMPzDI5j3IVNjrAkutUgQhzudoeZYp9Xehuf6tUKeDwDvEgBs5WOyvmWZseeUv2yt3HUIykw9MK5Pxiwnih9H9LBly/t00vMw7s6WTsnZ2K2INbpecl8VobLwOzh4Niby0W8rIiuFvWOHSA7BNw96OcIVRoYM7bRZ5QmlAngXoMpSIvNpH6yEOHt3JrrcYUsOzf5QA5pDpz+H4uky0emTdgiZQ0QLtZLtKZRhXjA38L70IH/B+LDIj2qJcBee1AV2GyXLkOlPTNvgLPMUs9LL7rUc2m8amOCTynODIpHDvvltHx4ml1eJgu1O5ZtntzxrklvD/Bmimdzq8BQQ99WoxuZu/kvtUxQnGOzeNy1GGs1r1xlsZOUSfGnWWOZDhfGbz4HF5JC4iI3zBJWw6SzjpIpp3Z2bxThlA4iD5tjK0QtG8m2K9gmW+ixuOb3fk0U5ok75EoR0akPhStLhLWkyyTpl 05YxWADUlFLRHgB0hLsEDVkgi2mc3ZFnQBJ8ygfg== 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: dd140314-a673-4563-c510-08db2e65e3ea X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Mar 2023 01:52:15.3216 (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: d4XEG7ojvxvyC9pmYR65cqZGvpb9S/lZsZ+BFDFvhD2zgRFBiwBMLvWSQrBAlkyrtYYusx8zTPkVSt/5Geh+qA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR10MB7607 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-24_11,2023-03-24_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 malwarescore=0 mlxlogscore=891 phishscore=0 bulkscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2303270013 X-Proofpoint-ORIG-GUID: 1TGZr13vd0kggkc9ZgG-mj6CkwI8n6E5 X-Proofpoint-GUID: 1TGZr13vd0kggkc9ZgG-mj6CkwI8n6E5 Received-SPF: pass client-ip=205.220.165.32; envelope-from=drew.adams@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143120 Archived-At: > `interactive' is the right place for everything interactive, > so unless there is a specific reason why it is impractical to > put it there, that's where one should put the > interactive stuff. At the risk of being pedantic... `interactive' is the right place for code that should _only_ affect interactive use, and that should/can do so _only_ at the outset of the function. 1. Putting that first "only" differently: if you want some code to be run _both_ interactively and non-interactively, then don't put it in the `interactive' form. (This one is obvious, but it does conflict with the prescription to put "everything" interactive in `interactive'.) 2. Putting that second "only" differently: if something interactive needs to be done _after_ some code is run that isn't only for #1 (i.e. isn't interactive-only at the outset), then don't put it in `interactive'. Instead do it in the body conditionally, e.g., using a test such as `called-interactively-p'.