From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alex Bochannek Newsgroups: gmane.emacs.bugs,gmane.emacs.erc.general Subject: bug#75014: [PATCH] 30.0.92; ERC 5.6.0.30.1: Add interactive function to clear ERC channels' modified status Date: Sat, 21 Dec 2024 12:10:02 -0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28761"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-erc@gnu.org To: 75014@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 21 21:11:24 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1tP5oq-0007L3-7q for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 21 Dec 2024 21:11:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tP5oY-0001zb-9O; Sat, 21 Dec 2024 15:11:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tP5oV-0001zL-NP; Sat, 21 Dec 2024 15:11:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tP5oV-0007ul-F5; Sat, 21 Dec 2024 15:11:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=hmn+B6jvs+dwl5+COwkwgBBgSw8S2a7m/EMHSqsrkx8=; b=KNF2z6grFxuXH+/TZOgKVeuklL3Cs4D7soKdK1PtCdF1F++Pfd2Rbud2MYZoqSR6PvXy3bbGt0l9EvldvMrAijLQci2C8m1vsXflNX1XuJxbagT6eYlSx0zj/SL+XQt/WKVQ3csCxv4DwDZ10jDM2FL4lJpFi5KKTrUZql4Bz9ITSpJuENRHoeDhAh9VHz64bLfOMtY7mspDpGOMTqmofT8X8Xp3YdrgeF0uxvFLOMw/KaHlhcQY4yQqxpPN7mli6vx09/g1FyCF/eJpac5Pa0rmLOO7PHGw0Jm7w8vx6392P8gKepy/k8DeBkOWNC18R/ye6BtF6UjW9fzGEnk5Bw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tP5oU-0005jY-DQ; Sat, 21 Dec 2024 15:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alex Bochannek Original-Sender: "Debbugs-submit" Resent-CC: emacs-erc@gnu.org, bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Dec 2024 20:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 75014 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: emacs-erc@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.173481181721966 (code B ref -1); Sat, 21 Dec 2024 20:11:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Dec 2024 20:10:17 +0000 Original-Received: from localhost ([127.0.0.1]:47770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tP5nk-0005iE-JD for submit@debbugs.gnu.org; Sat, 21 Dec 2024 15:10:16 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:56330) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tP5nh-0005i5-VQ for submit@debbugs.gnu.org; Sat, 21 Dec 2024 15:10:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tP5nh-0001xU-LJ for bug-gnu-emacs@gnu.org; Sat, 21 Dec 2024 15:10:13 -0500 Original-Received: from ns.lapseofthought.com ([50.0.39.240] helo=mail.lapseofthought.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tP5nf-0007lJ-Co for bug-gnu-emacs@gnu.org; Sat, 21 Dec 2024 15:10:13 -0500 Original-Received: from awb-mbp-m3.local (unknown [IPv6:2601:646:4200:73a0:d8a7:9834:3c87:e621]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lapseofthought.com (Postfix) with ESMTPSA id 4YFwPS1mDJz3pp4G for ; Sat, 21 Dec 2024 12:10:04 -0800 (PST) Authentication-Results: ORIGINATING; auth=pass smtp.auth=alex smtp.mailfrom=alex@bochannek.com Received-SPF: pass client-ip=50.0.39.240; envelope-from=alex@bochannek.com; helo=mail.lapseofthought.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:297550 gmane.emacs.erc.general:2626 Archived-At: --=-=-= Content-Type: text/plain This small function is intended as an easy way to mark all channels as "read." This is useful when returning to an ERC session with multiple modified channels that are not displayed in a window. Their status is indicated in the mode line and in the ERC status sidebar, both of which this function clears. If this is a common enough task, it makes sense to bind this function to a key sequence, e.g.: (keymap-global-set "C-c e c" 'erc-modified-channels-clear) Note: I am not familiar with the ERC code base, so if calling the function something else makes more sense (I originally called it `erc-reset-modified-channels') I have no objection to it. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Add-interactive-function-to-clear-ERC-channels-modif.patch >From 65cbc68d2fcdff8654df53d8d9a0f4c7aeb12529 Mon Sep 17 00:00:00 2001 From: Alex Bochannek Date: Sat, 21 Dec 2024 11:39:08 -0800 Subject: [PATCH] Add interactive function to clear ERC channels' modified status status --- lisp/erc/erc-track.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el index 97fb7e726bd..8d6f804a42b 100644 --- a/lisp/erc/erc-track.el +++ b/lisp/erc/erc-track.el @@ -900,6 +900,13 @@ erc-modified-channels-remove-buffer (when (called-interactively-p 'interactive) (erc-modified-channels-display))) +(defun erc-modified-channels-clear () + "Remove all buffers from `erc-modified-channels-alist'." + (interactive) + (setq erc-modified-channels-alist nil) + (when (called-interactively-p 'interactive) + (erc-modified-channels-display))) + (defun erc-track-find-face (faces) "Return the face to use in the mode line." (declare (obsolete erc-track-select-mode-line-face "28.1")) -- 2.39.5 (Apple Git-154) --=-=-= Content-Type: text/plain -- Alex. --=-=-=--