From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: scratch/command 064f146 1/2: Change command to interactive ... modes Date: Tue, 16 Feb 2021 23:44:46 +0200 Message-ID: References: <20210213141225.11309.86562@vcs0.savannah.gnu.org> <87eehid3k2.fsf@gnus.org> <87r1liblzb.fsf@gnus.org> <83y2fq9f0v.fsf@gnu.org> <87k0r8xl7y.fsf@gnus.org> <834kic9g0a.fsf@gnu.org> <8735xwvusc.fsf@gnus.org> <83v9as7xns.fsf@gnu.org> <87pn10ueld.fsf@gnus.org> <83r1lf9apm.fsf@gnu.org> <87a6s3vrnd.fsf@gnus.org> <83o8gj9a8o.fsf@gnu.org> <871rdfvq86.fsf@gnus.org> <83h7mb98g8.fsf@gnu.org> <87o8gjuaez.fsf@gnus.org> <83ft1v97bk.fsf@gnu.org> <877dn7u7wq.fsf@gnus.org> <835z2r94zw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16074"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: emacs-devel@gnu.org To: Stefan Kangas , Eli Zaretskii , Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Feb 16 22:45: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 1lC8A5-00044D-09 for ged-emacs-devel@m.gmane-mx.org; Tue, 16 Feb 2021 22:45:37 +0100 Original-Received: from localhost ([::1]:49284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lC8A4-0006QR-1y for ged-emacs-devel@m.gmane-mx.org; Tue, 16 Feb 2021 16:45:36 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lC89N-0005ub-Uu for emacs-devel@gnu.org; Tue, 16 Feb 2021 16:44:54 -0500 Original-Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:38826) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lC89L-0006Jn-VD; Tue, 16 Feb 2021 16:44:53 -0500 Original-Received: by mail-ed1-x535.google.com with SMTP id s11so14076763edd.5; Tue, 16 Feb 2021 13:44:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=tePqXhppvKAy0kMKZFGMx0DL1gFlvT6hS43aTOzilFY=; b=PNcs+UxQFW8WI3PFoEGzIljND3VTcnnxgbW/CC0jh3OCHbxCMC5nEeXtnVIu1uhofR j8NOPZeEXGNeCF+20ACeRPS1o/jUB1fBQiijYH58w44GGlKfBXpkk8errPibvfxxUULp rKCJmwMSZVvrsOyDcU0ZvvbGsip+8U5OJ+qDOOeNOkTA6BQNMagZAO+uPu85Jjr0lIai 4nkunUU6fW3Be/EvtiCo6u+kaGtH8n9M1rAcwu+SIvWSpPoux5IicpqNKUdiaJG1OWcZ /hDarMpofq5oIiisJRWNPnGlfmJVYW5Mq/DDS0XcOfED5rnSisYiuNgDJq5LFSj4k6aH XHuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=tePqXhppvKAy0kMKZFGMx0DL1gFlvT6hS43aTOzilFY=; b=lyo/k5HE78QkQc6pzu40+7LCpaTbX+ReWH7W1p5PLcUjLVatmSSdC7QInYv9JKUB1x 9LigY63vsFcwLlA2v10/465oYndqcXtBVPMqkspHyeW22vO6x4SsPqHHTIVEhbiCcH3r qVE3Q4x5S+CNNFeOfC9DUmq/X8UosRSgBqJ2g715tZ+2fp+CfNaRQavU2CU2rM5TDBjZ kA7Q9O4i1399Hs0A2y8DvFA6gzMALr1x8KbhWGPScOtAOxwC1uVcHca14Yg4Ks7oz8tZ IKvvgACDAhH59drr6tNo5a87ghY6FYZNZvvw3v7DmoNHgUWTmNlaqjGFr3mYPcCtErpj ojsg== X-Gm-Message-State: AOAM533USyHbyVVkk3Ycht7u4VW2fDk0Nhm/M5n7Nc0Asbh9ED1lyG1i 0Pd2QFW3D/2oiENLaTo7VY7C1QOVddQ= X-Google-Smtp-Source: ABdhPJwHlnssjyJJvBHJPolX+TkO8/A77KMozX/PzGUNiOv4Y8tT+hQuV1MzpNIT35MLKM+9WTvHVA== X-Received: by 2002:a05:6402:1151:: with SMTP id g17mr23135247edw.48.1613511889540; Tue, 16 Feb 2021 13:44:49 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id k3sm7042901edr.18.2021.02.16.13.44.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Feb 2021 13:44:48 -0800 (PST) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=raaahh@gmail.com; helo=mail-ed1-x535.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.19, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:264940 Archived-At: On 16.02.2021 22:30, Stefan Kangas wrote: > But I would claim that the more verbose form in this case is less clear > and harder to understand. That's because 'completion' is not a good name for it: it doesn't, indeed, explain what the value is. Nor does it say that it will be used by the proposed execute-extended-current-mode-command command. OTOH, if we had annotations like (declare (applicable-major-modes MODE1 MODE2 ...)) (declare (applicable-minor-modes MODE1 MODE2 ...)) it would both allow some speed improvement in the completion predicate (don't have to apply both major and minor mode checks to each symbol) and more consistently allow read-extended-command-predicate to use arbitrary conditions (at the user's choice). The list of annotations can be expanded with other tags, too, as well as with a free-form predicate (declare (applicable-pred PRED)) P.S. I'm guessing the applicable-* names look pretty long for a number of readers here. Surely someone can pick a shorter naming scheme that's still semantic.