Received: (at 81840) by debbugs.gnu.org; 11 Sep 2026 11:25:04 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 11 07:25:04 2026 Received: from localhost ([127.0.0.1]:36141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1x4zNQ-0005lZ-1M for submit <at> debbugs.gnu.org; Fri, 11 Sep 2026 07:25:04 -0400 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:42037 helo=mail.qxqx.de) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1x4zNM-0005kn-EV for 81840 <at> debbugs.gnu.org; Fri, 11 Sep 2026 07:25:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To: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=fTsd1MLCrJ9qkrB/pXZnORJ4iBD9pDcxNBii20I4TdY=; b=nMIaKhtYrFowk8XRmoyxW5mKS+ HLpeifGbHsMvnusMXdiEUlgnQVw+WbiW3NffZuEBy5ygIi/VAjz9hmALw4SyPOABA1KbbEgVUA3HR CsI6TbfLtNaDiRKijsMTQvHmdGcxk9Mb9ZWzfr0iTS6+09eD/O7FmAZ4IgWbCWslIfV8=; From: Daniel Mendler <mail@HIDDEN> To: Sean Whitton <spwhitton@HIDDEN> Subject: Re: bug#81840: 31.1.50; [FR] Major mode tagging of commands In-Reply-To: <87a4pocc7p.fsf@HIDDEN> References: <87h5jx5sqr.fsf@HIDDEN> <87a4ppe6yt.fsf@HIDDEN> <874ifw200p.fsf@HIDDEN> <87a4pocc7p.fsf@HIDDEN> Date: Fri, 11 Sep 2026 13:24:52 +0200 Message-ID: <877bks114r.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 81840 Cc: 81840 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Sean Whitton <spwhitton@HIDDEN> writes: > Daniel Mendler [11/Sep 12:51am +02] wrote: >> Sean Whitton <spwhitton@HIDDEN> writes: >> >>> Daniel Mendler via "Bug reports for GNU Emacs, the Swiss army knife of text editors" [10/Sep 12:02pm +02] wrote: >>>> Is there interest in adding major mode tagging of commands? This would >>>> affect many modes throughout the Emacs code base. The interactive >>>> specification supports major mode tagging since Emacs version 28 iirc. >>>> >>>> For example most Ibuffer commands only work inside Ibuffer (as one would >>>> expect). When they are invoked via M-x from another buffer they will >>>> throw an error (via ibuffer-assert-ibuffer-mode). >>>> >>>> Therefore my suggestion is to start tagging more major modes. This is a >>>> large undertaking since one has to go over many major modes, but it is >>>> also a beginner friendly task. I've seen people ask on emacs-devel for >>>> such tasks. Would it make sense to redirect people to this bug and would >>>> you welcome such patches? Thanks. >>> >>> Yes, welcome. >> >> Okay, thanks. As a first step, I attached a patch which tags the >> commands in ibuffer.el, ibuf-ext.el and ibuf-macs.el with ibuffer-mode. > > Thanks. You'll need a proper ChangeLog-style commit message, though; > please try C-c C-w in the *vc-log* buffer. Do you want to see every function listed like for instance in commit 1c70458519b324c9403e8a9f57bd695fe39e8d2c? Daniel
bug-gnu-emacs@HIDDEN:bug#81840; Package emacs.
Full text available.Received: (at 81840) by debbugs.gnu.org; 11 Sep 2026 10:30:15 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 11 06:30:15 2026 Received: from localhost ([127.0.0.1]:58827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1x4yWM-0002Ow-Rv for submit <at> debbugs.gnu.org; Fri, 11 Sep 2026 06:30:15 -0400 Received: from fout-b2-smtp.messagingengine.com ([202.12.124.145]:54009) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>) id 1x4yWJ-0002LK-A1 for 81840 <at> debbugs.gnu.org; Fri, 11 Sep 2026 06:30:13 -0400 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id 7A0FF1D00127; Fri, 11 Sep 2026 06:30:05 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Fri, 11 Sep 2026 06:30:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1789122605; x= 1789209005; bh=Cr4ZaAXinpI+kFQM5rvRhmK3KFMgf0UUEsQmmKHut5w=; b=G riy3wbOKiVWjTvp3kfFMlQvAhMb5ryyv7raOyU17m+OJq0OoXehcfhpB9vsFCIXr 2uhk9GdCnTlmN94/nL3+OZeauodGb5RWcoFzY2g2nMRiPymPrVkzt7ucgb+Dr2Qx 6BlMzCSU3Ky+JS4uVclx7tj2HmZ+YGe06p0Mo9LLR8QU3ASZMqmqsAssKOAQzcUY 94YRQA076ohJafWHjfUm50OYcYBvwPWN1nl5aOUapSu+aqzlIzH6KrcDtSwG8iea E3BjZJcFcNmrynYDMcmX5/oOx07Epkc0VR7hHMCC8wroIaHWZNRvvNmRFYpy33Jx Zx0pG4Pmfe2ynd6M6fqIg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1789122605; x=1789209005; bh=Cr4ZaAXinpI+kFQM5rvRhmK3KFMgf0UUEsQ mmKHut5w=; b=AsbxBy/id4qMx+jX6rcYQDx27WteXQxfq/gqw/xE0WzBGVMNEdk zx7og3AQkF1d5n/BqOW8wtfK79gMz16fx/h/rId5H2fGwwS+BgTZl5gr25Vkt4Fk bM4IjfoIXR0Gv6wwtp61K5xIhzzWLQ0pV2I6NChJ8mI0zUZ34nsXO5KsyinfuFSF KrOgVkovnMpA9hHDAuggWlC+WALGNTEugHWGigrfscivzTauTEbY7NtxU2RKmICU UeNFLbPZSwBHgoqa/c5Lly1p944njVDd1xEKTBPcyQiKs1o/xIzlgo/CZI0E+rP7 d3Oog9MVvvggWdf8XzpbU4s4AdKNu8pMo/Q== X-ME-Sender: <xms:LdijauPlrSmp_GAvKcx_tG3GOVSHYb13VZ0gfUxIkWyKn9ecwMhjqg> <xme:Ldijai9zbJt_HbdBIshljO6pAMHAF7FJSCVIevBs3UsT_2xz8CaOYJFkD3aN9crMh WqS7IAodU2COcFcumGXp38PKJmiA_R7IY9TGTwekFETnSzSyuhHAr5c> X-ME-Received: <xmr:Ldijai47RsK7RvXoViMOtuShrsj78coKN35xEtNW6fLQdER4rHLvRVebV07axcvJEg6hDyftgvvo7SvKqFvA_JsLbzZuV2iX2A> X-ME-Proxy-Cause: dmFkZTFrcpI4qQrrvLP2B+WcXef9lp13BbcWy/2Zxu0XpUqtVAjRWdzAdhsjvpAs6fzIM7 j+PNkm9l4Chu9L50i6BcS1K+zSHpnJjQRY6wOj0pkAl6uwqBakZPdMGGWQBymQ2646uGHL Rv9AdIdLhW5fEFKgQhVhB1nT4w+Ov+3yxcohqvGH/B1hDnztRiF1n8M7C2NuY92Ya/JOnL wVVddGKMh5hBiHrn6+Dq3ODpNmH1p3GgvvvhsmSrPQtGKDTVVH0LdrVYFmXnmeR0QTq/gQ gK2oM/VQ4iol3wnTLZCZoOJueSXAdDwys0OcPrnax8Hz8Kbzq2WKd4aA9WO/YhtGmBeBXq 7+MuVTpAtv/R5Fv9fYHYgXaZtsvZIeQq5bXwyflzkmuQEz95hOqfGIsixOLlH5XfiX49Qa H4Mlg7bS1SffitmZ/hXnRPwBai9KijR3kqRATqw87llmbGEMRHPpjZayPmcn9gZsSK8UFF igYECsZtjV771dh8sn6zYPEptsSo/YstDCmCd+xM6ZmKNYxwU7gP+pfOFzKIcXVthnjibA dbQ2EaCpew754qOKYIP5Di/7jmWaY0ICYd7lKDA+K5Okf2x62PcYKzUeykZxJb6XCAtFYY XlMm2AfQZbxsquYKmzO4g8Ez69qjPEroMTqGpBxHy35OI/DJqhomoPVdPkLw X-ME-Proxy: <xmx:Ldijap3PVGtCBQuK--aV2KqB6ZYcnj-TLYaUiQN6MJFoVwUMcZBkCw> <xmx:LdijapDxJVpJ8gAwH_KBS9WNF8DREYdSpDajVSX2src9piOvYlOHNg> <xmx:Ldijar0lh6eFX4pliabx7wTahxXhdr7FZpQm3ZngA_yaqLnyRbfKxQ> <xmx:LdijajuSQ0zf6Ts2GI_OWBu17291otiaQ-P8pEIXJWzH-GSSi0T22Q> <xmx:LdijashXwcegGVu3sr_x5DzZwEAw3CJEv7IRs1c4WN9t8JHwcOOXfPjP> Feedback-ID: i62564b17:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 11 Sep 2026 06:30:04 -0400 (EDT) Received: by athena.silentflame.com (Postfix, from userid 1000) id 470DC282934; Fri, 11 Sep 2026 11:30:02 +0100 (BST) From: Sean Whitton <spwhitton@HIDDEN> To: Daniel Mendler <mail@HIDDEN> Subject: Re: bug#81840: 31.1.50; [FR] Major mode tagging of commands In-Reply-To: <874ifw200p.fsf@HIDDEN> References: <87h5jx5sqr.fsf@HIDDEN> <87a4ppe6yt.fsf@HIDDEN> <874ifw200p.fsf@HIDDEN> Date: Fri, 11 Sep 2026 11:30:02 +0100 Message-ID: <87a4pocc7p.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 81840 Cc: 81840 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Daniel Mendler [11/Sep 12:51am +02] wrote: > Sean Whitton <spwhitton@HIDDEN> writes: > >> Daniel Mendler via "Bug reports for GNU Emacs, the Swiss army knife of text editors" [10/Sep 12:02pm +02] wrote: >>> Is there interest in adding major mode tagging of commands? This would >>> affect many modes throughout the Emacs code base. The interactive >>> specification supports major mode tagging since Emacs version 28 iirc. >>> >>> For example most Ibuffer commands only work inside Ibuffer (as one would >>> expect). When they are invoked via M-x from another buffer they will >>> throw an error (via ibuffer-assert-ibuffer-mode). >>> >>> Therefore my suggestion is to start tagging more major modes. This is a >>> large undertaking since one has to go over many major modes, but it is >>> also a beginner friendly task. I've seen people ask on emacs-devel for >>> such tasks. Would it make sense to redirect people to this bug and would >>> you welcome such patches? Thanks. >> >> Yes, welcome. > > Okay, thanks. As a first step, I attached a patch which tags the > commands in ibuffer.el, ibuf-ext.el and ibuf-macs.el with ibuffer-mode. Thanks. You'll need a proper ChangeLog-style commit message, though; please try C-c C-w in the *vc-log* buffer. -- Sean Whitton
bug-gnu-emacs@HIDDEN:bug#81840; Package emacs.
Full text available.
Received: (at 81840) by debbugs.gnu.org; 10 Sep 2026 22:51:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 10 18:51:35 2026
Received: from localhost ([127.0.0.1]:36056 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1x4ncC-0001KY-IO
for submit <at> debbugs.gnu.org; Thu, 10 Sep 2026 18:51:35 -0400
Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:56013 helo=mail.qxqx.de)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <mail@HIDDEN>)
id 1x4nc7-0001KB-KY
for 81840 <at> debbugs.gnu.org; Thu, 10 Sep 2026 18:51:30 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date:
References:In-Reply-To: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=DxrOY9PwddohQYzDdiRwvFlL5FTI+sxDJEBETi1XSIg=; b=B5WJu2sjnECI6L6H1VO+igSEFy
rDXZSASGetOPm2xkch1czIDV7Q4x6PjjartC1rxq4EQh2C5wStifVucQ/BzZS4Etaj+d0kUo08ABO
xXKXBn3neCZg6PJ8W95fIEKVXt1c2pZYCRV5RcISJ3MuDCRXqsGs1+4EbirJf7xI7EQ8=;
From: Daniel Mendler <mail@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
Subject: Re: bug#81840: 31.1.50; [FR] Major mode tagging of commands
In-Reply-To: <87a4ppe6yt.fsf@HIDDEN>
References: <87h5jx5sqr.fsf@HIDDEN>
<87a4ppe6yt.fsf@HIDDEN>
Date: Fri, 11 Sep 2026 00:51:18 +0200
Message-ID: <874ifw200p.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 81840
Cc: 81840 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
--=-=-=
Content-Type: text/plain
Sean Whitton <spwhitton@HIDDEN> writes:
> Daniel Mendler via "Bug reports for GNU Emacs, the Swiss army knife of text editors" [10/Sep 12:02pm +02] wrote:
>> Is there interest in adding major mode tagging of commands? This would
>> affect many modes throughout the Emacs code base. The interactive
>> specification supports major mode tagging since Emacs version 28 iirc.
>>
>> For example most Ibuffer commands only work inside Ibuffer (as one would
>> expect). When they are invoked via M-x from another buffer they will
>> throw an error (via ibuffer-assert-ibuffer-mode).
>>
>> Therefore my suggestion is to start tagging more major modes. This is a
>> large undertaking since one has to go over many major modes, but it is
>> also a beginner friendly task. I've seen people ask on emacs-devel for
>> such tasks. Would it make sense to redirect people to this bug and would
>> you welcome such patches? Thanks.
>
> Yes, welcome.
Okay, thanks. As a first step, I attached a patch which tags the
commands in ibuffer.el, ibuf-ext.el and ibuf-macs.el with ibuffer-mode.
Daniel
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=0001-Tag-Ibuffer-commands-with-ibuffer-mode.patch
From a417d289797400d0e9847e681f6ece1add768826 Mon Sep 17 00:00:00 2001
From: Daniel Mendler <mail@HIDDEN>
Date: Fri, 11 Sep 2026 00:15:10 +0200
Subject: [PATCH] Tag Ibuffer commands with ibuffer-mode
* lisp/ibuffer.el:, lisp/ibuf-ext.el, lisp/ibuf-macs.el: Tag
Ibuffer-specific commands which are only applicable in ibuffer-mode
buffers with `ibuffer-mode'.
---
lisp/ibuf-ext.el | 137 ++++++++++++++++++++++++++--------------------
lisp/ibuf-macs.el | 8 +--
lisp/ibuffer.el | 63 +++++++++++----------
3 files changed, 113 insertions(+), 95 deletions(-)
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index a1ea4027ff7..b07630d1ef3 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -361,7 +361,7 @@ deprecation warning is raised, with a button allowing persistent
update. Any updated filters retain their meaning in the new
format. See `ibuffer-update-saved-filters-format' and
`ibuffer-saved-filters' for details of the old and new formats."
- (interactive)
+ (interactive nil ibuffer-mode)
(when (and (boundp 'ibuffer-saved-filters) ibuffer-saved-filters)
(let ((fixed (ibuffer-update-saved-filters-format ibuffer-saved-filters)))
(prog1
@@ -396,6 +396,7 @@ format. See `ibuffer-update-saved-filters-format' and
(define-minor-mode ibuffer-auto-mode
"Toggle use of Ibuffer's auto-update facility (Ibuffer Auto mode)."
:lighter nil
+ :interactive (ibuffer-mode)
(unless (derived-mode-p 'ibuffer-mode)
(error "This buffer is not in Ibuffer mode"))
(cond (ibuffer-auto-mode
@@ -416,13 +417,13 @@ format. See `ibuffer-update-saved-filters-format' and
;;;###autoload
(defun ibuffer-mouse-filter-by-mode (event)
"Enable or disable filtering by the major mode chosen via mouse."
- (interactive "e")
+ (interactive "e" ibuffer-mode)
(ibuffer-interactive-filter-by-mode event))
;;;###autoload
(defun ibuffer-interactive-filter-by-mode (event-or-point)
"Enable or disable filtering by the major mode at point."
- (interactive "d")
+ (interactive "d" ibuffer-mode)
(if (eventp event-or-point)
(posn-set-point (event-end event-or-point))
(goto-char event-or-point))
@@ -436,7 +437,7 @@ format. See `ibuffer-update-saved-filters-format' and
;;;###autoload
(defun ibuffer-mouse-toggle-filter-group (event)
"Toggle the display status of the filter group chosen with the mouse."
- (interactive "e")
+ (interactive "e" ibuffer-mode)
(ibuffer-toggle-filter-group-1 (save-excursion
(mouse-set-point event)
(point))))
@@ -444,7 +445,7 @@ format. See `ibuffer-update-saved-filters-format' and
;;;###autoload
(defun ibuffer-toggle-filter-group ()
"Toggle the display status of the filter group on this line."
- (interactive)
+ (interactive nil ibuffer-mode)
(ibuffer-toggle-filter-group-1 (point)))
(defun ibuffer-toggle-filter-group-1 (posn)
@@ -460,7 +461,7 @@ format. See `ibuffer-update-saved-filters-format' and
;;;###autoload
(defun ibuffer-forward-filter-group (&optional count)
"Move point forwards by COUNT filtering groups."
- (interactive "P")
+ (interactive "P" ibuffer-mode)
(unless count
(setq count 1))
(when (> count 0)
@@ -477,7 +478,7 @@ format. See `ibuffer-update-saved-filters-format' and
;;;###autoload
(defun ibuffer-backward-filter-group (&optional count)
"Move point backwards by COUNT filtering groups."
- (interactive "P")
+ (interactive "P" ibuffer-mode)
(unless count
(setq count 1))
(when (> count 0)
@@ -766,7 +767,7 @@ specification, with the same structure as an element of the list
;;;###autoload
(defun ibuffer-filters-to-filter-group (name)
"Make the current filters into a filtering group."
- (interactive "sName for filtering group: ")
+ (interactive "sName for filtering group: " ibuffer-mode)
(when (null ibuffer-filtering-qualifiers)
(error "No filters in effect"))
(push (cons name ibuffer-filtering-qualifiers) ibuffer-filter-groups)
@@ -775,7 +776,7 @@ specification, with the same structure as an element of the list
;;;###autoload
(defun ibuffer-set-filter-groups-by-mode ()
"Set the current filter groups to filter by mode."
- (interactive)
+ (interactive nil ibuffer-mode)
(setq ibuffer-filter-groups
(mapcar (lambda (mode)
(cons (format "%s" mode) `((mode . ,mode))))
@@ -792,7 +793,7 @@ specification, with the same structure as an element of the list
;;;###autoload
(defun ibuffer-pop-filter-group ()
"Remove the first filter group."
- (interactive)
+ (interactive nil ibuffer-mode)
(when (null ibuffer-filter-groups)
(error "No filter groups active"))
(setq ibuffer-hidden-filter-groups
@@ -821,7 +822,8 @@ specification, with the same structure as an element of the list
(defun ibuffer-decompose-filter-group (group)
"Decompose the filter group GROUP into active filters."
(interactive
- (list (ibuffer-read-filter-group-name "Decompose filter group: " t)))
+ (list (ibuffer-read-filter-group-name "Decompose filter group: " t))
+ ibuffer-mode)
(let ((data (cdr (assoc group ibuffer-filter-groups))))
(setq ibuffer-filter-groups (ibuffer-remove-alist
group ibuffer-filter-groups)
@@ -831,7 +833,7 @@ specification, with the same structure as an element of the list
;;;###autoload
(defun ibuffer-clear-filter-groups ()
"Remove all filter groups."
- (interactive)
+ (interactive nil ibuffer-mode)
(setq ibuffer-filter-groups nil
ibuffer-hidden-filter-groups nil)
(ibuffer-update nil t))
@@ -856,7 +858,8 @@ specification, with the same structure as an element of the list
(defun ibuffer-jump-to-filter-group (name)
"Move point to the filter group whose name is NAME."
(interactive
- (list (ibuffer-read-filter-group-name "Jump to filter group: ")))
+ (list (ibuffer-read-filter-group-name "Jump to filter group: "))
+ ibuffer-mode)
(if-let* ((it (assoc name (ibuffer-current-filter-groups-with-position))))
(goto-char (cdr it))
(error "No filter group with name %s" name)))
@@ -865,7 +868,8 @@ specification, with the same structure as an element of the list
(defun ibuffer-kill-filter-group (name)
"Kill the filter group named NAME.
The group will be added to `ibuffer-filter-group-kill-ring'."
- (interactive (list (ibuffer-read-filter-group-name "Kill filter group: " t)))
+ (interactive (list (ibuffer-read-filter-group-name "Kill filter group: " t))
+ ibuffer-mode)
(when (equal name "Default")
(error "Can't kill default filter group"))
(if-let* ((it (assoc name ibuffer-filter-groups)))
@@ -882,7 +886,7 @@ The group will be added to `ibuffer-filter-group-kill-ring'."
(defun ibuffer-kill-line (&optional arg interactive-p)
"Kill the filter group at point.
See also `ibuffer-kill-filter-group'."
- (interactive "P\np")
+ (interactive "P\np" ibuffer-mode)
(if-let* ((it (save-excursion
(ibuffer-forward-line 0)
(get-text-property (point) 'ibuffer-filter-group-name))))
@@ -914,7 +918,7 @@ See also `ibuffer-kill-filter-group'."
;;;###autoload
(defun ibuffer-yank ()
"Yank the last killed filter group before group at point."
- (interactive)
+ (interactive nil ibuffer-mode)
(ibuffer-yank-filter-group
(or (get-text-property (point) 'ibuffer-filter-group-name)
(get-text-property (point) 'ibuffer-filter-group)
@@ -924,7 +928,8 @@ See also `ibuffer-kill-filter-group'."
(defun ibuffer-yank-filter-group (name)
"Yank the last killed filter group before group named NAME."
(interactive (list (ibuffer-read-filter-group-name
- "Yank filter group before group: ")))
+ "Yank filter group before group: "))
+ ibuffer-mode)
(unless ibuffer-filter-group-kill-ring
(error "The Ibuffer filter group kill-ring is empty"))
(save-excursion
@@ -943,7 +948,8 @@ prompt for NAME, and use the current filters."
(error "No filter groups active")
(list
(read-from-minibuffer "Save current filter groups as: ")
- ibuffer-filter-groups)))
+ ibuffer-filter-groups))
+ ibuffer-mode)
(if-let* ((it (assoc name ibuffer-saved-filter-groups)))
(setcdr it groups)
(push (cons name groups) ibuffer-saved-filter-groups))
@@ -958,7 +964,8 @@ They are removed from `ibuffer-saved-filter-groups'."
(if (null ibuffer-saved-filter-groups)
(error "No saved filter groups")
(completing-read "Delete saved filter group: "
- ibuffer-saved-filter-groups nil t))))
+ ibuffer-saved-filter-groups nil t)))
+ ibuffer-mode)
(setq ibuffer-saved-filter-groups
(ibuffer-remove-alist name ibuffer-saved-filter-groups))
(ibuffer-maybe-save-stuff)
@@ -979,7 +986,8 @@ The value from `ibuffer-saved-filter-groups' is used."
(caar ibuffer-saved-filter-groups))
(t
(completing-read "Switch to saved filter group: "
- ibuffer-saved-filter-groups nil t)))))
+ ibuffer-saved-filter-groups nil t))))
+ ibuffer-mode)
(setq ibuffer-filter-groups (cdr (assoc name ibuffer-saved-filter-groups))
ibuffer-hidden-filter-groups nil)
(ibuffer-update nil t))
@@ -989,7 +997,7 @@ The value from `ibuffer-saved-filter-groups' is used."
"Disable all filters currently in effect in this buffer.
With optional arg DELETE-FILTER-GROUPS non-nil, delete all filter
group definitions by setting `ibuffer-filter-groups' to nil."
- (interactive)
+ (interactive nil ibuffer-mode)
(setq ibuffer-filtering-qualifiers nil)
(if delete-filter-groups
(setq ibuffer-filter-groups nil))
@@ -1001,7 +1009,7 @@ group definitions by setting `ibuffer-filter-groups' to nil."
;;;###autoload
(defun ibuffer-pop-filter ()
"Remove the top filter in this buffer."
- (interactive)
+ (interactive nil ibuffer-mode)
(when (null ibuffer-filtering-qualifiers)
(error "No filters in effect"))
(pop ibuffer-filtering-qualifiers)
@@ -1024,7 +1032,7 @@ return the updated list."
This means that the topmost filter on the filtering stack, which must
be a complex filter like (OR [name: foo] [mode: bar-mode]), will be
turned into separate filters, like [name: foo] and [mode: bar-mode]."
- (interactive)
+ (interactive nil ibuffer-mode)
(unless ibuffer-filtering-qualifiers
(error "No filters in effect"))
(let* ((filters ibuffer-filtering-qualifiers)
@@ -1048,7 +1056,7 @@ turned into separate filters, like [name: foo] and [mode: bar-mode]."
;;;###autoload
(defun ibuffer-exchange-filters ()
"Exchange the top two filters on the stack in this buffer."
- (interactive)
+ (interactive nil ibuffer-mode)
(let ((filters ibuffer-filtering-qualifiers))
(when (< (length filters) 2)
(error "Need two filters to exchange"))
@@ -1058,7 +1066,7 @@ turned into separate filters, like [name: foo] and [mode: bar-mode]."
;;;###autoload
(defun ibuffer-negate-filter ()
"Negate the sense of the top filter in the current buffer."
- (interactive)
+ (interactive nil ibuffer-mode)
(when (null ibuffer-filtering-qualifiers)
(error "No filters in effect"))
(let ((lim (pop ibuffer-filtering-qualifiers)))
@@ -1088,7 +1096,7 @@ turned into separate filters, like [name: foo] and [mode: bar-mode]."
"Replace the top two filters in this buffer with their logical OR.
If optional argument DECOMPOSE is non-nil, instead break the top OR
filter into parts."
- (interactive "P")
+ (interactive "P" ibuffer-mode)
(ibuffer--or-and-filter 'or decompose))
;;;###autoload
@@ -1096,7 +1104,7 @@ filter into parts."
"Replace the top two filters in this buffer with their logical AND.
If optional argument DECOMPOSE is non-nil, instead break the top AND
filter into parts."
- (interactive "P")
+ (interactive "P" ibuffer-mode)
(ibuffer--or-and-filter 'and decompose))
(defun ibuffer-maybe-save-stuff ()
@@ -1115,7 +1123,8 @@ Interactively, prompt for NAME, and use the current filters."
(error "No filters currently in effect")
(list
(read-from-minibuffer "Save current filters as: ")
- ibuffer-filtering-qualifiers)))
+ ibuffer-filtering-qualifiers))
+ ibuffer-mode)
(if-let* ((it (assoc name ibuffer-saved-filters)))
(setcdr it filters)
(push (cons name filters) ibuffer-saved-filters))
@@ -1129,7 +1138,8 @@ Interactively, prompt for NAME, and use the current filters."
(if (null ibuffer-saved-filters)
(error "No saved filters")
(completing-read "Delete saved filters: "
- ibuffer-saved-filters nil t))))
+ ibuffer-saved-filters nil t)))
+ ibuffer-mode)
(setq ibuffer-saved-filters
(ibuffer-remove-alist name ibuffer-saved-filters))
(ibuffer-maybe-save-stuff)
@@ -1143,7 +1153,8 @@ Interactively, prompt for NAME, and use the current filters."
(if (null ibuffer-saved-filters)
(error "No saved filters")
(completing-read "Add saved filters: "
- ibuffer-saved-filters nil t))))
+ ibuffer-saved-filters nil t)))
+ ibuffer-mode)
(push (cons 'saved name) ibuffer-filtering-qualifiers)
(ibuffer-update nil t))
@@ -1155,7 +1166,8 @@ Interactively, prompt for NAME, and use the current filters."
(if (null ibuffer-saved-filters)
(error "No saved filters")
(completing-read "Switch to saved filters: "
- ibuffer-saved-filters nil t))))
+ ibuffer-saved-filters nil t)))
+ ibuffer-mode)
(setq ibuffer-filtering-qualifiers (list (cons 'saved name)))
(ibuffer-update nil t))
@@ -1397,7 +1409,7 @@ Indicates corresponding key sequences in echo area after filtering.
The completion matches against the filter description text of
each filter in `ibuffer-filtering-alist'."
- (interactive)
+ (interactive nil ibuffer-mode)
(let* ((filters (mapcar (lambda (x) (cons (cadr x) (car x)))
ibuffer-filtering-alist))
(match (completing-read "Filter by: " filters nil t))
@@ -1421,7 +1433,7 @@ Default sorting modes are:
Name - the name of the buffer
Major Mode - the name of the major mode of the buffer
Size - the size of the buffer"
- (interactive)
+ (interactive nil ibuffer-mode)
(let ((modes (mapcar #'car ibuffer-sorting-functions-alist)))
(cl-pushnew 'recency modes)
(setq modes (sort modes #'string-lessp))
@@ -1434,7 +1446,7 @@ Default sorting modes are:
;;;###autoload
(defun ibuffer-invert-sorting ()
"Toggle whether or not sorting is in reverse order."
- (interactive)
+ (interactive nil ibuffer-mode)
(setq ibuffer-sorting-reversep (not ibuffer-sorting-reversep))
(message "Sorting order %s"
(if ibuffer-sorting-reversep
@@ -1509,7 +1521,7 @@ Ordering is lexicographic."
(defun ibuffer-bs-toggle-all ()
"Emulate `bs-toggle-show-all' from the bs.el package."
- (interactive)
+ (interactive nil ibuffer-mode)
(if ibuffer-filtering-qualifiers
(ibuffer-pop-filter)
(progn (ibuffer-push-filter '(filename . ".*"))
@@ -1525,7 +1537,8 @@ for this Ibuffer session."
(interactive
(list
(read-from-minibuffer "Never show buffers matching: "
- (regexp-quote (buffer-name (ibuffer-current-buffer t))))))
+ (regexp-quote (buffer-name (ibuffer-current-buffer t)))))
+ ibuffer-mode)
(push regexp ibuffer-tmp-hide-regexps))
;;;###autoload
@@ -1536,7 +1549,8 @@ for this Ibuffer session."
(interactive
(list
(read-from-minibuffer "Always show buffers matching: "
- (regexp-quote (buffer-name (ibuffer-current-buffer t))))))
+ (regexp-quote (buffer-name (ibuffer-current-buffer t)))))
+ ibuffer-mode)
(push regexp ibuffer-tmp-show-regexps))
;;;###autoload
@@ -1548,7 +1562,7 @@ to move by. The default is `ibuffer-marked-char'.
If DIRECTION is non-nil, it should be an integer; negative integers
mean move backwards, non-negative integers mean move forwards."
- (interactive "P")
+ (interactive "P" ibuffer-mode)
(unless count
(setq count 1))
(unless mark
@@ -1572,13 +1586,13 @@ mean move backwards, non-negative integers mean move forwards."
If MARK is non-nil, it should be a character denoting the type of mark
to move by. The default is `ibuffer-marked-char'."
- (interactive "P")
+ (interactive "P" ibuffer-mode)
(ibuffer-forward-next-marked count mark -1))
;;;###autoload
(defun ibuffer-do-kill-lines ()
"Hide all of the currently marked lines."
- (interactive)
+ (interactive nil ibuffer-mode)
(if (= (ibuffer-count-marked-lines) 0)
(message (substitute-command-keys
(concat
@@ -1613,7 +1627,8 @@ a prefix argument reverses the meaning of that variable."
(error "No buffers!"))
(completing-read "Jump to buffer: "
table nil t))
- (read-buffer "Jump to buffer: " nil t)))))
+ (read-buffer "Jump to buffer: " nil t))))
+ ibuffer-mode)
(when (not (string= "" name))
(let (buf-point)
;; Blindly search for our buffer: it is very likely that it is
@@ -1686,7 +1701,7 @@ without erasing it."
If no buffers are marked, use buffer at point.
This requires the external program `diff-command' to be in your
`exec-path'."
- (interactive)
+ (interactive nil ibuffer-mode)
(require 'diff)
(let ((marked-bufs (or (ibuffer-get-marked-buffers)
(list (ibuffer-current-buffer t))))
@@ -1722,7 +1737,7 @@ With \\[universal-argument], use the filename of each marked file relative
to `ibuffer-default-directory' if non-nil, otherwise `default-directory'.
You can then feed the file name(s) to other commands with \\[yank]."
- (interactive "P")
+ (interactive "P" ibuffer-mode)
(let* ((buffers (cond ((and (integerp arg) (not (zerop arg)))
(ibuffer--near-buffers arg))
(t
@@ -1755,7 +1770,7 @@ You can then feed the file name(s) to other commands with \\[yank]."
"Copy buffer names of marked (or next ARG) buffers into the kill ring.
The names are separated by a space.
You can then feed the file name(s) to other commands with \\[yank]."
- (interactive "P")
+ (interactive "P" ibuffer-mode)
(let* ((buffers (cond ((and (integerp arg) (not (zerop arg)))
(ibuffer--near-buffers arg))
(t
@@ -1785,7 +1800,7 @@ You can then feed the file name(s) to other commands with \\[yank]."
;;;###autoload
(defun ibuffer-mark-by-name-regexp (regexp)
"Mark all buffers whose name matches REGEXP."
- (interactive "sMark by name (regexp): ")
+ (interactive "sMark by name (regexp): " ibuffer-mode)
(ibuffer-mark-on-buffer
(lambda (buf)
(string-match regexp (buffer-name buf)))))
@@ -1801,7 +1816,7 @@ When BUF nil, default to the buffer at current line."
;;;###autoload
(defun ibuffer-mark-by-locked ()
"Mark all locked buffers."
- (interactive)
+ (interactive nil ibuffer-mode)
(when (featurep 'emacs-lock)
(ibuffer-mark-on-buffer
(lambda (buf)
@@ -1810,7 +1825,7 @@ When BUF nil, default to the buffer at current line."
;;;###autoload
(defun ibuffer-mark-by-mode-regexp (regexp)
"Mark all buffers whose major mode matches REGEXP."
- (interactive "sMark by major mode (regexp): ")
+ (interactive "sMark by major mode (regexp): " ibuffer-mode)
(ibuffer-mark-on-buffer
(lambda (buf)
(with-current-buffer buf
@@ -1819,7 +1834,7 @@ When BUF nil, default to the buffer at current line."
;;;###autoload
(defun ibuffer-mark-by-file-name-regexp (regexp)
"Mark all buffers whose file name matches REGEXP."
- (interactive (list (read-regexp "Mark by file name (regexp)")))
+ (interactive (list (read-regexp "Mark by file name (regexp)")) ibuffer-mode)
(ibuffer-mark-on-buffer
(lambda (buf)
(when-let* ((name (with-current-buffer buf (ibuffer-buffer-file-name))))
@@ -1834,7 +1849,8 @@ Otherwise buffers whose name matches an element of
`ibuffer-never-search-content-name' or whose major mode is on
`ibuffer-never-search-content-mode' are excluded."
(interactive (let ((reg (read-string "Mark by content (regexp): ")))
- (list reg current-prefix-arg)))
+ (list reg current-prefix-arg))
+ ibuffer-mode)
(ibuffer-mark-on-buffer
(lambda (buf)
(let ((mode (with-current-buffer buf major-mode))
@@ -1863,7 +1879,8 @@ Otherwise buffers whose name matches an element of
(list (intern
(completing-read
(format-prompt "Mark by major mode" default)
- (ibuffer-list-buffer-modes) nil t nil nil default)))))
+ (ibuffer-list-buffer-modes) nil t nil nil default))))
+ ibuffer-mode)
(ibuffer-mark-on-buffer
(lambda (buf)
(eq (buffer-local-value 'major-mode buf) mode))))
@@ -1871,13 +1888,13 @@ Otherwise buffers whose name matches an element of
;;;###autoload
(defun ibuffer-mark-modified-buffers ()
"Mark all modified buffers."
- (interactive)
+ (interactive nil ibuffer-mode)
(ibuffer-mark-on-buffer #'buffer-modified-p))
;;;###autoload
(defun ibuffer-mark-unsaved-buffers ()
"Mark all modified buffers that have an associated file."
- (interactive)
+ (interactive nil ibuffer-mode)
(ibuffer-mark-on-buffer
(lambda (buf) (and (buffer-local-value 'buffer-file-name buf)
(buffer-modified-p buf)))))
@@ -1885,7 +1902,7 @@ Otherwise buffers whose name matches an element of
;;;###autoload
(defun ibuffer-mark-dissociated-buffers ()
"Mark all buffers whose associated file does not exist."
- (interactive)
+ (interactive nil ibuffer-mode)
(ibuffer-mark-on-buffer
(lambda (buf)
(with-current-buffer buf
@@ -1900,7 +1917,7 @@ Otherwise buffers whose name matches an element of
;;;###autoload
(defun ibuffer-mark-help-buffers ()
"Mark buffers whose major mode is in variable `ibuffer-help-buffer-modes'."
- (interactive)
+ (interactive nil ibuffer-mode)
(ibuffer-mark-on-buffer
(lambda (buf)
(with-current-buffer buf
@@ -1909,7 +1926,7 @@ Otherwise buffers whose name matches an element of
;;;###autoload
(defun ibuffer-mark-compressed-file-buffers ()
"Mark buffers whose associated file is compressed."
- (interactive)
+ (interactive nil ibuffer-mode)
(ibuffer-mark-on-buffer
(lambda (buf)
(with-current-buffer buf
@@ -1920,7 +1937,7 @@ Otherwise buffers whose name matches an element of
;;;###autoload
(defun ibuffer-mark-old-buffers ()
"Mark buffers which have not been viewed in `ibuffer-old-time' hours."
- (interactive)
+ (interactive nil ibuffer-mode)
(ibuffer-mark-on-buffer
(lambda (buf)
(with-current-buffer buf
@@ -1932,7 +1949,7 @@ Otherwise buffers whose name matches an element of
;;;###autoload
(defun ibuffer-mark-special-buffers ()
"Mark all buffers whose name begins and ends with `*'."
- (interactive)
+ (interactive nil ibuffer-mode)
(ibuffer-mark-on-buffer
(lambda (buf) (string-match "^\\*.+\\*$"
(buffer-name buf)))))
@@ -1940,14 +1957,14 @@ Otherwise buffers whose name matches an element of
;;;###autoload
(defun ibuffer-mark-read-only-buffers ()
"Mark all read-only buffers."
- (interactive)
+ (interactive nil ibuffer-mode)
(ibuffer-mark-on-buffer
(lambda (buf) (buffer-local-value 'buffer-read-only buf))))
;;;###autoload
(defun ibuffer-mark-dired-buffers ()
"Mark all `dired' buffers."
- (interactive)
+ (interactive nil ibuffer-mode)
(ibuffer-mark-on-buffer
(lambda (buf) (eq (buffer-local-value 'major-mode buf) 'dired-mode))))
@@ -1956,7 +1973,7 @@ Otherwise buffers whose name matches an element of
"View lines which match REGEXP in all marked buffers.
Optional argument NLINES says how many lines of context to display: it
defaults to one."
- (interactive (occur-read-primary-args))
+ (interactive (occur-read-primary-args) ibuffer-mode)
(if (or (not (integerp nlines))
(< nlines 0))
(setq nlines 0))
diff --git a/lisp/ibuf-macs.el b/lisp/ibuf-macs.el
index d9cb1e7f88f..c184442665a 100644
--- a/lisp/ibuf-macs.el
+++ b/lisp/ibuf-macs.el
@@ -146,7 +146,7 @@ value if and only if `a' is \"less than\" `b'.
`(progn
(defun ,(intern (concat "ibuffer-do-sort-by-" (symbol-name name))) ()
,(or documentation "No :documentation specified for this sorting method.")
- (interactive "@")
+ (interactive "@" ibuffer-mode)
(setq ibuffer-sorting-mode ',name)
(when (eq ibuffer-sorting-mode ibuffer-last-sorting-mode)
(setq ibuffer-sorting-reversep (not ibuffer-sorting-reversep)))
@@ -230,9 +230,7 @@ buffer object.
;; FIXME: Unused?
(funcall active-opstring)
active-opstring)))
- ,(if (not (null interactive))
- `(interactive ,interactive)
- '(interactive))
+ (interactive ,interactive ibuffer-mode)
(cl-assert (derived-mode-p 'ibuffer-mode))
(setq ibuffer-did-modification nil)
(let ((marked-names (,(pcase mark
@@ -334,7 +332,7 @@ bound to the current value of the filter.
`(progn
(defun ,fn-name (qualifier)
,(or documentation "This filter is not documented.")
- (interactive (list ,reader))
+ (interactive (list ,reader) ibuffer-mode)
(let ((,filter (cons ',name qualifier))
(,qualifier-str qualifier))
,(when accept-list
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index c8c622969c3..c05b4fc8330 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -854,7 +854,7 @@ width and the longest string in LIST."
(defun ibuffer-mouse-toggle-mark (event)
"Toggle the marked status of the buffer chosen with the mouse."
- (interactive "e")
+ (interactive "e" ibuffer-mode)
(unwind-protect
(let ((pt (save-excursion
(mouse-set-point event)
@@ -878,12 +878,13 @@ width and the longest string in LIST."
default-directory)
default-directory))))
(list (read-file-name "Find file: " default-directory)
- t)))
+ t))
+ ibuffer-mode)
(find-file file wildcards))
(defun ibuffer-mouse-visit-buffer (event)
"Visit the buffer chosen with the mouse."
- (interactive "e")
+ (interactive "e" ibuffer-mode)
(switch-to-buffer
(save-excursion
(mouse-set-point event)
@@ -891,7 +892,7 @@ width and the longest string in LIST."
(defun ibuffer-mouse-popup-menu (event)
"Display a menu of operations."
- (interactive "e")
+ (interactive "e" ibuffer-mode)
(let ((eventpt (posn-point (event-end event)))
(origpt (point)))
(unwind-protect
@@ -922,12 +923,12 @@ width and the longest string in LIST."
(defun ibuffer-customize ()
"Begin customizing Ibuffer interactively."
- (interactive)
+ (interactive nil ibuffer-mode)
(customize-group 'ibuffer))
(defun ibuffer-backward-line (&optional arg skip-group-names)
"Move backwards ARG lines, wrapping around the list if necessary."
- (interactive "P")
+ (interactive "P" ibuffer-mode)
(or arg (setq arg 1))
(beginning-of-line)
(while (> arg 0)
@@ -951,7 +952,7 @@ width and the longest string in LIST."
(defun ibuffer-forward-line (&optional arg skip-group-names)
"Move forward ARG lines, wrapping around the list if necessary."
- (interactive "P")
+ (interactive "P" ibuffer-mode)
(or arg (setq arg 1))
(beginning-of-line)
(when (and ibuffer-movement-cycle
@@ -985,7 +986,7 @@ width and the longest string in LIST."
"Visit the buffer on this line.
If optional argument SINGLE is non-nil, then also ensure there is only
one window."
- (interactive "P")
+ (interactive "P" ibuffer-mode)
(let ((buf (ibuffer-current-buffer t)))
(switch-to-buffer buf)
(when single
@@ -993,7 +994,7 @@ one window."
(defun ibuffer-visit-buffer-other-window (&optional noselect)
"Visit the buffer on this line in another window."
- (interactive)
+ (interactive nil ibuffer-mode)
(let ((buf (ibuffer-current-buffer t)))
(bury-buffer (current-buffer))
(if noselect
@@ -1002,24 +1003,24 @@ one window."
(defun ibuffer-visit-buffer-other-window-noselect ()
"Visit the buffer on this line in another window, but don't select it."
- (interactive)
+ (interactive nil ibuffer-mode)
(ibuffer-visit-buffer-other-window t))
(defun ibuffer-visit-buffer-other-frame ()
"Visit the buffer on this line in another frame."
- (interactive)
+ (interactive nil ibuffer-mode)
(let ((buf (ibuffer-current-buffer t)))
(bury-buffer (current-buffer))
(switch-to-buffer-other-frame buf)))
(defun ibuffer-visit-buffer-1-window ()
"Visit the buffer on this line, and delete other windows."
- (interactive)
+ (interactive nil ibuffer-mode)
(ibuffer-visit-buffer t))
(defun ibuffer-bury-buffer ()
"Bury the buffer on this line."
- (interactive)
+ (interactive nil ibuffer-mode)
(let ((buf (ibuffer-current-buffer t))
(line (+ 1 (count-lines 1 (point)))))
(bury-buffer buf)
@@ -1029,7 +1030,7 @@ one window."
(defun ibuffer-visit-tags-table ()
"Visit the tags table in the buffer on this line. See `visit-tags-table'."
- (interactive)
+ (interactive nil ibuffer-mode)
(let ((file (buffer-file-name (ibuffer-current-buffer t))))
(if file
(visit-tags-table file)
@@ -1040,12 +1041,12 @@ one window."
If optional argument OTHER-FRAME is non-nil, then display each
marked buffer in a new frame. Otherwise, display each buffer as
a new window in the current frame, splitting vertically."
- (interactive)
+ (interactive nil ibuffer-mode)
(ibuffer-do-view-1 (if other-frame 'other-frame 'vertically)))
(defun ibuffer-do-view-horizontally (&optional other-frame)
"As `ibuffer-do-view', but split windows horizontally."
- (interactive)
+ (interactive nil ibuffer-mode)
(ibuffer-do-view-1 (if other-frame 'other-frame 'horizontally)))
(defun ibuffer-do-view-1 (type)
@@ -1077,7 +1078,7 @@ a new window in the current frame, splitting vertically."
(defun ibuffer-do-view-other-frame ()
"View each of the marked buffers in a separate frame."
- (interactive)
+ (interactive nil ibuffer-mode)
(ibuffer-do-view t))
(defsubst ibuffer-map-marked-lines (func)
@@ -1265,7 +1266,7 @@ Otherwise, toggle lock status."
(defun ibuffer-unmark-all (mark)
"Unmark all buffers with mark MARK."
- (interactive "cRemove marks (RET means all):")
+ (interactive "cRemove marks (RET means all):" ibuffer-mode)
(if (= (ibuffer-count-marked-lines t) 0)
(message (substitute-command-keys
"No buffers marked; use \\<ibuffer-mode-map>\
@@ -1280,7 +1281,7 @@ Otherwise, toggle lock status."
(defun ibuffer-unmark-all-marks ()
"Remove all marks from all marked buffers in Ibuffer."
- (interactive)
+ (interactive nil ibuffer-mode)
;; hm. we could probably do this in a better fashion
(ibuffer-unmark-all ?\r))
@@ -1290,7 +1291,7 @@ In other words, unmarked buffers become marked, and marked buffers
become unmarked.
If point is on a group name, then this function operates on that
group."
- (interactive)
+ (interactive nil ibuffer-mode)
(when-let* ((it (get-text-property (point) 'ibuffer-filter-group-name)))
(setq group it))
(let ((count
@@ -1316,7 +1317,8 @@ OLD and NEW are both characters used to mark buffers."
(old (progn (message "Change (old mark): ") (read-char)))
(new (progn (message "Change %c marks to (new mark): " old)
(read-char))))
- (list old new)))
+ (list old new))
+ ibuffer-mode)
(if (or (eq old ?\r) (eq new ?\r))
(ding)
(let ((count
@@ -1334,19 +1336,19 @@ OLD and NEW are both characters used to mark buffers."
(defun ibuffer-mark-forward (start end arg)
"Mark the buffers in the region, or ARG buffers.
If point is on a group name, this function operates on that group."
- (interactive (ibuffer-get-region-and-prefix))
+ (interactive (ibuffer-get-region-and-prefix) ibuffer-mode)
(ibuffer-mark-region-or-n-with-char start end arg ibuffer-marked-char))
(defun ibuffer-unmark-forward (start end arg)
"Unmark the buffers in the region, or ARG buffers.
If point is on a group name, this function operates on that group."
- (interactive (ibuffer-get-region-and-prefix))
+ (interactive (ibuffer-get-region-and-prefix) ibuffer-mode)
(ibuffer-mark-region-or-n-with-char start end arg ?\s))
(defun ibuffer-unmark-backward (start end arg)
"Unmark the buffers in the region, or previous ARG buffers.
If point is on a group name, this function operates on that group."
- (interactive (ibuffer-get-region-and-prefix))
+ (interactive (ibuffer-get-region-and-prefix) ibuffer-mode)
(ibuffer-unmark-forward start end (- arg)))
(defun ibuffer-mark-region-or-n-with-char (start end arg mark-char)
@@ -1396,13 +1398,13 @@ If point is on a group name, this function operates on that group."
(defun ibuffer-mark-for-delete (start end arg)
"Mark for deletion the buffers in the region, or ARG buffers.
If point is on a group name, this function operates on that group."
- (interactive (ibuffer-get-region-and-prefix))
+ (interactive (ibuffer-get-region-and-prefix) ibuffer-mode)
(ibuffer-mark-region-or-n-with-char start end arg ibuffer-deletion-char))
(defun ibuffer-mark-for-delete-backwards (arg)
"Mark for deletion the ARG previous buffers.
If point is on a group name, this function operates on that group."
- (interactive "p")
+ (interactive "p" ibuffer-mode)
(ibuffer-mark-interactive arg ibuffer-deletion-char -1))
(defun ibuffer-current-buffer (&optional must-be-live)
@@ -1642,7 +1644,7 @@ If point is on a group name, this function operates on that group."
(defun ibuffer-recompile-formats ()
"Recompile `ibuffer-formats'."
- (interactive)
+ (interactive nil ibuffer-mode)
(setq ibuffer-compiled-formats
(mapcar #'ibuffer-compile-format ibuffer-formats))
(when (boundp 'ibuffer-filter-format-alist)
@@ -2063,7 +2065,7 @@ BUF defaults to the current buffer."
(defun ibuffer-switch-format ()
"Switch the current display format."
- (interactive)
+ (interactive nil ibuffer-mode)
(ibuffer-assert-ibuffer-mode)
(unless (consp ibuffer-formats)
(error "Ibuffer error: No formats!"))
@@ -2180,7 +2182,7 @@ BUF defaults to the current buffer."
This does not show new buffers; use `ibuffer-update' for that.
If optional arg SILENT is non-nil, do not display progress messages."
- (interactive)
+ (interactive nil ibuffer-mode)
(ibuffer-forward-line 0)
(unless silent
(message "Redisplaying current buffer list..."))
@@ -2201,7 +2203,7 @@ Prefix arg non-nil means to toggle whether buffers that match
`ibuffer-maybe-show-predicates' should be displayed.
If optional arg SILENT is non-nil, do not display progress messages."
- (interactive "P")
+ (interactive "P" ibuffer-mode)
(if arg
(setq ibuffer-display-maybe-show-predicates
(not ibuffer-display-maybe-show-predicates)))
@@ -2626,6 +2628,7 @@ filter groups are displayed in this order of precedence.
You may rearrange filter groups by using the usual pair
\\[ibuffer-kill-line] and \\[ibuffer-yank]. Yanked groups
will be inserted before the group at point."
+ :interactive nil
;; Include state info next to the mode name.
(setq-local mode-line-process
'(" by "
--
2.47.3
--=-=-=--
bug-gnu-emacs@HIDDEN:bug#81840; Package emacs.
Full text available.Received: (at 81840) by debbugs.gnu.org; 10 Sep 2026 10:28:19 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 10 06:28:19 2026 Received: from localhost ([127.0.0.1]:37253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1x4c0x-0001MO-6C for submit <at> debbugs.gnu.org; Thu, 10 Sep 2026 06:28:19 -0400 Received: from fout-b7-smtp.messagingengine.com ([202.12.124.150]:42115) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>) id 1x4c0v-0001LV-Cg for 81840 <at> debbugs.gnu.org; Thu, 10 Sep 2026 06:28:18 -0400 Received: from phl-compute-08.internal (phl-compute-08.internal [10.202.2.48]) by mailfout.stl.internal (Postfix) with ESMTP id F05D31D0008A; Thu, 10 Sep 2026 06:28:11 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-08.internal (MEProxy); Thu, 10 Sep 2026 06:28:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1789036091; x= 1789122491; bh=zsihL5FmwJoBAUB+huAPWrSw9WrBInLWVrQsTxpF7Hk=; b=K UBFsDpdqSslF7R1td1ue8yZRBbofWspAmhmY0tFHTQDX0ESVLtRpCMbIzBlUBVr/ D5Mc2XQkLm2SIyENbXBIvoaoPfuMbyaaatghpOenf6xbudc++zYZzQKv4ygK6x4x IWxK2bbz0u4pny8pTanrp9dceNfL5dlFq6AT3EZJCkZzh5TPNM3ER3gM/IldgZpW V5u+JnjrXZwZnkYURi4hwLD6YLZzZyG5Br+mKrT5RgQ/6SPaQnndOUgUPvRHDJB6 1KUzQYsBLy8k8IGeRUimqVFTgpptYAbvEXpBmbwwRaahqWIl8+L9kr7ryv29UZyi MaKKPGDcTRLM9O0oE3QzA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1789036091; x=1789122491; bh=zsihL5FmwJoBAUB+huAPWrSw9WrBInLWVrQ sTxpF7Hk=; b=EuEyILH2W6JPFctYphqoFngTbjm+Ozr2f/RtmFF7koQZrQsd3Ss 5dm37+TThD6qwQOwyDbxIS7KE2oOOMDRYcAMULq7eAdKvNRIr0Z4s6tZu7l4Et1b ze5c0NnFPA+MQ2fV9dc+ODPG6M3x0kKbu7BMTTKiyrgR7KiNqL6lPgW5bUyMzwdR xVDWPFQ4T79BsIZ7SS3VAjxPE1gb6Zuy1A/69R7BjH/zaqfYGz3OgnOA2PqSf/ZD qqkLKwDXDjiton3UXj+daKe7XCbmNHuU4lmTzrOVIhYCm8Zkqo39z3tv14z9X13E Zo77Op7ur7joGERjpjiVF2FSq28V4z9lC6Q== X-ME-Sender: <xms:O4aiak6d8xhb1-DApu1VWaH1qZPBlmd1BQNUuY5dx1Kef5yKz7eRgQ> <xme:O4aiatUFyNhi8eJKmALTlAFOxyTRHa4N_CiKTMPePn4YmrvodyFUFTzQK0Jy2ygjt 7sdUQwq3kc0woOwbfop7Z-iJjQLMyr7xPYouaL89O6Uskx1qcxwH4zq> X-ME-Received: <xmr:O4aiag3iQU15Bbr5AR2zYLsbvngjbYNNtPYFam1bJxa6YFVJlJ3s9J6YOJEdd_AxbNe75AgziwCsONJ0CY_SF6ZrhWcz3-2VNw> X-ME-Proxy-Cause: dmFkZTGhKwJgTyr9YFm9NtZwGU2bVdV9QPRdaUWHB708C/JtXnvEhJxLHU3G942FToW0R2 dGk3SS9BKU1SsTnFMhjkRWrp9VRG220omPwtJiJisb5p7cg0WSzlC6MscXrgu+0xVxbD75 HJWgHfBYMz8YAQhkYCsbwcPUH+JwAaMfC7y/DXCAKo9SMBrRENbaaUCeLFopax9+ucQfna aHhVV2zHGNprtLG+Buj96MP0fJrBHD4sQUryRPizoSEQqmuhkJeS2WFLUx2UfEfryvtptY AO1QE3gwSpKD5OyYrN+A5XHnWzEKA5ZkAWPNC8hdFG1peH68RFJuecwjvUiDubOZCI7HNA bshYqpWRC0kPBBG77ik3HtdrgKgRBMY7AsNvCeXnFIOsu8ucc47Pyae8x4y6dl9SY3zejp vsgPig9nPbIGv1sk7xEFC8KQ2VRZo2OvkTWpQxR8pZ7bhvRu74JykSidpKYP7f/+jqPCIf yZrovdtCZ1mF79mGzWhmbBa02MTPtpulx4WujjRyWeNX0Kz5mghyxdWvo14UcA7lm4PpRz 8lRe7iOrTdkxu3MbFeFMHzowSnAKEt9Z8pgfa2UcOTY/5whyND7AFfSYjMzjbb9FN0akC6 9XCb9JPC4yMQy41JJWEvNFSWY3lF7BkF6f+J3ti9rlm1qQ6hniM0ZfBjTIRA X-ME-Proxy: <xmx:O4aiai1x66irfSBY2fjTfsRPEdPqa5_WKFydU_DANJ2KY-j0OpTCPw> <xmx:O4aiar8ZyznQY9puCQYkhjX1rx6UdK6UfscOOqWHYE7u1TZj_vP-9w> <xmx:O4aian0RQX1UVkCw8ZUXmqA09r0nV-wPjBec682w7RqkCiIcbNP7JQ> <xmx:O4aiag_Keb0dxoUcwB1Q8QXvSMlLhcP_N18qhD8Ftf4HE_jNGLNFpA> <xmx:O4aiakcTu6i-RPKLG--l-vxdgu_iPqu8NqtxgWeoCRh9UL9aoKBUzcTk> Feedback-ID: i62564b17:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 10 Sep 2026 06:28:11 -0400 (EDT) Received: by athena.silentflame.com (Postfix, from userid 1000) id 7C77427DD34; Thu, 10 Sep 2026 11:28:10 +0100 (BST) From: Sean Whitton <spwhitton@HIDDEN> To: Daniel Mendler <mail@HIDDEN>, 81840 <at> debbugs.gnu.org Subject: Re: bug#81840: 31.1.50; [FR] Major mode tagging of commands In-Reply-To: <87h5jx5sqr.fsf@HIDDEN> References: <87h5jx5sqr.fsf@HIDDEN> Date: Thu, 10 Sep 2026 11:28:10 +0100 Message-ID: <87a4ppe6yt.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 81840 Cc: Philip Kaludercic <philipk@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Daniel Mendler via "Bug reports for GNU Emacs, the Swiss army knife of text editors" [10/Sep 12:02pm +02] wrote: > Is there interest in adding major mode tagging of commands? This would > affect many modes throughout the Emacs code base. The interactive > specification supports major mode tagging since Emacs version 28 iirc. > > For example most Ibuffer commands only work inside Ibuffer (as one would > expect). When they are invoked via M-x from another buffer they will > throw an error (via ibuffer-assert-ibuffer-mode). > > Therefore my suggestion is to start tagging more major modes. This is a > large undertaking since one has to go over many major modes, but it is > also a beginner friendly task. I've seen people ask on emacs-devel for > such tasks. Would it make sense to redirect people to this bug and would > you welcome such patches? Thanks. Yes, welcome. -- Sean Whitton
bug-gnu-emacs@HIDDEN:bug#81840; Package emacs.
Full text available.Received: (at 81840) by debbugs.gnu.org; 10 Sep 2026 10:20:54 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 10 06:20:54 2026 Received: from localhost ([127.0.0.1]:36932 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1x4btl-00010b-OU for submit <at> debbugs.gnu.org; Thu, 10 Sep 2026 06:20:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60436) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1x4bti-00010M-81 for 81840 <at> debbugs.gnu.org; Thu, 10 Sep 2026 06:20:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1x4btc-0003C2-78; Thu, 10 Sep 2026 06:20:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=iQOgtnAsbseL8VS30Pxm0at2SXMDgnl/PH3lM8VRCb8=; b=UKM0BwwffvRb 9shfEcFKcmYJ40YMFcZuzXiz8z+BByaRfwXExszTnYRdzMmUESY9k1wBYne9eA41BW7Iadz8IvspA BFavkZxpvihlotZIZerVXY4mxFb60Bi+gskBiAzZAaO6G3Hs0BfelzT6orEcFE3dHxAh6lbUjF83E rVfQaESU1Vjyn5P5NpB8lMa+JxcYRfX/bhNONvgjKGftK52NHTVfWpWWDYOIULeRAxM9YlmEu5GpT +Bkh12fwj8YovcXdKLpkVmDEbzgk8pwTaRYgGU8IpPmLQy1nJpEdaxDlIumdmG8FdlW4bvhQ4Ch3m KQQYhnlQZSi2sNhvt5Es1g==; Date: Thu, 10 Sep 2026 13:20:41 +0300 Message-Id: <86pkyl5rwm.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Daniel Mendler <mail@HIDDEN> In-Reply-To: <87h5jx5sqr.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN) Subject: Re: bug#81840: 31.1.50; [FR] Major mode tagging of commands References: <87h5jx5sqr.fsf@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 81840 Cc: 81840 <at> debbugs.gnu.org, philipk@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Cc: Philip Kaludercic <philipk@HIDDEN> > Date: Thu, 10 Sep 2026 12:02:36 +0200 > From: Daniel Mendler via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> > > Is there interest in adding major mode tagging of commands? This would > affect many modes throughout the Emacs code base. The interactive > specification supports major mode tagging since Emacs version 28 iirc. > > For example most Ibuffer commands only work inside Ibuffer (as one would > expect). When they are invoked via M-x from another buffer they will > throw an error (via ibuffer-assert-ibuffer-mode). > > Therefore my suggestion is to start tagging more major modes. This is a > large undertaking since one has to go over many major modes, but it is > also a beginner friendly task. I've seen people ask on emacs-devel for > such tasks. Would it make sense to redirect people to this bug and would > you welcome such patches? Thanks. We already started this process many moons ago, which is why quite a few commands are already tagged. Continuing this process is of course welcome.
bug-gnu-emacs@HIDDEN:bug#81840; Package emacs.
Full text available.Received: (at submit) by debbugs.gnu.org; 10 Sep 2026 10:03:06 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 10 06:03:06 2026 Received: from localhost ([127.0.0.1]:35540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1x4bcY-0008Bw-7t for submit <at> debbugs.gnu.org; Thu, 10 Sep 2026 06:03:06 -0400 Received: from lists1p.gnu.org ([2001:470:142::17]:44138) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1x4bcW-0008BQ-Li for submit <at> debbugs.gnu.org; Thu, 10 Sep 2026 06:03:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <mail@HIDDEN>) id 1x4bcR-00049v-AE for bug-gnu-emacs@HIDDEN; Thu, 10 Sep 2026 06:02:59 -0400 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1] helo=mail.qxqx.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <mail@HIDDEN>) id 1x4bcP-0007QE-1p for bug-gnu-emacs@HIDDEN; Thu, 10 Sep 2026 06:02:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=5vdzuVViA/y+k1CDHkCGrusKL/r0r5mZ3Jw9YC7tfWY=; b=OZ0N49fTi2ZfhiV4yekS2X58I5 a5lfJsncim0yphX4Fp2HuFeFF0DUvgaU1kmmGRlm8FWxDAs9JR4zidKPH11gyfowCFbvnx8i7clbp aaJVF6xU0qhg+szW2D+C5uplIRc9Q9xWcdi4thnipUBSekvYYxh7PEFmHejEFLJGRW0I=; From: Daniel Mendler <mail@HIDDEN> To: bug-gnu-emacs@HIDDEN Subject: 31.1.50; [FR] Major mode tagging of commands X-Debbugs-Cc: Philip Kaludercic <philipk@HIDDEN> Date: Thu, 10 Sep 2026 12:02:36 +0200 Message-ID: <87h5jx5sqr.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a01:4f8:c012:9177::1; envelope-from=mail@HIDDEN; helo=mail.qxqx.de 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.1 (/) Is there interest in adding major mode tagging of commands? This would affect many modes throughout the Emacs code base. The interactive specification supports major mode tagging since Emacs version 28 iirc. For example most Ibuffer commands only work inside Ibuffer (as one would expect). When they are invoked via M-x from another buffer they will throw an error (via ibuffer-assert-ibuffer-mode). Therefore my suggestion is to start tagging more major modes. This is a large undertaking since one has to go over many major modes, but it is also a beginner friendly task. I've seen people ask on emacs-devel for such tasks. Would it make sense to redirect people to this bug and would you welcome such patches? Thanks.
Daniel Mendler <mail@HIDDEN>:philipk@HIDDEN, bug-gnu-emacs@HIDDEN.
Full text available.philipk@HIDDEN, bug-gnu-emacs@HIDDEN:bug#81840; Package emacs.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.