From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: scratch/command 064f146 1/2: Change command to interactive ... modes Date: Tue, 16 Feb 2021 13:15:13 +0100 Message-ID: <87k0r8xl7y.fsf@gnus.org> References: <20210213141225.11309.86562@vcs0.savannah.gnu.org> <20210213141226.EEDFE20999@vcs0.savannah.gnu.org> <47209379-76df-4c97-e5ff-b3b04da0db1d@yandex.ru> <87zh07of0e.fsf@gnus.org> <0605ed62-a785-d190-caf2-2232e1db3b0f@yandex.ru> <87mtw6d480.fsf@gnus.org> <87eehid3k2.fsf@gnus.org> <87r1liblzb.fsf@gnus.org> <83y2fq9f0v.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1147"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: dgutov@yandex.ru, Stefan Kangas , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Feb 16 13:16:05 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 1lBzGu-0000AQ-W8 for ged-emacs-devel@m.gmane-mx.org; Tue, 16 Feb 2021 13:16:04 +0100 Original-Received: from localhost ([::1]:33380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lBzGu-0000cr-0V for ged-emacs-devel@m.gmane-mx.org; Tue, 16 Feb 2021 07:16:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBzGI-00006J-LZ for emacs-devel@gnu.org; Tue, 16 Feb 2021 07:15:26 -0500 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:41888) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBzGH-0003XO-0H; Tue, 16 Feb 2021 07:15:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=bYYfQBqNWEdhjbIMbU5JDUpcxcQUyl7fnztZVde6GV0=; b=Ejd2loBQLZVbnBW8Yo5eA66Wfl 2Q3Apbmws56p4/ea/JfOcjMZrSmPJaKS2yYYwtLyJ0bwl13Lddut+m8IJBRiNI8J+jVrmSieLpUzD EEdkYL8C6ZTLiMFn31REv9pL47dxoxTSCO9j0BO3Ga98zb6ZmYK/jJhamznP5/oht8hQ=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lBzG7-0004tw-AK; Tue, 16 Feb 2021 13:15:21 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAIVBMVEXKEBrSESPYKC6Z EBVSCxEfBwttCxJoKimMSkh8Q0D////HQmIzAAAAAWJLR0QKaND0VgAAAAd0SU1FB+UCEAsuAdDR 8jUAAAGoSURBVDjLdZNNTuQwEIUTBbGGuQFzgkYevG6JcnyAuGALStpodiyC3KxnpE7fIMedqvJP wqR5y/flxVXPSVX/zPpxd3e7qMqqb7/oplrpC6u+ixS7Ump3CTRg0N1fAAZJbrcB9QEdsW4LHtB+ oHu5AJ5PAY9/6s0ZV8/zMUzj63YPO0/TOTxuwXma5umvfd3sEebpPI2w/x8ofZzP8yWgfp9CGO37 FryFED5PoV65jVKN9wOCDca+LH2Tr67bASy60YZ9tnfsMzABnQ1jt7ycpR1Iv4BdtAqQclldcgqA DJoV6L03mIFagKZZC3hSugDvOZH0pL28u4r+Cqg+JbSAwwKUoIpdAD+4hFx80BMYAKDlrmLCZ8A+ RbxPiQIAEonnQwYDZNEhDrH1IKdWxW8hJpIWAHQIvc1tQKsRf3VmDWK8v3YG3KGAPBXsmv7B0E9C O0WQ9EiArkuATCUul0NA8S4yIAEpV+rkkgaZigIt30evpekCWtlcyieg+4FLNm6IzclFSYA+OR4I U6VpKr5gwwa46OdxOePTs6ldAPkA45KytjGyIH6jf75JBbLZywoVAAAAJXRFWHRkYXRlOmNyZWF0 ZQAyMDIxLTAyLTE2VDExOjQ2OjAxKzAwOjAw4B6W5gAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0w Mi0xNlQxMTo0NjowMSswMDowMJFDLloAAAAASUVORK5CYII= X-Now-Playing: Sevdaliza's _ISON_: "Hero" In-Reply-To: <83y2fq9f0v.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 15 Feb 2021 05:38:24 +0200") Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=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:264881 Archived-At: Eli Zaretskii writes: > Isn't this a bit premature? I thought we were still debating how best > to implement the annotations? The discussion seems to have evaporated, so... Stefan M was in favour of using contextual annotation, so that (some-new-directive 'foo-mode) (defun foo-thing1 () (interactive)) (defun foo-thing2 () (interactive)) means that these two commands are tagged as being for foo-mode, and then using "negative tagging" like (declare (completion t)) on the commands that shouldn't get that tagging. He didn't expound on why -- whether he just thinks (interactive "p" foo-mode) is just too ugly, and offends the eye, or whether this would be less work. It won't be less work -- adding the markup is mechanical, but whether a command should be mode-specific (and in what mode it should be in) is what requires work: You have to actually look at each command and make the determination (and that's the case whether you use contextual annotations or not). For instance, I tagged up message.el, and most of the commands are for message mode, some are general, and there's one command (`message-make-html-message-with-image-files') that only works in dired-mode. (This sort of thing is more common than you'd think -- there's a bunch of commands work in the intersection of two modes, so it's arbitrary what file they end up in.) (I've already written about how I think contextual annotations are a long-term maintenance nightmare, so I won't repeat that bit here.) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no