* bug#68985: 30.0.50; Gnus: Add option to disable display of logo image in mode-line
@ 2024-02-07 22:02 Mekeor Melire
2024-02-08 1:39 ` Visuwesh
2024-02-08 6:11 ` Eli Zaretskii
0 siblings, 2 replies; 20+ messages in thread
From: Mekeor Melire @ 2024-02-07 22:02 UTC (permalink / raw)
To: 68985
[-- Attachment #1: Type: text/plain, Size: 235 bytes --]
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-option-gnus-mode-line-logo.patch --]
[-- Type: text/x-patch, Size: 1739 bytes --]
From 7d3eb97c746ecdd253a370e11727e3041537afe1 Mon Sep 17 00:00:00 2001
From: Mekeor Melire <mekeor@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
^ permalink raw reply related [flat|nested] 20+ messages in thread
* bug#68985: 30.0.50; Gnus: Add option to disable display of logo image in mode-line
2024-02-07 22:02 bug#68985: 30.0.50; Gnus: Add option to disable display of logo image in mode-line Mekeor Melire
@ 2024-02-08 1:39 ` Visuwesh
2024-02-08 10:53 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-08 6:11 ` Eli Zaretskii
1 sibling, 1 reply; 20+ messages in thread
From: Visuwesh @ 2024-02-08 1:39 UTC (permalink / raw)
To: Mekeor Melire; +Cc: 68985
[புதன் பிப்ரவரி 07, 2024] Mekeor Melire wrote:
> 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.
Can you simply not drop Gnus: from the defcustom(s)? I don't see a need
for the patch.
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#68985: 30.0.50; Gnus: Add option to disable display of logo image in mode-line
2024-02-07 22:02 bug#68985: 30.0.50; Gnus: Add option to disable display of logo image in mode-line Mekeor Melire
2024-02-08 1:39 ` Visuwesh
@ 2024-02-08 6:11 ` Eli Zaretskii
2024-02-08 19:49 ` Mekeor Melire
1 sibling, 1 reply; 20+ messages in thread
From: Eli Zaretskii @ 2024-02-08 6:11 UTC (permalink / raw)
To: Mekeor Melire, Eric Abrahamsen; +Cc: 68985
> From: Mekeor Melire <mekeor@posteo.de>
> Date: Wed, 07 Feb 2024 22:02:35 +0000
>
> 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.
Thanks.
What would be the rationale not to show the logo if display of images
is supported by the current Emacs session?
Adding Eric to the discussion.
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#68985: 30.0.50; Gnus: Add option to disable display of logo image in mode-line
2024-02-08 1:39 ` Visuwesh
@ 2024-02-08 10:53 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 20+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-02-08 10:53 UTC (permalink / raw)
To: Visuwesh; +Cc: Mekeor Melire, 68985
Visuwesh <visuweshm@gmail.com> writes:
> [புதன் பிப்ரவரி 07, 2024] Mekeor Melire wrote:
>
>> 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.
Hi,
I thought I remember that there was already a custom for this… but
apparently not.
> Can you simply not drop Gnus: from the defcustom(s)? I don't see a need
> for the patch.
It won't be the same as this patch. With it you could still have the
"Gnus:" string like in a terminal. FWIW, I'm in favor of this patch for
those that don't want too much icons in their Emacs.
--
Manuel Giraud
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#68985: 30.0.50; Gnus: Add option to disable display of logo image in mode-line
2024-02-08 6:11 ` Eli Zaretskii
@ 2024-02-08 19:49 ` Mekeor Melire
2024-02-08 22:29 ` Eric Abrahamsen
0 siblings, 1 reply; 20+ messages in thread
From: Mekeor Melire @ 2024-02-08 19:49 UTC (permalink / raw)
To: 68985; +Cc: Eric Abrahamsen, Eli Zaretskii
2024-02-08 08:11 eliz@gnu.org:
> What would be the rationale not to show the logo if display of images
> is supported by the current Emacs session?
As Manuel Giraud said in the other subthread, it's "for those that don't
want too much icons in their Emacs". Personally, I prefer to not see any
icons or images in my Emacs - unless viewing an image. It distracts me
from text.
Currently, I use an override-advice to accomplish this:
(defun /gnus-mode-line-buffer-identification (line)
"Meant as override-advice for
`gnus-mode-line-buffer-identification' in order to prevent Gnus
to show its logo in the mode-line."
(let* ((str (car-safe line))
(str (if (stringp str)
(car (propertized-buffer-identification str))
str)))
(list str)))
(advice-add #'gnus-mode-line-buffer-identification
:override #'/gnus-mode-line-buffer-identification)
I shared this snippet on the proprietary website Reddit where it
received two upvotes. [1] So there seems to be an interest in this
feature. It'd be nice to have a defcustom option rather than needing to
use an advice.
[1] https://old.reddit.com/r/emacs/comments/18mplfa/weekly_tips_tricks_c_thread/ke5yaak/
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#68985: 30.0.50; Gnus: Add option to disable display of logo image in mode-line
2024-02-08 19:49 ` Mekeor Melire
@ 2024-02-08 22:29 ` Eric Abrahamsen
2024-02-09 10:30 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-11 3:26 ` bug#68985: 30.0.50; Gnus: Add option to disable display of logo image in mode-line Richard Stallman
0 siblings, 2 replies; 20+ messages in thread
From: Eric Abrahamsen @ 2024-02-08 22:29 UTC (permalink / raw)
To: Mekeor Melire; +Cc: Eli Zaretskii, 68985
Mekeor Melire <mekeor@posteo.de> writes:
> 2024-02-08 08:11 eliz@gnu.org:
>
>> What would be the rationale not to show the logo if display of images
>> is supported by the current Emacs session?
>
> As Manuel Giraud said in the other subthread, it's "for those that don't
> want too much icons in their Emacs". Personally, I prefer to not see any
> icons or images in my Emacs - unless viewing an image. It distracts me
> from text.
If we're going down this path, I'd rather expand the scope a little bit
with a customize option that defaults to this value:
'((:type svg :file "gnus-pointer.svg"
:ascent center)
(:type xpm :file "gnus-pointer.xpm"
:ascent center)
(:type xbm :file "gnus-pointer.xbm"
:ascent center))
which is passed to `find-image'. This would allow users to put their own
images in there, if that was something they wanted to do, or set the
option to nil for no icon.
What do people think of that? Would you be willing to do that as a
patch, Mekeor?
Thanks,
Eric
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#68985: 30.0.50; Gnus: Add option to disable display of logo image in mode-line
2024-02-08 22:29 ` Eric Abrahamsen
@ 2024-02-09 10:30 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-09 18:07 ` Eric Abrahamsen
2024-02-11 3:26 ` bug#68985: 30.0.50; Gnus: Add option to disable display of logo image in mode-line Richard Stallman
1 sibling, 1 reply; 20+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-02-09 10:30 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: Mekeor Melire, Eli Zaretskii, 68985
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
[...]
> If we're going down this path, I'd rather expand the scope a little bit
> with a customize option that defaults to this value:
>
> '((:type svg :file "gnus-pointer.svg"
> :ascent center)
> (:type xpm :file "gnus-pointer.xpm"
> :ascent center)
> (:type xbm :file "gnus-pointer.xbm"
> :ascent center))
>
> which is passed to `find-image'. This would allow users to put their own
> images in there, if that was something they wanted to do, or set the
> option to nil for no icon.
>
> What do people think of that? Would you be willing to do that as a
> patch, Mekeor?
Hi,
I did not know that passing nil to `find-image' would nuke the icon but
then, I think it is an even better idea:
- From the point of view of a user that do not want the icon, it
would still be « set some custom to nil »
- It would allow funky icons for those who wants them
We just have to have a name for this new custom. I vote for
`gnus-mode-line-logo'.
--
Manuel Giraud
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#68985: 30.0.50; Gnus: Add option to disable display of logo image in mode-line
2024-02-09 10:30 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-02-09 18:07 ` Eric Abrahamsen
2024-02-09 20:56 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 20+ messages in thread
From: Eric Abrahamsen @ 2024-02-09 18:07 UTC (permalink / raw)
To: Manuel Giraud; +Cc: Mekeor Melire, Eli Zaretskii, 68985
On 02/09/24 11:30 AM, Manuel Giraud wrote:
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
> [...]
>
>> If we're going down this path, I'd rather expand the scope a little bit
>> with a customize option that defaults to this value:
>>
>> '((:type svg :file "gnus-pointer.svg"
>> :ascent center)
>> (:type xpm :file "gnus-pointer.xpm"
>> :ascent center)
>> (:type xbm :file "gnus-pointer.xbm"
>> :ascent center))
>>
>> which is passed to `find-image'. This would allow users to put their own
>> images in there, if that was something they wanted to do, or set the
>> option to nil for no icon.
>>
>> What do people think of that? Would you be willing to do that as a
>> patch, Mekeor?
>
> Hi,
>
> I did not know that passing nil to `find-image' would nuke the icon but
> then, I think it is an even better idea:
I was thinking we'd check the value of the option before passing it to
`find-image'...
> - From the point of view of a user that do not want the icon, it
> would still be « set some custom to nil »
>
> - It would allow funky icons for those who wants them
...but yes this was the general idea.
> We just have to have a name for this new custom. I vote for
> `gnus-mode-line-logo'.
Sounds intuitive to me!
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#68985: 30.0.50; Gnus: Add option to disable display of logo image in mode-line
2024-02-09 18:07 ` Eric Abrahamsen
@ 2024-02-09 20:56 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-09 21:53 ` bug#68985: [PATCH v2] Add option gnus-mode-line-logo Mekeor Melire
0 siblings, 1 reply; 20+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-02-09 20:56 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: Mekeor Melire, Eli Zaretskii, 68985
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
[...]
>> Hi,
>>
>> I did not know that passing nil to `find-image' would nuke the icon but
>> then, I think it is an even better idea:
>
> I was thinking we'd check the value of the option before passing it to
> `find-image'...
Ok, I thought it would work as is.
>> - From the point of view of a user that do not want the icon, it
>> would still be « set some custom to nil »
>>
>> - It would allow funky icons for those who wants them
>
> ...but yes this was the general idea.
>
>> We just have to have a name for this new custom. I vote for
>> `gnus-mode-line-logo'.
>
> Sounds intuitive to me!
Good, thanks. Mekeor would you like to give a try at this?
--
Manuel Giraud
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#68985: [PATCH v2] Add option gnus-mode-line-logo
2024-02-09 20:56 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-02-09 21:53 ` Mekeor Melire
2024-02-09 23:18 ` Eric Abrahamsen
2024-02-10 7:31 ` bug#68985: [PATCH v2] " Eli Zaretskii
0 siblings, 2 replies; 20+ messages in thread
From: Mekeor Melire @ 2024-02-09 21:53 UTC (permalink / raw)
To: 68985; +Cc: Eric Abrahamsen, Eli Zaretskii, Manuel Giraud
[-- Attachment #1: Type: text/plain, Size: 351 bytes --]
2024-02-09 21:56 manuel@ledu-giraud.fr:
> Mekeor would you like to give a try at this?
Thank y'all for the constructive conversation and the nice resulting
idea. Find attached a patch that aims to implement it. Personally, I'm
not sure about the "sexp" custom-type that I used. Also, I wonder if
"gnus-visual" is the right custom-group to be used.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-option-gnus-mode-line-logo.patch --]
[-- Type: text/x-patch, Size: 2921 bytes --]
From 1b30caf62da45a71a5c546665553710d5da4ce3c Mon Sep 17 00:00:00 2001
From: Mekeor Melire <mekeor@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 whether
and which logo will be displayed in the mode-line.
* etc/NEWS: Announce the change.
---
etc/NEWS | 5 +++++
lisp/gnus/gnus.el | 29 ++++++++++++++++++++---------
2 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index ee7462cb2aa..36844bfa1a2 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1098,6 +1098,11 @@ 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 either disable the display of any logo or
+specify which logo will be displayed as part of the
+buffer-identification in the mode-line of Gnus-buffers.
+
** Rmail
---
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 99833e4eeca..03e21b21b39 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -309,12 +309,30 @@ gnus-inhibit-startup-message
:group 'gnus-start
:type 'boolean)
+(defcustom gnus-mode-line-logo
+ '((:type svg :file "gnus-pointer.svg" :ascent center)
+ (:type xpm :file "gnus-pointer.xpm" :ascent center)
+ (:type xbm :file "gnus-pointer.xbm" :ascent center))
+ "Gnus logo displayed in mode-line.
+
+If non-nil, it should be a list of image specifications that will be
+given as first argument to `find-image', which see. Then, in case of a
+graphical display, the specified Gnus logo will be displayed as part of
+the buffer-identification in the mode-line of Gnus-buffers.
+
+If nil, no logo will be displayed."
+ :group 'gnus-visual
+ :type '(choice
+ (sexp :tag "List of image specifications")
+ (const :tag "No logo" nil)))
+
(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)))
@@ -325,14 +343,7 @@ gnus-mode-line-buffer-identification
(add-text-properties
0 5
(list 'display
- (find-image
- '((:type svg :file "gnus-pointer.svg"
- :ascent center)
- (:type xpm :file "gnus-pointer.xpm"
- :ascent center)
- (:type xbm :file "gnus-pointer.xbm"
- :ascent center))
- t)
+ (find-image gnus-mode-line-logo t)
'help-echo (if gnus-emacs-version
(format
"This is %s, %s."
--
2.41.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* bug#68985: [PATCH v2] Add option gnus-mode-line-logo
2024-02-09 21:53 ` bug#68985: [PATCH v2] Add option gnus-mode-line-logo Mekeor Melire
@ 2024-02-09 23:18 ` Eric Abrahamsen
2024-02-10 2:03 ` bug#68985: [PATCH v3] " Mekeor Melire
2024-02-10 7:31 ` bug#68985: [PATCH v2] " Eli Zaretskii
1 sibling, 1 reply; 20+ messages in thread
From: Eric Abrahamsen @ 2024-02-09 23:18 UTC (permalink / raw)
To: Mekeor Melire; +Cc: Eli Zaretskii, 68985, Manuel Giraud
Mekeor Melire <mekeor@posteo.de> writes:
> 2024-02-09 21:56 manuel@ledu-giraud.fr:
>
>> Mekeor would you like to give a try at this?
>
> Thank y'all for the constructive conversation and the nice resulting
> idea. Find attached a patch that aims to implement it. Personally, I'm
> not sure about the "sexp" custom-type that I used. Also, I wonder if
> "gnus-visual" is the right custom-group to be used.
Looks good! You've tested this, I assume?
I think 'gnus-visual is the right group. Custom types are always a
little frustrating, but this might work better:
'(choice
(repeat :tag "Image specs" (plist))
(const :tag "No logo" nil))
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#68985: [PATCH v3] Add option gnus-mode-line-logo
2024-02-09 23:18 ` Eric Abrahamsen
@ 2024-02-10 2:03 ` Mekeor Melire
2024-02-10 4:20 ` Eric Abrahamsen
0 siblings, 1 reply; 20+ messages in thread
From: Mekeor Melire @ 2024-02-10 2:03 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: Eli Zaretskii, 68985, Manuel Giraud
[-- Attachment #1: Type: text/plain, Size: 723 bytes --]
2024-02-09 15:18 eric@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).
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-option-gnus-mode-line-logo.patch --]
[-- Type: text/x-patch, Size: 2931 bytes --]
From c1d850f6ca4936a086399c2ed5d2eacb94c7d581 Mon Sep 17 00:00:00 2001
From: Mekeor Melire <mekeor@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
whether and which logo will be displayed in the mode-line.
* etc/NEWS: Announce the change.
---
etc/NEWS | 5 +++++
lisp/gnus/gnus.el | 29 ++++++++++++++++++++---------
2 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index ee7462cb2aa..36844bfa1a2 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1098,6 +1098,11 @@ 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 either disable the display of any logo or
+specify which logo will be displayed as part of the
+buffer-identification in the mode-line of Gnus-buffers.
+
** Rmail
---
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 99833e4eeca..cf4c3f7841c 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -309,12 +309,30 @@ gnus-inhibit-startup-message
:group 'gnus-start
:type 'boolean)
+(defcustom gnus-mode-line-logo
+ '((:type svg :file "gnus-pointer.svg" :ascent center)
+ (:type xpm :file "gnus-pointer.xpm" :ascent center)
+ (:type xbm :file "gnus-pointer.xbm" :ascent center))
+ "Gnus logo displayed in mode-line.
+
+If non-nil, it should be a list of image specifications that will be
+given as first argument to `find-image', which see. Then, in case of a
+graphical display, the specified Gnus logo will be displayed as part of
+the buffer-identification in the mode-line of Gnus-buffers.
+
+If nil, no logo will be displayed."
+ :group 'gnus-visual
+ :type '(choice
+ (repeat :tag "List of image specifications" (plist))
+ (const :tag "No logo" nil)))
+
(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)))
@@ -325,14 +343,7 @@ gnus-mode-line-buffer-identification
(add-text-properties
0 5
(list 'display
- (find-image
- '((:type svg :file "gnus-pointer.svg"
- :ascent center)
- (:type xpm :file "gnus-pointer.xpm"
- :ascent center)
- (:type xbm :file "gnus-pointer.xbm"
- :ascent center))
- t)
+ (find-image gnus-mode-line-logo t)
'help-echo (if gnus-emacs-version
(format
"This is %s, %s."
--
2.41.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* bug#68985: [PATCH v3] Add option gnus-mode-line-logo
2024-02-10 2:03 ` bug#68985: [PATCH v3] " Mekeor Melire
@ 2024-02-10 4:20 ` Eric Abrahamsen
2024-02-10 9:07 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 20+ messages in thread
From: Eric Abrahamsen @ 2024-02-10 4:20 UTC (permalink / raw)
To: Mekeor Melire; +Cc: Eli Zaretskii, Manuel Giraud, 68985-done
Mekeor Melire <mekeor@posteo.de> writes:
> 2024-02-09 15:18 eric@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
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#68985: [PATCH v2] Add option gnus-mode-line-logo
2024-02-09 21:53 ` bug#68985: [PATCH v2] Add option gnus-mode-line-logo Mekeor Melire
2024-02-09 23:18 ` Eric Abrahamsen
@ 2024-02-10 7:31 ` Eli Zaretskii
2024-02-10 16:43 ` Eric Abrahamsen
1 sibling, 1 reply; 20+ messages in thread
From: Eli Zaretskii @ 2024-02-10 7:31 UTC (permalink / raw)
To: Mekeor Melire; +Cc: eric, 68985, manuel
> From: Mekeor Melire <mekeor@posteo.de>
> Cc: Eric Abrahamsen <eric@ericabrahamsen.net>, Eli Zaretskii <eliz@gnu.org>,
> Manuel Giraud <manuel@ledu-giraud.fr>
> Date: Fri, 09 Feb 2024 21:53:48 +0000
>
> +(defcustom gnus-mode-line-logo
> + '((:type svg :file "gnus-pointer.svg" :ascent center)
> + (:type xpm :file "gnus-pointer.xpm" :ascent center)
> + (:type xbm :file "gnus-pointer.xbm" :ascent center))
> + "Gnus logo displayed in mode-line.
> +
> +If non-nil, it should be a list of image specifications that will be
> +given as first argument to `find-image', which see. Then, in case of a
> +graphical display, the specified Gnus logo will be displayed as part of
> +the buffer-identification in the mode-line of Gnus-buffers.
> +
> +If nil, no logo will be displayed."
> + :group 'gnus-visual
> + :type '(choice
> + (sexp :tag "List of image specifications")
> + (const :tag "No logo" nil)))
From CONTRIBUTE:
New defcustom's and defface's should always have a ':version' tag
stating the first Emacs version in which they will appear. Likewise
with defcustom's or defface's whose value is changed -- update their
':version' tag.
Please in the future remember to add :version tags.
Thanks.
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#68985: [PATCH v3] Add option gnus-mode-line-logo
2024-02-10 4:20 ` Eric Abrahamsen
@ 2024-02-10 9:07 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 20+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-02-10 9:07 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: Mekeor Melire, Eli Zaretskii, 68985-done
Thanks for this work.
--
Manuel Giraud
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#68985: [PATCH v2] Add option gnus-mode-line-logo
2024-02-10 7:31 ` bug#68985: [PATCH v2] " Eli Zaretskii
@ 2024-02-10 16:43 ` Eric Abrahamsen
2024-02-10 22:01 ` Mekeor Melire
0 siblings, 1 reply; 20+ messages in thread
From: Eric Abrahamsen @ 2024-02-10 16:43 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Mekeor Melire, 68985, manuel
On 02/10/24 09:31 AM, Eli Zaretskii wrote:
>> From: Mekeor Melire <mekeor@posteo.de>
>> Cc: Eric Abrahamsen <eric@ericabrahamsen.net>, Eli Zaretskii <eliz@gnu.org>,
>> Manuel Giraud <manuel@ledu-giraud.fr>
>> Date: Fri, 09 Feb 2024 21:53:48 +0000
>>
>> +(defcustom gnus-mode-line-logo
>> + '((:type svg :file "gnus-pointer.svg" :ascent center)
>> + (:type xpm :file "gnus-pointer.xpm" :ascent center)
>> + (:type xbm :file "gnus-pointer.xbm" :ascent center))
>> + "Gnus logo displayed in mode-line.
>> +
>> +If non-nil, it should be a list of image specifications that will be
>> +given as first argument to `find-image', which see. Then, in case of a
>> +graphical display, the specified Gnus logo will be displayed as part of
>> +the buffer-identification in the mode-line of Gnus-buffers.
>> +
>> +If nil, no logo will be displayed."
>> + :group 'gnus-visual
>> + :type '(choice
>> + (sexp :tag "List of image specifications")
>> + (const :tag "No logo" nil)))
>
> From CONTRIBUTE:
>
> New defcustom's and defface's should always have a ':version' tag
> stating the first Emacs version in which they will appear. Likewise
> with defcustom's or defface's whose value is changed -- update their
> ':version' tag.
>
> Please in the future remember to add :version tags.
Sorry, I should have caught that.
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#68985: [PATCH v2] Add option gnus-mode-line-logo
2024-02-10 16:43 ` Eric Abrahamsen
@ 2024-02-10 22:01 ` Mekeor Melire
0 siblings, 0 replies; 20+ messages in thread
From: Mekeor Melire @ 2024-02-10 22:01 UTC (permalink / raw)
To: 68985; +Cc: Eric Abrahamsen, Eli Zaretskii
2024-02-10 08:43 eric@ericabrahamsen.net:
> On 02/10/24 09:31 AM, Eli Zaretskii wrote:
> >
> > Please in the future remember to add :version tags.
>
> Sorry, I should have caught that.
It's me who needs to apologize. Sorry. And thanks for the fix.
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#68985: 30.0.50; Gnus: Add option to disable display of logo image in mode-line
2024-02-08 22:29 ` Eric Abrahamsen
2024-02-09 10:30 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-02-11 3:26 ` Richard Stallman
2024-02-11 15:14 ` Eric Abrahamsen
1 sibling, 1 reply; 20+ messages in thread
From: Richard Stallman @ 2024-02-11 3:26 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: mekeor, eliz, 68985
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> > As Manuel Giraud said in the other subthread, it's "for those that don't
> > want too much icons in their Emacs". Personally, I prefer to not see any
> > icons or images in my Emacs - unless viewing an image. It distracts me
> > from text.
Users who feel that way would probably extend it to other packages,
not just Gnus. Perhaps we should establish a customization option
`fewer-images-flag' which would affect other packages in the same way
as Gnus.
> If we're going down this path, I'd rather expand the scope a little bit
> with a customize option that defaults to this value:
> '((:type svg :file "gnus-pointer.svg"
> :ascent center)
> (:type xpm :file "gnus-pointer.xpm"
> :ascent center)
> (:type xbm :file "gnus-pointer.xbm"
> :ascent center))
I see no harm in giving Gnus this option. But people who prefer
to "see fewer images" in Emacs would find setting the new option more
convenient than setting lots of options for specific packages.
So it might be better to have both.
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#68985: 30.0.50; Gnus: Add option to disable display of logo image in mode-line
2024-02-11 3:26 ` bug#68985: 30.0.50; Gnus: Add option to disable display of logo image in mode-line Richard Stallman
@ 2024-02-11 15:14 ` Eric Abrahamsen
2024-02-13 21:36 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 20+ messages in thread
From: Eric Abrahamsen @ 2024-02-11 15:14 UTC (permalink / raw)
To: Richard Stallman; +Cc: eliz, 68985
On 02/10/24 22:26 PM, Richard Stallman wrote:
> [[[ To any NSA and FBI agents reading my email: please consider ]]]
> [[[ whether defending the US Constitution against all enemies, ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> > > As Manuel Giraud said in the other subthread, it's "for those that don't
> > > want too much icons in their Emacs". Personally, I prefer to not see any
> > > icons or images in my Emacs - unless viewing an image. It distracts me
> > > from text.
>
> Users who feel that way would probably extend it to other packages,
> not just Gnus. Perhaps we should establish a customization option
> `fewer-images-flag' which would affect other packages in the same way
> as Gnus.
If we could implement this in a central location, like defusing
find-image somehow, that seems possible. I wouldn't be surprised if
having `find-image' suddenly not find any images would break things,
though. And the other approach -- locating all `find-image' call sites
inside and outside of Emacs and conditionalizing them -- seems like an
impractical amount of work...
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#68985: 30.0.50; Gnus: Add option to disable display of logo image in mode-line
2024-02-11 15:14 ` Eric Abrahamsen
@ 2024-02-13 21:36 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 20+ messages in thread
From: Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-02-13 21:36 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: eliz, Richard Stallman, 68985
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> On 02/10/24 22:26 PM, Richard Stallman wrote:
>> [[[ To any NSA and FBI agents reading my email: please consider ]]]
>> [[[ whether defending the US Constitution against all enemies, ]]]
>> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>>
>> > > As Manuel Giraud said in the other subthread, it's "for those that don't
>> > > want too much icons in their Emacs". Personally, I prefer to not see any
>> > > icons or images in my Emacs - unless viewing an image. It distracts me
>> > > from text.
>>
>> Users who feel that way would probably extend it to other packages,
>> not just Gnus. Perhaps we should establish a customization option
>> `fewer-images-flag' which would affect other packages in the same way
>> as Gnus.
>
> If we could implement this in a central location, like defusing
> find-image somehow, that seems possible. I wouldn't be surprised if
> having `find-image' suddenly not find any images would break things,
> though. And the other approach -- locating all `find-image' call sites
> inside and outside of Emacs and conditionalizing them -- seems like an
> impractical amount of work...
Reading your point and the scope of this idea I wonder if it would be to
complicated to work.
In the sense perfect is the enemy of the good.
Maybe tags on certain options like these that would make it easier for
to find them would be a better solution?
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2024-02-13 21:36 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-07 22:02 bug#68985: 30.0.50; Gnus: Add option to disable display of logo image in mode-line Mekeor Melire
2024-02-08 1:39 ` Visuwesh
2024-02-08 10:53 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-08 6:11 ` Eli Zaretskii
2024-02-08 19:49 ` Mekeor Melire
2024-02-08 22:29 ` Eric Abrahamsen
2024-02-09 10:30 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-09 18:07 ` Eric Abrahamsen
2024-02-09 20:56 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-09 21:53 ` bug#68985: [PATCH v2] Add option gnus-mode-line-logo Mekeor Melire
2024-02-09 23:18 ` Eric Abrahamsen
2024-02-10 2:03 ` bug#68985: [PATCH v3] " Mekeor Melire
2024-02-10 4:20 ` Eric Abrahamsen
2024-02-10 9:07 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-10 7:31 ` bug#68985: [PATCH v2] " Eli Zaretskii
2024-02-10 16:43 ` Eric Abrahamsen
2024-02-10 22:01 ` Mekeor Melire
2024-02-11 3:26 ` bug#68985: 30.0.50; Gnus: Add option to disable display of logo image in mode-line Richard Stallman
2024-02-11 15:14 ` Eric Abrahamsen
2024-02-13 21:36 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
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).