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.devel Subject: RE: [External] : Re: Current mode command discovery Date: Sun, 21 Feb 2021 22:46:07 +0000 Message-ID: References: <87v9aubm96.fsf@gnus.org> <87r1laomak.fsf@gnus.org> <83pn0uzubj.fsf@gnu.org> <87im6molnq.fsf@gnus.org> <83o8geztvt.fsf@gnu.org> <87eehaokrd.fsf@gnus.org> <83k0r2zrtn.fsf@gnu.org> <7173a426-a282-dd7c-699d-87a5be51bb94@yandex.ru> <87blcdaynd.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2087"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "emacs-devel@gnu.org" To: =?iso-8859-1?Q?K=E9vin_Le_Gouguec?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Feb 21 23:47:37 2021 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 1lDxVp-0000TG-Hb for ged-emacs-devel@m.gmane-mx.org; Sun, 21 Feb 2021 23:47:37 +0100 Original-Received: from localhost ([::1]:47602 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDxVo-0006YE-JO for ged-emacs-devel@m.gmane-mx.org; Sun, 21 Feb 2021 17:47:36 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDxUV-0005Xg-Uf for emacs-devel@gnu.org; Sun, 21 Feb 2021 17:46:15 -0500 Original-Received: from userp2120.oracle.com ([156.151.31.85]:35814) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDxUT-0004QQ-F3 for emacs-devel@gnu.org; Sun, 21 Feb 2021 17:46:15 -0500 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 11LMjCWZ016980; Sun, 21 Feb 2021 22:46:10 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-2020-01-29; bh=CRMoGQ6V4sv96z8q+nSFCYQtD1FraEzaB//mHdas1+Y=; b=xsEjWFe+6BwY5UDQ0QwrZAAUP8casX1O34dqml3qmpI/9KOlBxF0tKa49zsQxQlIzkew Ey+QaDowSEvbRN40rDoX1ZOv9ICai2mxVpRxxu6gluRNHvVax5xR8Xdk5MpwFYkHYXBK fw7XgBcBi7eEelB4XnqkIlujIzhCcP5IMwKZQRgm4Zfa5pd4WcvdiT+9tN0RU4J5gfkW f3l82XMtgCbvwZuPj/AlwzsujMkz9DPNjy6jLEOdkSe/yzgwo4YErWV7gpXmUKEdkY+b u2EG6PtPm3dasUv7TvMe7YbbV8kKGuW7LHwIfZLI6K0noLu6pVGtC2ArAiG9ZjpXWLPa Uw== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 36ugq38v45-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 21 Feb 2021 22:46:09 +0000 Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 11LMeNVK124092; Sun, 21 Feb 2021 22:46:09 GMT Original-Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2176.outbound.protection.outlook.com [104.47.55.176]) by userp3030.oracle.com with ESMTP id 36ucbvdkpb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 21 Feb 2021 22:46:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YBzsQvOJ25dcIRS1UK8O3athBXFd36aM+03tvmenpNBx0vkIZEzQ6iHbbBajcO/RYb063OvZU7f6pA5qDRnI7lWrEDkgsuhksEAqNmJ4DUoALOzdR2t+J4wu7S9a4VcdD63KDsM3FZeaR5LhdJFinnGURfY5cx4Lt7QX3q7bQg169WPwTa0xQVNWXP2CZcV/WEC2GBzNjwQb7L/O0c/HW/2oPJTUldpRu8Lw1vnEfKxtcaq5GfB9X7NlPcKofkrMly1OqKera0V02Ln+Baq3aZ+ALWULHbnwoRUElfjkp80BdP70+8zGNy9eCpKBepV0zhSvo0Cc35/TG6grf9ZOkg== 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-SenderADCheck; bh=CRMoGQ6V4sv96z8q+nSFCYQtD1FraEzaB//mHdas1+Y=; b=gWqcicvfpeY5nt1ca6b4OBUDwE/Bt9LI0gPWA7HE27AlHPmWU6zWWvNclEjhmbAmc8ujn6A2ULL69OWZ7HrsEP/6ufpZIQNZVIsLCs+ut6GL+bodmkcIJk/FMIHKmBLv9Uyi5XOR/o3R9nIPNtl6uiM+EQgN6huJa+N12AVsKUQjf/iteGsT4iNPr0HXi4ZnsDZK4TGG8hT7cQnGpIywNLwxnTvRejJzmlyeS8XhodbTrN8Q4fmlnX4AgVG6s8F4Cl1Aw5lrVHg12+NdADl0aXJZIlJ6BwaIMhmFtVl3SdnMemM7Ed/UJyOt3emFlm8yNwnaWNWIzk5oKx+FazNDVg== 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=CRMoGQ6V4sv96z8q+nSFCYQtD1FraEzaB//mHdas1+Y=; b=Z8kIMSpp8FzyFOwjtKxrW1X4whXIeR0W2rFsQTa4SZJHwiZsl3qsNL7/oHS4aJVgRGP1RxulSFibwKZ14BHbpDuuvjNMwQt2WDcrBbVzOmrtXUziGZtYRoxuo+MlnGCkGmj8yNcAUPvpZJqggfQWzG11JowrbyqbsJawxVFPHNY= Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15) by SN6PR10MB3071.namprd10.prod.outlook.com (2603:10b6:805:da::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.30; Sun, 21 Feb 2021 22:46:07 +0000 Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::b8d2:db6d:3e4b:d315]) by SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::b8d2:db6d:3e4b:d315%5]) with mapi id 15.20.3868.032; Sun, 21 Feb 2021 22:46:07 +0000 Thread-Topic: [External] : Re: Current mode command discovery Thread-Index: AQHXCJoLAcw3exOIcUaxCYWW4/uIwapjK+Ug In-Reply-To: <87blcdaynd.fsf@gmail.com> Accept-Language: en-US Content-Language: en-US authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=oracle.com; x-originating-ip: [73.170.83.28] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 06d678b9-d166-4f54-a73e-08d8d6ba7a07 x-ms-traffictypediagnostic: SN6PR10MB3071: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 5pYMPJ27OsrwzjevMAeN0AmlsPy2CGbE8tjtOb6QCMmAEbmuqMOmCAiFc+bcHbX3kTBYHZOgdwZpMftU6BvyS/qi7ybKV9apTKSVZudhus8JHaWNnzz9HFJICCFJ97j1Q3hMo7etvIyIwr0bCQ2lUogE7qc6e7y2Wn7iNfenUxdVBwXHBsWz4nA038uFQ61xmm3ggTtVcqH/Lj54JqJhtgnTaQFIX6fL8CZam0UkMPEa4yy4C6+VoU8YJhPTDQQynDABEur5js1cMYxWg/osfDmvVPqfcHeS9NcYKKZuUVfnEWNMFzmNyQrmdbVfC99B0J4giCGfOYLuh/5EFP+UTDmKZ7TV/M0yawhT2FG1JFm/lk7xBYm2+sFDyuPLgpcOSbU5R+r/gQBQzylcRY14nYQjUtnJI5yjJxdgDQ4rRbXW4UErXMYyVichMxbfyGZbFturac2+IxbWJrQYHOcJ2C2jk3ihSols1mKKCGXXmewj8Ez6HeVe8Hi+EXR2WMAKxMbl6x7WFFgf73ldjpxXp2Tc73JhSfmsd3lUxUkqQtiltD98dh1x6DK5onNmSafuOnwZRDrteGpSu0OAqfLL+2b1riSkpSFZFgOvN/xOUoI= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR10MB4474.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(376002)(39860400002)(366004)(346002)(396003)(136003)(55016002)(316002)(8936002)(52536014)(4326008)(26005)(33656002)(6916009)(76116006)(66556008)(6506007)(478600001)(83380400001)(66946007)(966005)(66476007)(7696005)(66446008)(64756008)(9686003)(86362001)(5660300002)(186003)(2906002)(8676002)(44832011)(71200400001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?iso-8859-1?Q?aen+ARLBBGBTKb2rGN8oO9ebAFyTlTByrqng8MkLuuYfkkgaQiatoo9lqO?= =?iso-8859-1?Q?z6CmE0JdGNWY/97cs0Pp9skYjsDLfY9zj7ic29VsHWqHU3kMc+0j1ZDI3s?= =?iso-8859-1?Q?lhAW4toIuG9fbfceWc+j9LpJsjE1qZ4vrzKueja7o2b8v1vdBoGT3H5oC2?= =?iso-8859-1?Q?GdrUyqtbkGzlEdrxpmucgizkBinE2DV6usuBAqQyWVKRSuzB89DytYVwgm?= =?iso-8859-1?Q?meVwbG1ah33RE4yz1i14iKxnuStaXW/MApl/b8dcHQ90aIsLWqvOvA3buW?= =?iso-8859-1?Q?spZWfq8YWI3E+3Jtgv16sYtwg1UMaGhUR+pbfCxN0icM+hj0VCg+8Plkd7?= =?iso-8859-1?Q?exNRtv8uNVGfQws0yliCMZIqo4X3F0TkEOe4oqCyofQbkSaabTJ1TwCAM1?= =?iso-8859-1?Q?J6MV8+qE/qtT1+dflxe3+vWccpEPqffV6Sn3Zn0Akdbt7dL87E6kaMVXUP?= =?iso-8859-1?Q?ASvJvVBNJu6XYW7WLnru3e7uNnqai0+eSP20YqCsaj9AMmHy72I2Mopwcu?= =?iso-8859-1?Q?aguru+P+mUUPEA8E7h2qzVliywcFfabVDluavHI/8FuWAL31r/NEIeeD6J?= =?iso-8859-1?Q?GMivLWrlbb/xO7h7S0cfV7sUNMBtmoX+EJv7Ep3WItdsDAR9RjH4lm69S5?= =?iso-8859-1?Q?te x-ms-exchange-transport-forked: True X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4474.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 06d678b9-d166-4f54-a73e-08d8d6ba7a07 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Feb 2021 22:46:07.1701 (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: b6WbgWjZJJ7gnnCtA5b9wKnq1ppKxNMuO5XM2vwpa/AaYI9s+YOrCRYZTDaSRc9j0S4ObudS28U5y2FZBwVVLw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR10MB3071 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9902 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 adultscore=0 phishscore=0 spamscore=0 suspectscore=0 bulkscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102210232 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9902 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 phishscore=0 malwarescore=0 spamscore=0 mlxscore=0 suspectscore=0 priorityscore=1501 clxscore=1015 impostorscore=0 lowpriorityscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102210233 Received-SPF: pass client-ip=156.151.31.85; envelope-from=drew.adams@oracle.com; helo=userp2120.oracle.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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.23 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:265444 Archived-At: > > Have we seen a complete, succinct, description > > of the two "features" (which both apparently > > filter)? > > > > Could someone please post that description, > > apart from these long, convoluted threads? > > > I believe the NEWS file on the master branch has been kept up-to-date: >=20 > https://urldefense.com/v3/__https://git.savannah.gnu.org/cgit/emacs.git > /tree/etc/NEWS__;!!GqivPVa7Brio!MbL7drkVlsbDK4CmZc61-V9hngoLnSJgmc- > UKRC65sOOHceASdzWB6ma_FTFY8ad$ Thanks. > > ** New command 'execute-extended-command-for-buffer'. > > This new command, bound to 'M-S-x', works like > > 'execute-extended-command', but limits the set of commands to the > > commands that have been determined to be particularly useful with the > > current mode. We still have no description (let alone a spec) of what "particularly useful" for a mode should mean. It's admitted that this is a judgment call, but no criteria for judgment have been given, AFAIK, except for Stefan's NOT-useful-if-always-raises-error. And that was said by others not to be a real criterion. So that new command seems particularly undefined... However, the particularly useful objections raised so far have been wrt the implementation: hard-coding the association of command & mode(s) in source code. > > ** New user option 'read-extended-command-predicate'. > > This option controls how 'M-x' performs completion of commands when > > you type TAB. By default, any command that matches what you have > > typed is considered a completion candidate, but you can customize > > this option to exclude commands that are not applicable to the current > > buffer's major and minor modes, and respect the command's completion > > predicate (if any). I see. But which way does the predicate go? Does it filter out or filter in? I guess that description doesn't help with that basic question, and you have to use `C-h v' to find out. How does this predicate relate to or interact with the tampering with `interactive' (new, second arg) in the source code? Is the predicate an additional test? An overriding test? > > ** New forms to declare how completion should happen has been added. (Grammar problem in that sentence: plural subject, singular verb.) > > '(declare (completion PREDICATE))' can be used as a general predicate > > to say whether the command should be present when completing with > > 'M-x TAB'. '(declare (modes MODE...))' can be used as a short-hand > > way of saying that the command should be present when completing from > > buffers in major modes derived from MODE..., or, if it's a minor > > mode, whether that minor mode is enabled in the current buffer. So the first one applies only when no input is typed at the `M-x' prompt - just `TAB'? No effect otherwise? Or is that also true of the second one (using `modes')? How does the `M-x TAB' filtering interact with filtering by the new option (above)? (Same question posed above.) > > ** The 'interactive' syntax has been extended to allow listing > > applicable modes. > > Forms like '(interactive "p" dired-mode)' can be used to annotate the > > commands as being applicable for modes derived from 'dired-mode', > > or if the mode is a minor mode, that the current buffer has that > > minor mode activated. Note that using this form will create byte > > code that is not compatible with byte code in previous Emacs versions. This sounds like a repeat of what is said in the previous entry (except for the last sentence). Is that right? If so, why have both? ___ And again, why go through all that, and make users go through all of it, instead of just putting a property on a command symbol to indicate the same thing(s?)?