GNU bug report logs -
#68985
30.0.50; Gnus: Add option to disable display of logo image in mode-line
Previous Next
Reported by: Mekeor Melire <mekeor <at> posteo.de>
Date: Wed, 7 Feb 2024 22:08:01 UTC
Severity: normal
Found in version 30.0.50
Done: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Fri, 09 Feb 2024 20:20:16 -0800
with message-id <87jzndympr.fsf <at> ericabrahamsen.net>
and subject line Re: bug#68985: [PATCH v3] Add option gnus-mode-line-logo
has caused the debbugs.gnu.org bug report #68985,
regarding 30.0.50; Gnus: Add option to disable display of logo image in mode-line
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
68985: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68985
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
By default, Gnus will attempt to display its logo as image in the
mode-line. I propose to introduce a defcustom variable that allows users
to disable its display. Find attached a patch that implements this. Let
me know your thoughts.
[0001-Add-option-gnus-mode-line-logo.patch (text/x-patch, inline)]
From 7d3eb97c746ecdd253a370e11727e3041537afe1 Mon Sep 17 00:00:00 2001
From: Mekeor Melire <mekeor <at> posteo.de>
Date: Wed, 7 Feb 2024 23:00:08 +0100
Subject: [PATCH] Add option gnus-mode-line-logo
* lisp/gnus/gnus.el (gnus-mode-line-logo): New option specifying the
display of the Gnus logo image in the mode-line.
* etc/NEWS: Announce the change.
---
etc/NEWS | 4 ++++
lisp/gnus/gnus.el | 8 +++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/etc/NEWS b/etc/NEWS
index ee7462cb2aa..b283717596c 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1098,6 +1098,10 @@ The gmane.org website is, sadly, down since a number of years with no
prospect of it coming back. Therefore, it is no longer valid to set
the user option 'nnweb-type' to 'gmane'.
+*** New user option 'gnus-mode-line-logo'.
+This allows the user to disable the display of the Gnus logo image in
+the mode-line.
+
** Rmail
---
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 99833e4eeca..7477828eb72 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -309,12 +309,18 @@ gnus-inhibit-startup-message
:group 'gnus-start
:type 'boolean)
+(defcustom gnus-mode-line-logo t
+ "If non-nil, Gnus-buffers display logo in mode-line, if applicable."
+ :group 'gnus-visual
+ :type 'boolean)
+
(defun gnus-mode-line-buffer-identification (line)
(let* ((str (car-safe line))
(str (if (stringp str)
(car (propertized-buffer-identification str))
str)))
- (if (or (not (fboundp 'find-image))
+ (if (or (not gnus-mode-line-logo)
+ (not (fboundp 'find-image))
(not (display-graphic-p))
(not (stringp str))
(not (string-match "^Gnus:" str)))
--
2.41.0
[Message part 5 (message/rfc822, inline)]
Mekeor Melire <mekeor <at> posteo.de> writes:
> 2024-02-09 15:18 eric <at> ericabrahamsen.net:
>
>> Looks good! You've tested this, I assume?
>
> Yes.
>
> - Tested the customize interface.
> - Setting to nil works as documented.
> - Setting to another image spec works as documented.
> - As documented, in non-graphical displays (emacs -nw), no logo is
> displayed, just like before.
> - There are no byte-compilation warnings.
> - There are no new checkdoc warnings.
>
>> I think 'gnus-visual is the right group.
>
> Great!
>
>> Custom types are always a little frustrating, but this might work
>> better:
>>
>> '(choice
>> (repeat :tag "Image specs" (plist))
>> (const :tag "No logo" nil))
>
> This is great, too. Find attached another version of the patch which
> uses this custom-type, repeat-(plist).
Looks good! Thanks very much for the work. I've put the patch in. I'll
close the bug but it also occurred to me we didn't put anything in the
manual. I'll take a look at that and maybe follow up with another patch
later.
Thanks,
Eric
This bug report was last modified 1 year and 101 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.