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: Smarter M-x that filters on major-mode Date: Sat, 13 Feb 2021 12:22:58 +0100 Message-ID: <87sg60rz3h.fsf@gnus.org> References: <8ed9b43502ae1480e06b@heytings.org> <83r1lohqoc.fsf@gnu.org> <87wnvfenry.fsf@gnus.org> <87blcrdlqf.fsf@gnus.org> <87v9aydg3f.fsf@gnus.org> <83y2fuheph.fsf@gnu.org> <87im6yd4sz.fsf@gnus.org> <8735y2y44f.fsf@gnus.org> <87mtwajua4.fsf@telefonica.net> <87eehmwfeg.fsf@gnus.org> <87blcqjq45.fsf@telefonica.net> <875z2ywbvm.fsf@gnus.org> <87pn16mehu.fsf@gnus.jao.io> <87o8gpvdfd.fsf@gnus.org> <87a6s9mf87.fsf@gnus.jao.io> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3866"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: jao Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Feb 13 12:23:57 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 1lAt1p-0000sl-BZ for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Feb 2021 12:23:57 +0100 Original-Received: from localhost ([::1]:45738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAt1o-0003gP-Ej for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Feb 2021 06:23:56 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAt17-0003EJ-RK for emacs-devel@gnu.org; Sat, 13 Feb 2021 06:23:13 -0500 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:37316) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAt16-0004Mg-9A; Sat, 13 Feb 2021 06:23:13 -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=rEtl/WqyFOOPfhhG40xzXIRP6u5+5OGXDj1/IR25788=; b=tdqaa2hcMOekmBHDIhXNVxhGyb Xa/KmcMDfc+O9EpDcEuFVc3p0IbJMFdTn32jJrTuX5XvOhOa8fP9hJALnP0i06nL/uBxrX/64r8Tc UTLwWlYP1uhgI+3u3Qws981laHC2suM8G/Ec4e5CJTjD0liS/7cVxdBWREIjLv+NAIGg=; 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 1lAt0t-0003SC-Fb; Sat, 13 Feb 2021 12:23:09 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEWxjBctIAdcSSTP iwGlcRAUDwKNioP////kfFCWAAAAAWJLR0QHFmGI6wAAAAd0SU1FB+UCDQsFDQ1kzDUAAAG0SURB VDjLdZJBrqMwDIbzpu8CRmP2sQrrUrgANDN7I9J9Ir3e/whjJxkKLbWQSPLFjv3bxpgvgKpf7Vp2 xpjrMTh9BJdP4Dsv3QcwvINBl8NBqP7KO8DwO6fbd55nlyMN7raC02X0nl02ovPEJVQ/NN4DkXMT WQCwT2C9kEoP5Y8gaw1cgGcEQPmjXiJ3U/DH7w3UxeU3PMPGKqCzK6Hmx6sVcG9gZ3QWoHXU6EHD pzxAPkqAqZVLUBKTtOUd0/cjV1RPyLpfAQjomOj+KwfZAxHkPuYStuC7qwAKYMiAFUijNN1SdQZC TH/pFGDbtFWsbaDZUkMRpIMdKghNC6G1UUAUlB4X9xZbpOaHMiD1kC6jgio8mp9HoDjb0Ep3TJoL W2MkG0KINs5RQPLoLFAtWqMVURrLZEV3VEBctWRHIiyN0qRVqwXnvwf9EBFHUYtooq0J+PIk+otg NkmVKk+hOtHuf88Zs1YFpGuMclqAfwK95Mtc4Q54XOfqBfhXcBk3h7wBJx0ffPc4SR1+ng5C6RuL sx/A4NZg/ALGdw95Y+mH6bCO5ZZmOw91AWcNsrjsgk/wD2nK+xwKVxX6AAAAJXRFWHRkYXRlOmNy ZWF0ZQAyMDIxLTAyLTEzVDExOjA1OjEzKzAwOjAwmpySxgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAy MS0wMi0xM1QxMTowNToxMyswMDowMOvBKnoAAAAASUVORK5CYII= X-Now-Playing: Orbital's _Satan Live (3)_: "Impact (Live At The V96 Festival, Chelmsford)" In-Reply-To: <87a6s9mf87.fsf@gnus.jao.io> (jao@gnu.org's message of "Fri, 12 Feb 2021 16:18:48 +0000") 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:264598 Archived-At: jao writes: > it's perhaps more tricky, but it could also be > > (interactive 'c-mode) > > which is distinguisable from a string or a form: > > (interactive "p") > (interactive (list a b)) > > i.e., one adopts the convention that if the argument's value is a > symbol, it denotes a mode. personally, i would like that option even > better, but i'd understand people might consider it a bit brittle. Hm... It's possible, but it seems a bit hacky, I think. I'm trying to remember why I came up with the `command' thing instead of `interactive' the last time this was discussed, but I haven't found it... it's possible (back then) that I somehow imagined that `interactive' took a &rest instead of an &optional, and that would make it necessary to introduce a new form. But that's wrong, obviously, so I think I'll just rework this stuff to use `interactive', so it'll be (interactive nil foo-mode bar-mode) all over the place instead of (command (foo-mode bar-mode)) That is, I think you're right that introducing a new form here doesn't help much. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no