GNU bug report logs - #30757
Better manipulation (suppressing, examining type) of warnings from *Warnings* buffer

Previous Next

Package: emacs;

Reported by: Noam Postavsky <npostavs <at> gmail.com>

Date: Fri, 9 Mar 2018 12:32:01 UTC

Severity: wishlist

Tags: fixed

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30757 in the body.
You can then email your comments to 30757 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#30757; Package emacs. (Fri, 09 Mar 2018 12:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Noam Postavsky <npostavs <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 09 Mar 2018 12:32:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Better manipulation (suppressing,
 examining type) of warnings from *Warnings* buffer
Date: Fri, 09 Mar 2018 07:31:23 -0500
Severity: wishlist

It would be nice if warnings in the *Warnings* buffer came with some
kind of button to let the user add the relevant value to
warning-suppress-types or warning-suppress-log-types.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30757; Package emacs. (Fri, 09 Mar 2018 14:12:02 GMT) Full text and rfc822 format available.

Message #8 received at 30757 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 30757 <at> debbugs.gnu.org
Subject: Re: bug#30757: Better manipulation (suppressing,
 examining type) of warnings from *Warnings* buffer
Date: Fri, 09 Mar 2018 15:11:22 +0100
[Message part 1 (text/plain, inline)]
Noam Postavsky <npostavs <at> gmail.com> writes:

> Severity: wishlist
>
> It would be nice if warnings in the *Warnings* buffer came with some
> kind of button to let the user add the relevant value to
> warning-suppress-types or warning-suppress-log-types.

Adjust strings according to your personal preference. The button names
are a tad verbose as well :-)

[Message part 2 (text/plain, inline)]
diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el
index 489611d4d1..0e31511287 100644
--- a/lisp/emacs-lisp/warnings.el
+++ b/lisp/emacs-lisp/warnings.el
@@ -197,6 +197,18 @@ warning-suppress-p
     ;; we return t.
     some-match))
 
+
+(define-button-type 'warning-suppress-warning
+  'action #'warning-suppress-action
+  'help-echo "mouse-2, RET: Suppress showing this warning")
+(defun warning-suppress-action (button)
+  (add-to-list 'warning-suppress-types (list (button-get button 'warning-type))))
+(define-button-type 'warning-suppress-log-warning
+  'action #'warning-suppress-log-action
+  'help-echo "mouse-2, RET: Never log this warning")
+(defun warning-suppress-log-action (button)
+  (add-to-list 'warning-suppress-log-types (list (button-get button 'warning-type))))
+
 ;;;###autoload
 (defun display-warning (type message &optional level buffer-name)
   "Display a warning message, MESSAGE.
@@ -264,6 +276,10 @@ display-warning
 	      (insert (format (nth 1 level-info)
 			      (format warning-type-format typename))
 		      message)
+              (insert " ")
+              (insert-button "Suppress" 'type 'warning-suppress-warning 'warning-type type)
+              (insert " ")
+              (insert-button "Never Log" 'type 'warning-suppress-log-warning 'warning-type type)
 	      (newline)
 	      (when (and warning-fill-prefix (not (string-match "\n" message)))
 		(let ((fill-prefix warning-fill-prefix)

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30757; Package emacs. (Fri, 09 Mar 2018 14:25:02 GMT) Full text and rfc822 format available.

Message #11 received at 30757 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 30757 <at> debbugs.gnu.org
Subject: Re: bug#30757: Better manipulation (suppressing,
 examining type) of warnings from *Warnings* buffer
Date: Fri, 09 Mar 2018 15:24:04 +0100
Robert Pluim <rpluim <at> gmail.com> writes:

> Noam Postavsky <npostavs <at> gmail.com> writes:
>
>> Severity: wishlist
>>
>> It would be nice if warnings in the *Warnings* buffer came with some
>> kind of button to let the user add the relevant value to
>> warning-suppress-types or warning-suppress-log-types.
>

Reading your message on emacs-devel, I guess you'd want this kind of
change to be made permanent? So customize-push-and-save of the
resulting values?

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30757; Package emacs. (Fri, 09 Mar 2018 14:55:02 GMT) Full text and rfc822 format available.

Message #14 received at 30757 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 30757 <at> debbugs.gnu.org
Subject: Re: bug#30757: Better manipulation (suppressing, examining type) of
 warnings from *Warnings* buffer
Date: Fri, 9 Mar 2018 09:53:58 -0500
On Fri, Mar 9, 2018 at 9:24 AM, Robert Pluim <rpluim <at> gmail.com> wrote:
> Robert Pluim <rpluim <at> gmail.com> writes:
>
>> Noam Postavsky <npostavs <at> gmail.com> writes:
>>
>>> It would be nice if warnings in the *Warnings* buffer came with some
>>> kind of button to let the user add the relevant value to
>>> warning-suppress-types or warning-suppress-log-types.
>>
>
> Reading your message on emacs-devel, I guess you'd want this kind of
> change to be made permanent? So customize-push-and-save of the
> resulting values?

Ah, yes, something using customize was more what I had in mind.

Also, potentially reusing the Warning(foo) prefix for the button might
save some space, the different types of suppression could accessed by
different keybindings/mouse clicks (maybe that conflicts with the
"easy to use" goal, though, not sure).


For reference, the emacs-devel post:
https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00314.html




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30757; Package emacs. (Fri, 09 Mar 2018 15:07:01 GMT) Full text and rfc822 format available.

Message #17 received at 30757 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Noam Postavsky <npostavs <at> gmail.com>, 30757 <at> debbugs.gnu.org
Subject: RE: bug#30757: Better manipulation (suppressing, examining type) of
 warnings from *Warnings* buffer
Date: Fri, 9 Mar 2018 07:05:56 -0800 (PST)
> It would be nice if warnings in the *Warnings* buffer came with some
> kind of button to let the user add the relevant value to
> warning-suppress-types or warning-suppress-log-types.

+1

It would be good for the button/link to open *Help* with a more
complete description of the warning.  And there (in *Help*) there
could be buttons/links to suppress things.

In addition, we might have a command or commands that would
show such *Help* regardless of whether the warnings are being
shown.  In *Help*, if the warning is currently not being
shown then the button/link would enable showing it (i.e.,
the button toggles the behavior show/suppress).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30757; Package emacs. (Fri, 09 Mar 2018 15:50:01 GMT) Full text and rfc822 format available.

Message #20 received at 30757 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 30757 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> gmail.com>
Subject: Re: bug#30757: Better manipulation (suppressing,
 examining type) of warnings from *Warnings* buffer
Date: Fri, 09 Mar 2018 16:49:46 +0100
Drew Adams <drew.adams <at> oracle.com> writes:

>> It would be nice if warnings in the *Warnings* buffer came with some
>> kind of button to let the user add the relevant value to
>> warning-suppress-types or warning-suppress-log-types.
>
> +1
>
> It would be good for the button/link to open *Help* with a more
> complete description of the warning.  And there (in *Help*) there
> could be buttons/links to suppress things.
>
> In addition, we might have a command or commands that would
> show such *Help* regardless of whether the warnings are being
> shown.  In *Help*, if the warning is currently not being
> shown then the button/link would enable showing it (i.e.,
> the button toggles the behavior show/suppress).

That sounds like a whole new feature request :-)

I don't think there's anything preventing that from being added later.

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30757; Package emacs. (Fri, 09 Mar 2018 15:54:01 GMT) Full text and rfc822 format available.

Message #23 received at 30757 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 30757 <at> debbugs.gnu.org
Subject: Re: bug#30757: Better manipulation (suppressing,
 examining type) of warnings from *Warnings* buffer
Date: Fri, 09 Mar 2018 16:53:26 +0100
[Message part 1 (text/plain, inline)]
Noam Postavsky <npostavs <at> gmail.com> writes:

> Ah, yes, something using customize was more what I had in mind.
>
> Also, potentially reusing the Warning(foo) prefix for the button might
> save some space, the different types of suppression could accessed by
> different keybindings/mouse clicks (maybe that conflicts with the
> "easy to use" goal, though, not sure).

Here's what I've got so far. Suggestions welcome for wording, style
changes, etc.

It works fine for me, but I have warning-suppress-types and
warning-suppress-log-types set to nil, so it might well fail for
people who have already set those manually.

[0001-Show-log-suppression-buttons-in-display-warning-buff.patch (text/x-diff, inline)]
From 4db1f77e5d802531561918cd08e08d51447a84ec Mon Sep 17 00:00:00 2001
From: Robert Pluim <rpluim <at> gmail.com>
Date: Fri, 9 Mar 2018 16:41:36 +0100
Subject: [PATCH] Show log suppression buttons in display-warning buffer

* lisp/emacs-lisp/warnings.el (warning-suppress-warning):
Define button.
(warning-suppress-action): New function.
(warning-suppress-log-warning): Define button.
(warning-suppress-log-action): New function.
(display-warning): Show buttons to allow permanent
modification of warning-suppress-types and
warning-suppress-log-types per warning.

* etc/NEWS: Describe 'display-warning' change.
---
 etc/NEWS                    |  6 ++++++
 lisp/emacs-lisp/warnings.el | 26 +++++++++++++++++++++++++-
 2 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/etc/NEWS b/etc/NEWS
index 14926ba2e3..134b79e60e 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -71,6 +71,12 @@ moved to the early init file (see above).
 
 * Changes in Emacs 27.1
 
++++
+** Warning types can now be disabled from the warning buffer.
+For each warning 'display-warning' now adds buttons to the buffer it
+uses to allow permanent suppression of the warning popup or of the
+warning itself.
+
 ---
 ** The new option 'tooltip-resize-echo-area' avoids truncating tooltip text
 on GUI frames when tooltips are displayed in the echo area.  Instead,
diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el
index 489611d4d1..23f7e33af8 100644
--- a/lisp/emacs-lisp/warnings.el
+++ b/lisp/emacs-lisp/warnings.el
@@ -197,6 +197,21 @@ warning-suppress-p
     ;; we return t.
     some-match))
 
+(define-button-type 'warning-suppress-warning
+  'action #'warning-suppress-action
+  'help-echo "mouse-2, RET: Permanently disable popping up this warning")
+(defun warning-suppress-action (button)
+  (customize-save-variable 'warning-suppress-types
+                           (cons (list (button-get button 'warning-type))
+                                 warning-suppress-types)))
+(define-button-type 'warning-suppress-log-warning
+  'action #'warning-suppress-log-action
+  'help-echo "mouse-2, RET: Never generate this warning")
+(defun warning-suppress-log-action (button)
+  (customize-save-variable 'warning-suppress-log-types
+                           (cons (list (button-get button 'warning-type))
+                                 warning-suppress-types)))
+
 ;;;###autoload
 (defun display-warning (type message &optional level buffer-name)
   "Display a warning message, MESSAGE.
@@ -223,7 +238,12 @@ display-warning
 See the `warnings' custom group for user customization features.
 
 See also `warning-series', `warning-prefix-function' and
-`warning-fill-prefix' for additional programming features."
+`warning-fill-prefix' for additional programming features.
+
+This will also display buttons allowing the user to permanently
+disable popup of the warning or disable the warning entirely by
+setting `warning-suppress-types' or `warning-suppress-log-types'
+on their behalf."
   (if (not (or after-init-time noninteractive (daemonp)))
       ;; Ensure warnings that happen early in the startup sequence
       ;; are visible when startup completes (bug#20792).
@@ -264,6 +284,10 @@ display-warning
 	      (insert (format (nth 1 level-info)
 			      (format warning-type-format typename))
 		      message)
+              (insert " ")
+              (insert-button "Disable popup" 'type 'warning-suppress-warning 'warning-type type)
+              (insert " ")
+              (insert-button "Never generate" 'type 'warning-suppress-log-warning 'warning-type type)
 	      (newline)
 	      (when (and warning-fill-prefix (not (string-match "\n" message)))
 		(let ((fill-prefix warning-fill-prefix)
-- 
2.16.1.72.g5be1f00a9


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30757; Package emacs. (Fri, 09 Mar 2018 16:19:01 GMT) Full text and rfc822 format available.

Message #26 received at 30757 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 30757 <at> debbugs.gnu.org, npostavs <at> gmail.com
Subject: Re: bug#30757: Better manipulation (suppressing,
 examining type) of warnings from *Warnings* buffer
Date: Fri, 09 Mar 2018 18:18:32 +0200
> From: Robert Pluim <rpluim <at> gmail.com>
> Date: Fri, 09 Mar 2018 16:53:26 +0100
> Cc: 30757 <at> debbugs.gnu.org
> 
> Here's what I've got so far. Suggestions welcome for wording, style
> changes, etc.

Thanks.

> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -71,6 +71,12 @@ moved to the early init file (see above).
>  
>  * Changes in Emacs 27.1
>  
> ++++

"+++" means this change was documented in the manual(s), but this
change wasn't, AFAIU.  Shkuld this be documented in the ELisp manual?

> +** Warning types can now be disabled from the warning buffer.
> +For each warning 'display-warning' now adds buttons to the buffer it
> +uses to allow permanent suppression of the warning popup or of the
> +warning itself.

This entry should be made more clear.  "Warning types" is never
explained, the reference to 'display-warning' is confusing (this is a
user-level feature, so why mention the function which is involved?),
it is unclear what buffer is alluded to by "the buffer it uses", and
the difference between "warning popup" and "warning itself" is left
unexplained.

> +(define-button-type 'warning-suppress-warning
> +  'action #'warning-suppress-action
> +  'help-echo "mouse-2, RET: Permanently disable popping up this warning")
> +(defun warning-suppress-action (button)
> +  (customize-save-variable 'warning-suppress-types
> +                           (cons (list (button-get button 'warning-type))
> +                                 warning-suppress-types)))
> +(define-button-type 'warning-suppress-log-warning
> +  'action #'warning-suppress-log-action
> +  'help-echo "mouse-2, RET: Never generate this warning")

Likewise here: the difference between "disable popping up" and "never
generate" is unclear.  maybe a different wording will clarify that,
but I cannot suggest one because frankly I don't understand well
enough what each one does.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30757; Package emacs. (Fri, 09 Mar 2018 16:55:01 GMT) Full text and rfc822 format available.

Message #29 received at 30757 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 30757 <at> debbugs.gnu.org, npostavs <at> gmail.com
Subject: Re: bug#30757: Better manipulation (suppressing,
 examining type) of warnings from *Warnings* buffer
Date: Fri, 09 Mar 2018 17:54:23 +0100
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Robert Pluim <rpluim <at> gmail.com>
>> Date: Fri, 09 Mar 2018 16:53:26 +0100
>> Cc: 30757 <at> debbugs.gnu.org
>> 
>> Here's what I've got so far. Suggestions welcome for wording, style
>> changes, etc.
>
> Thanks.
>
>> --- a/etc/NEWS
>> +++ b/etc/NEWS
>> @@ -71,6 +71,12 @@ moved to the early init file (see above).
>>  
>>  * Changes in Emacs 27.1
>>  
>> ++++
>
> "+++" means this change was documented in the manual(s), but this
> change wasn't, AFAIU.  Shkuld this be documented in the ELisp manual?
>

etc/NEWS says:

  +++ indicates that all necessary documentation updates are complete.
      (This means all relevant manuals in doc/ AND lisp doc-strings.)

I'd looked through the manuals and couldn't see anywhere where I
thought it should be documented, hence I only changed the
doc-string. We can go for '---' in that case.

>> +** Warning types can now be disabled from the warning buffer.
>> +For each warning 'display-warning' now adds buttons to the buffer it
>> +uses to allow permanent suppression of the warning popup or of the
>> +warning itself.
>
> This entry should be made more clear.  "Warning types" is never
> explained, the reference to 'display-warning' is confusing (this is a
> user-level feature, so why mention the function which is involved?),
> it is unclear what buffer is alluded to by "the buffer it uses", and
> the difference between "warning popup" and "warning itself" is left
> unexplained.

I've rewritten it. See attached.

>> +(define-button-type 'warning-suppress-warning
>> +  'action #'warning-suppress-action
>> +  'help-echo "mouse-2, RET: Permanently disable popping up this warning")
>> +(defun warning-suppress-action (button)
>> +  (customize-save-variable 'warning-suppress-types
>> +                           (cons (list (button-get button 'warning-type))
>> +                                 warning-suppress-types)))
>> +(define-button-type 'warning-suppress-log-warning
>> +  'action #'warning-suppress-log-action
>> +  'help-echo "mouse-2, RET: Never generate this warning")
>
> Likewise here: the difference between "disable popping up" and "never
> generate" is unclear.  maybe a different wording will clarify that,
> but I cannot suggest one because frankly I don't understand well
> enough what each one does.

Yes. I'm stuck between being precise but verbose, and more general and
succinct, and expressing the permanence of the resulting change. I've
make another attempt, although I'm still not entirely happy with it,
especially since the button texts are now quite long (I thought about
using the verb 'hide', but that's not accurate either).

Robert

[0001-Show-log-suppression-buttons-in-display-warning-buff.patch (text/x-diff, inline)]
From ba62307cfb0633637cc1fa9351c942cf79f34b90 Mon Sep 17 00:00:00 2001
From: Robert Pluim <rpluim <at> gmail.com>
Date: Fri, 9 Mar 2018 16:41:36 +0100
Subject: [PATCH] Show log suppression buttons in display-warning buffer

* lisp/emacs-lisp/warnings.el (warning-suppress-warning):
Define button.
(warning-suppress-action): New function.
(warning-suppress-log-warning): Define button.
(warning-suppress-log-action): New function.
(display-warning): Show buttons to allow permanent
modification of warning-suppress-types and
warning-suppress-log-types per warning.

* etc/NEWS: Describe 'display-warning' button change.
---
 etc/NEWS                    | 10 +++++++++-
 lisp/emacs-lisp/warnings.el | 26 +++++++++++++++++++++++++-
 2 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 14926ba2e3..a36967d473 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -69,7 +69,15 @@ in your init file.  However, if your init file changes the values of
 moved to the early init file (see above).
 
 
-* Changes in Emacs 27.1
+* Changes in Emacs 27.
+
+---
+** Specific warnings can now be disabled from the warning buffer.
+When a warning is displayed to the user, the resulting buffer now has
+buttons which allow making permanent changes to the treatment of that
+warning.  Automatic showing of the warning can be disabled (although
+it is still generated), or generation of the warning can be disabled
+entirely.
 
 ---
 ** The new option 'tooltip-resize-echo-area' avoids truncating tooltip text
diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el
index 489611d4d1..245cd3f39a 100644
--- a/lisp/emacs-lisp/warnings.el
+++ b/lisp/emacs-lisp/warnings.el
@@ -197,6 +197,21 @@ warning-suppress-p
     ;; we return t.
     some-match))
 
+(define-button-type 'warning-suppress-warning
+  'action #'warning-suppress-action
+  'help-echo "mouse-2, RET: Don't display this warning automatically")
+(defun warning-suppress-action (button)
+  (customize-save-variable 'warning-suppress-types
+                           (cons (list (button-get button 'warning-type))
+                                 warning-suppress-types)))
+(define-button-type 'warning-suppress-log-warning
+  'action #'warning-suppress-log-action
+  'help-echo "mouse-2, RET: Never generate this warning again")
+(defun warning-suppress-log-action (button)
+  (customize-save-variable 'warning-suppress-log-types
+                           (cons (list (button-get button 'warning-type))
+                                 warning-suppress-types)))
+
 ;;;###autoload
 (defun display-warning (type message &optional level buffer-name)
   "Display a warning message, MESSAGE.
@@ -223,7 +238,12 @@ display-warning
 See the `warnings' custom group for user customization features.
 
 See also `warning-series', `warning-prefix-function' and
-`warning-fill-prefix' for additional programming features."
+`warning-fill-prefix' for additional programming features.
+
+This will also display buttons allowing the user to permanently
+disable automatic display of the warning or disable the warning
+entirely by setting `warning-suppress-types' or
+`warning-suppress-log-types' on their behalf."
   (if (not (or after-init-time noninteractive (daemonp)))
       ;; Ensure warnings that happen early in the startup sequence
       ;; are visible when startup completes (bug#20792).
@@ -264,6 +284,10 @@ display-warning
 	      (insert (format (nth 1 level-info)
 			      (format warning-type-format typename))
 		      message)
+              (insert " ")
+              (insert-button "Disable showing automatically" 'type 'warning-suppress-warning 'warning-type type)
+              (insert " ")
+              (insert-button "Never generate" 'type 'warning-suppress-log-warning 'warning-type type)
 	      (newline)
 	      (when (and warning-fill-prefix (not (string-match "\n" message)))
 		(let ((fill-prefix warning-fill-prefix)
-- 
2.16.1.72.g5be1f00a9


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30757; Package emacs. (Fri, 09 Mar 2018 18:30:03 GMT) Full text and rfc822 format available.

Message #32 received at 30757 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 30757 <at> debbugs.gnu.org, npostavs <at> gmail.com
Subject: Re: bug#30757: Better manipulation (suppressing,
 examining type) of warnings from *Warnings* buffer
Date: Fri, 09 Mar 2018 20:28:49 +0200
> From: Robert Pluim <rpluim <at> gmail.com>
> Cc: 30757 <at> debbugs.gnu.org,  npostavs <at> gmail.com
> Date: Fri, 09 Mar 2018 17:54:23 +0100
> 
> > "+++" means this change was documented in the manual(s), but this
> > change wasn't, AFAIU.  Shkuld this be documented in the ELisp manual?
> >
> 
> etc/NEWS says:
> 
>   +++ indicates that all necessary documentation updates are complete.
>       (This means all relevant manuals in doc/ AND lisp doc-strings.)
> 
> I'd looked through the manuals and couldn't see anywhere where I
> thought it should be documented, hence I only changed the
> doc-string. We can go for '---' in that case.

"---" is correct if a change needs not be documented, yes.

In this case, I wonder whether we should document this where
warning-suppress-types etc. are documented.

> +---
> +** Specific warnings can now be disabled from the warning buffer.
> +When a warning is displayed to the user, the resulting buffer now has
> +buttons which allow making permanent changes to the treatment of that
> +warning.  Automatic showing of the warning can be disabled (although
> +it is still generated), or generation of the warning can be disabled
> +entirely.

Instead of the vague "generation" I'd suggest to say explicitly that
its logged in the *Messages* buffer.  Otherwise, this text is a
significant improvement, thanks.

> +(define-button-type 'warning-suppress-warning
> +  'action #'warning-suppress-action
> +  'help-echo "mouse-2, RET: Don't display this warning automatically")
> +(defun warning-suppress-action (button)
> +  (customize-save-variable 'warning-suppress-types
> +                           (cons (list (button-get button 'warning-type))
> +                                 warning-suppress-types)))
> +(define-button-type 'warning-suppress-log-warning
> +  'action #'warning-suppress-log-action
> +  'help-echo "mouse-2, RET: Never generate this warning again")
> +(defun warning-suppress-log-action (button)
> +  (customize-save-variable 'warning-suppress-log-types
> +                           (cons (list (button-get button 'warning-type))
> +                                 warning-suppress-types)))

I think we should make similar changes in the help-echo strings.

> +              (insert-button "Disable showing automatically" 'type 'warning-suppress-warning 'warning-type type)
> +              (insert " ")
> +              (insert-button "Never generate" 'type 'warning-suppress-log-warning 'warning-type type)

And here.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30757; Package emacs. (Sat, 10 Mar 2018 03:15:01 GMT) Full text and rfc822 format available.

Message #35 received at 30757 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 30757 <at> debbugs.gnu.org
Subject: Re: bug#30757: Better manipulation (suppressing,
 examining type) of warnings from *Warnings* buffer
Date: Fri, 09 Mar 2018 22:14:42 -0500
Robert Pluim <rpluim <at> gmail.com> writes:

> Yes. I'm stuck between being precise but verbose, and more general and
> succinct, and expressing the permanence of the resulting change. I've
> make another attempt, although I'm still not entirely happy with it,
> especially since the button texts are now quite long (I thought about
> using the verb 'hide', but that's not accurate either).

Perhaps taking Drew's suggestion to popup a *Help* window would give
more room to be descriptive?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30757; Package emacs. (Mon, 12 Mar 2018 11:05:01 GMT) Full text and rfc822 format available.

Message #38 received at 30757 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 30757 <at> debbugs.gnu.org
Subject: Re: bug#30757: Better manipulation (suppressing,
 examining type) of warnings from *Warnings* buffer
Date: Mon, 12 Mar 2018 12:04:31 +0100
Noam Postavsky <npostavs <at> gmail.com> writes:

> Robert Pluim <rpluim <at> gmail.com> writes:
>
>> Yes. I'm stuck between being precise but verbose, and more general and
>> succinct, and expressing the permanence of the resulting change. I've
>> make another attempt, although I'm still not entirely happy with it,
>> especially since the button texts are now quite long (I thought about
>> using the verb 'hide', but that's not accurate either).
>
> Perhaps taking Drew's suggestion to popup a *Help* window would give
> more room to be descriptive?

It would, but I thought the target user here was someone who doesn't
necessarily know much about how to configure stuff in Emacs, but just
wants to disable an annoying warning, so a long verbose detailed
*Help* window might be counter-productive.

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30757; Package emacs. (Fri, 04 Sep 2020 04:31:02 GMT) Full text and rfc822 format available.

Message #41 received at 30757 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>,  30757 <at> debbugs.gnu.org,  npostavs <at> gmail.com
Subject: Re: bug#30757: Better manipulation (suppressing, examining type) of
 warnings from *Warnings* buffer
Date: Fri, 04 Sep 2020 06:30:31 +0200
Robert Pluim <rpluim <at> gmail.com> writes:

> Yes. I'm stuck between being precise but verbose, and more general and
> succinct, and expressing the permanence of the resulting change. I've
> make another attempt, although I'm still not entirely happy with it,
> especially since the button texts are now quite long (I thought about
> using the verb 'hide', but that's not accurate either).

I think everybody agreed that the feature was good, but there was some
discussion about the wording, so the patch was never applied.  I've now
respun the patch for Emacs 28, and tweaked the wording (and made it
pretty brief).  If anybody wants to change the wording, please do so,
but I don't think we should let that stop us from adding the
functionality, so I've now pushed it.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 04 Sep 2020 04:31:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 30757 <at> debbugs.gnu.org and Noam Postavsky <npostavs <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 04 Sep 2020 04:31:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30757; Package emacs. (Fri, 04 Sep 2020 08:55:02 GMT) Full text and rfc822 format available.

Message #48 received at 30757 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 30757 <at> debbugs.gnu.org, npostavs <at> gmail.com
Subject: Re: bug#30757: Better manipulation (suppressing, examining type) of
 warnings from *Warnings* buffer
Date: Fri, 04 Sep 2020 10:54:44 +0200
>>>>> On Fri, 04 Sep 2020 06:30:31 +0200, Lars Ingebrigtsen <larsi <at> gnus.org> said:

    Lars> Robert Pluim <rpluim <at> gmail.com> writes:
    >> Yes. I'm stuck between being precise but verbose, and more general and
    >> succinct, and expressing the permanence of the resulting change. I've
    >> make another attempt, although I'm still not entirely happy with it,
    >> especially since the button texts are now quite long (I thought about
    >> using the verb 'hide', but that's not accurate either).

    Lars> I think everybody agreed that the feature was good, but there was some
    Lars> discussion about the wording, so the patch was never applied.  I've now
    Lars> respun the patch for Emacs 28, and tweaked the wording (and made it
    Lars> pretty brief).  If anybody wants to change the wording, please do so,
    Lars> but I don't think we should let that stop us from adding the
    Lars> functionality, so I've now pushed it.

I think this one was a victim of when I moved to a mac, and it got
orphaned. Thanks for this, although youʼre running the risk of me just
posting patches and waiting for you to apply them :-)

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30757; Package emacs. (Fri, 04 Sep 2020 11:24:02 GMT) Full text and rfc822 format available.

Message #51 received at 30757 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 30757 <at> debbugs.gnu.org, npostavs <at> gmail.com
Subject: Re: bug#30757: Better manipulation (suppressing, examining type) of
 warnings from *Warnings* buffer
Date: Fri, 04 Sep 2020 13:22:50 +0200
Robert Pluim <rpluim <at> gmail.com> writes:

> I think this one was a victim of when I moved to a mac, and it got
> orphaned. Thanks for this, although youʼre running the risk of me just
> posting patches and waiting for you to apply them :-)

Eeek!!

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 03 Oct 2020 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 205 days ago.

Previous Next


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