From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#30757: Better manipulation (suppressing, examining type) of warnings from *Warnings* buffer Date: Fri, 09 Mar 2018 20:28:49 +0200 Message-ID: <83tvtpumqm.fsf@gnu.org> References: <877eql1ld0.fsf@gmail.com> <871sgtnxth.fsf@gmail.com> <87woylminv.fsf@gmail.com> <873719kzyh.fsf@gmail.com> <83zi3husrr.fsf@gnu.org> <87vae5jikg.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1520620172 28579 195.159.176.226 (9 Mar 2018 18:29:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Mar 2018 18:29:32 +0000 (UTC) Cc: 30757@debbugs.gnu.org, npostavs@gmail.com To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 09 19:29:27 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1euMlj-0007Ka-Bv for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Mar 2018 19:29:27 +0100 Original-Received: from localhost ([::1]:47306 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euMnm-0004qw-9k for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Mar 2018 13:31:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euMmP-0003sA-Vk for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2018 13:30:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euMmK-0004fM-57 for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2018 13:30:09 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44920) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1euMmK-0004eS-0h for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2018 13:30:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1euMmJ-0005nS-GE for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2018 13:30:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Mar 2018 18:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30757 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30757-submit@debbugs.gnu.org id=B30757.152062014422175 (code B ref 30757); Fri, 09 Mar 2018 18:30:03 +0000 Original-Received: (at 30757) by debbugs.gnu.org; 9 Mar 2018 18:29:04 +0000 Original-Received: from localhost ([127.0.0.1]:52817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1euMlM-0005lb-Bf for submit@debbugs.gnu.org; Fri, 09 Mar 2018 13:29:04 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:58425) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1euMlK-0005l5-N3 for 30757@debbugs.gnu.org; Fri, 09 Mar 2018 13:29:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euMlE-000492-FG for 30757@debbugs.gnu.org; Fri, 09 Mar 2018 13:28:57 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41367) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euMl9-00047L-QN; Fri, 09 Mar 2018 13:28:51 -0500 Original-Received: from [176.228.60.248] (port=1882 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1euMl9-0002uF-7X; Fri, 09 Mar 2018 13:28:51 -0500 In-reply-to: <87vae5jikg.fsf@gmail.com> (message from Robert Pluim on Fri, 09 Mar 2018 17:54:23 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:144082 Archived-At: > From: Robert Pluim > Cc: 30757@debbugs.gnu.org, npostavs@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.