GNU bug report logs - #75014
[PATCH] 30.0.92; ERC 5.6.0.30.1: Add interactive function to clear ERC channels' modified status

Previous Next

Package: emacs;

Reported by: Alex Bochannek <alex <at> bochannek.com>

Date: Sat, 21 Dec 2024 20:11:02 UTC

Severity: normal

Tags: patch

Done: "J.P." <jp <at> neverwas.me>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Alex Bochannek <alex <at> bochannek.com>
Subject: bug#75014: closed (Re: bug#75014: [PATCH] 30.0.92; ERC
 5.6.0.30.1: Add interactive function to clear ERC channels' modified
 status)
Date: Fri, 27 Dec 2024 23:30:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#75014: [PATCH] 30.0.92; ERC 5.6.0.30.1: Add interactive function to clear ERC channels' modified status

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 75014 <at> debbugs.gnu.org.

-- 
75014: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75014
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: "J.P." <jp <at> neverwas.me>
To: Alex Bochannek <alex <at> bochannek.com>
Cc: 75014-done <at> debbugs.gnu.org, emacs-erc <at> gnu.org
Subject: Re: bug#75014: [PATCH] 30.0.92; ERC 5.6.0.30.1: Add interactive
 function to clear ERC channels' modified status
Date: Fri, 27 Dec 2024 15:29:33 -0800
I installed a slightly altered version of this on master as

  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=63cc335a

Thanks and closing.

P.S. Feel free to reopen if the alterations seem unwise or unfair.

[Message part 3 (message/rfc822, inline)]
From: Alex Bochannek <alex <at> bochannek.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [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 part 4 (text/plain, inline)]
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.

[0001-Add-interactive-function-to-clear-ERC-channels-modif.patch (text/x-patch, inline)]
From 65cbc68d2fcdff8654df53d8d9a0f4c7aeb12529 Mon Sep 17 00:00:00 2001
From: Alex Bochannek <alex <at> 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)

[Message part 6 (text/plain, inline)]
-- 
Alex.

This bug report was last modified 134 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.