GNU bug report logs -
#4837
with-fewer-warnings ?
Previous Next
Reported by: Glenn Morris <rgm <at> gnu.org>
Date: Sat, 31 Oct 2009 02:30:05 UTC
Severity: wishlist
Tags: fixed
Fixed in version 27.0
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 4837 in the body.
You can then email your comments to 4837 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4837
; Package
emacs
.
(Sat, 31 Oct 2009 02:30:05 GMT)
Full text and
rfc822 format available.
Message #3 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Severity: wishlist
`with-no-warnings' suppresses all compilation warnings.
I would like to add `with-fewer-warnings' (or some similar name) that
suppresses only some warnings.
Eg (with-fewer-warnings '(obsolete cl-functions) ...)
would not warn about obsolete things or cl-functions in the body. The
possible arguments are the members of byte-compile-warnings.
I can implement this if it is considered worth it (it's very similar
to with-no-warnings).
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4837
; Package
emacs
.
(Sat, 31 Oct 2009 08:55:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Sat, 31 Oct 2009 08:55:04 GMT)
Full text and
rfc822 format available.
Message #8 received at 4837 <at> emacsbugs.donarmstrong.com (full text, mbox):
> From: Glenn Morris <rgm <at> gnu.org>
> Date: Fri, 30 Oct 2009 22:25:36 -0400
> Cc:
>
> Eg (with-fewer-warnings '(obsolete cl-functions) ...)
>
> would not warn about obsolete things or cl-functions in the body. The
> possible arguments are the members of byte-compile-warnings.
with-suppressed-warnings sounds like a better name to me.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4837
; Package
emacs
.
(Sun, 01 Nov 2009 02:40:06 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
rms <at> gnu.org
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Sun, 01 Nov 2009 02:40:07 GMT)
Full text and
rfc822 format available.
Message #13 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Eg (with-fewer-warnings '(obsolete cl-functions) ...)
would not warn about obsolete things or cl-functions in the body. The
possible arguments are the members of byte-compile-warnings.
I can implement this if it is considered worth it (it's very similar
to with-no-warnings).
I think it isn't worth doing, because it would only gain you very much
if you put a lot of code inside with-no-warnings; we avoid doing that.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4837
; Package
emacs
.
(Sun, 01 Nov 2009 02:40:08 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
rms <at> gnu.org
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Sun, 01 Nov 2009 02:40:09 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4837
; Package
emacs
.
(Mon, 09 Nov 2009 08:50:06 GMT)
Full text and
rfc822 format available.
Message #21 received at 4837 <at> emacsbugs.donarmstrong.com (full text, mbox):
Richard Stallman wrote:
> I think it isn't worth doing,
(I'd already done it, locally, before posting.)
> because it would only gain you very much if you put a lot of code
> inside with-no-warnings; we avoid doing that.
Perhaps because it is such a blunt instrument. This would make it a
bit less blunt. I don't claim this is important, but it is easy to
implement.
Example usage:
In the _implementation_ of an obsolete feature, it's ok to use an
obsolete variable and there is no need to be warned about it being
obsolete. However, you should still be warned about the variable not
being defined, in case you remove it altogether but forget to update
the code that uses it.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4837
; Package
emacs
.
(Mon, 09 Nov 2009 14:45:06 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Mon, 09 Nov 2009 14:45:06 GMT)
Full text and
rfc822 format available.
Message #26 received at 4837 <at> emacsbugs.donarmstrong.com (full text, mbox):
>> I think it isn't worth doing,
> (I'd already done it, locally, before posting.)
>> because it would only gain you very much if you put a lot of code
>> inside with-no-warnings; we avoid doing that.
> Perhaps because it is such a blunt instrument. This would make it a
> bit less blunt. I don't claim this is important, but it is easy to
> implement.
> In the _implementation_ of an obsolete feature, it's ok to use an
> obsolete variable and there is no need to be warned about it being
> obsolete. However, you should still be warned about the variable not
> being defined, in case you remove it altogether but forget to update
> the code that uses it.
Actually, I think I agree (I hate with-no-warnings), but it should be
even more precise, and specify which obsolete warning to silence.
Stefan
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4837
; Package
emacs
.
(Tue, 10 Nov 2009 02:15:06 GMT)
Full text and
rfc822 format available.
Message #29 received at 4837 <at> emacsbugs.donarmstrong.com (full text, mbox):
Stefan Monnier wrote:
> Actually, I think I agree (I hate with-no-warnings), but it should be
> even more precise, and specify which obsolete warning to silence.
Do you mean, specify precisely which obsolete variable/function(s) not
to warn about? That's probably doable via
byte-compile-not-obsolete-vars/funcs, I'll have a look.
A syntax like this?
(with-suppressed-warnings
'((obsolete read-file-name-predicate ...) cl-functions ...)
body)
Although the motivation for this was not _just_ obsolete warnings, and
it might not be so simple to extend your request to eg specific free
variables.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4837
; Package
emacs
.
(Tue, 10 Nov 2009 18:00:09 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> IRO.UMontreal.CA>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Tue, 10 Nov 2009 18:00:09 GMT)
Full text and
rfc822 format available.
Message #34 received at 4837 <at> emacsbugs.donarmstrong.com (full text, mbox):
>> Actually, I think I agree (I hate with-no-warnings), but it should be
>> even more precise, and specify which obsolete warning to silence.
> Do you mean, specify precisely which obsolete variable/function(s) not
> to warn about? That's probably doable via
> byte-compile-not-obsolete-vars/funcs, I'll have a look.
> A syntax like this?
> (with-suppressed-warnings
> '((obsolete read-file-name-predicate ...) cl-functions ...)
> body)
Yes, something like that. Also the `cl-functions' is too broad and
should not be allowed.
> Although the motivation for this was not _just_ obsolete warnings, and
> it might not be so simple to extend your request to eg specific free
> variables.
I didn't say it was easy.
BTW, maybe a good way to do it is to implement this in the function
that outputs the warnings: currently it just received some kind of
string, which is not very amenable to what we want, but if you change it
to take a more structured description of the warning, then it might be
doable (tho maybe it won't happen at the right place, I don't know).
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#4837
; Package
emacs
.
(Wed, 12 Jun 2019 14:57:02 GMT)
Full text and
rfc822 format available.
Message #37 received at 4837 <at> debbugs.gnu.org (full text, mbox):
Glenn Morris <rgm <at> gnu.org> writes:
> `with-no-warnings' suppresses all compilation warnings.
>
> I would like to add `with-fewer-warnings' (or some similar name) that
> suppresses only some warnings.
>
> Eg (with-fewer-warnings '(obsolete cl-functions) ...)
This is now implemented on master as `with-suppressed-warnings'.
--
(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
.
(Wed, 12 Jun 2019 14:57:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 27.0, send any further explanations to
4837 <at> debbugs.gnu.org and Glenn Morris <rgm <at> gnu.org>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 12 Jun 2019 14:57:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#4837
; Package
emacs
.
(Wed, 12 Jun 2019 16:14:02 GMT)
Full text and
rfc822 format available.
Message #44 received at 4837 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen wrote:
> This is now implemented on master as `with-suppressed-warnings'.
Thanks a lot! :)
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 11 Jul 2019 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 143 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.