* bug#75014: [PATCH] 30.0.92; ERC 5.6.0.30.1: Add interactive function to clear ERC channels' modified status
@ 2024-12-21 20:10 Alex Bochannek
0 siblings, 0 replies; only message in thread
From: Alex Bochannek @ 2024-12-21 20:10 UTC (permalink / raw)
To: 75014; +Cc: emacs-erc
[-- Attachment #1: Type: text/plain, Size: 654 bytes --]
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-interactive-function-to-clear-ERC-channels-modif.patch --]
[-- Type: text/x-patch, Size: 1031 bytes --]
From 65cbc68d2fcdff8654df53d8d9a0f4c7aeb12529 Mon Sep 17 00:00:00 2001
From: Alex Bochannek <alex@bochannek.com>
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)
[-- Attachment #3: Type: text/plain, Size: 10 bytes --]
--
Alex.
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-12-21 20:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-21 20:10 bug#75014: [PATCH] 30.0.92; ERC 5.6.0.30.1: Add interactive function to clear ERC channels' modified status Alex Bochannek
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).