GNU bug report logs - #20754
checkdoc-current-buffer prints to stdout?!

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Sat, 6 Jun 2015 18:52:01 UTC

Severity: normal

Done: Oleh Krehel <ohwoeowho <at> gmail.com>

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 20754 in the body.
You can then email your comments to 20754 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#20754; Package emacs. (Sat, 06 Jun 2015 18:52:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Eggert <eggert <at> cs.ucla.edu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 06 Jun 2015 18:52:02 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Emacs bug reports and feature requests <bug-gnu-emacs <at> gnu.org>
Cc: Sebastian Wiesner <swiesner <at> lunaryorn.com>,
 Oleh Krehel <ohwoeowho <at> gmail.com>
Subject: checkdoc-current-buffer prints to stdout?!
Date: Sat, 06 Jun 2015 11:50:57 -0700
[The following bug report was sent by Sebastian Wiesner to emacs-devel 
<http://lists.gnu.org/archive/html/emacs-devel/2015-06/msg00095.html>.]

Hello,

while debugging unit test failures in Flycheck, I accidentally discovered
checkdoc-current-buffer apparently prints messages to standard output in
Emacs 25.1 in noninteractive mode.

Would you please revert this change?

I can understand the motivation for this “feature”, but it's generally a
bad idea for an interactive function to print text to standard output
depending on an opaque global environment.  It also makes backwards
compatibility harder than it needs to be:  As things stand I have no choice
but to check the Emacs version to print Checkdoc Errors in a consistent way
across Emacs major versions, and that is somewhat ugly.

The purpose of this feature would also be served by a different entry
point—we have `ert-run-tests-interactively` and `ert-run-tests-batch`,
too.  If that is impossible please at least expose an option to turn this
feature off.

On a related topic, I'd have fixed this issue much faster, had this change
been mentioned in the NEWS.  Would you please be more strict about updating
NEWS for breaking changes such as this?

Sincerely,
Sebastian Wiesner




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20754; Package emacs. (Sun, 07 Jun 2015 14:24:02 GMT) Full text and rfc822 format available.

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

From: Oleh Krehel <ohwoeowho <at> gmail.com>
To: Sebastian Wiesner <swiesner <at> lunaryorn.com>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, 20754 <at> debbugs.gnu.org
Subject: Re: bug#20754: checkdoc-current-buffer prints to stdout?!
Date: Sun, 07 Jun 2015 16:23:48 +0200
Sebastian Wiesner <swiesner <at> lunaryorn.com> writes:

> while debugging unit test failures in Flycheck, I accidentally discovered
> checkdoc-current-buffer apparently prints messages to standard output in
> Emacs 25.1 in noninteractive mode.
>
> Would you please revert this change?

No, this change doesn't need to be reverted. It's useful for running
checkdoc in batch. And it does check for `noninteractive' before
printing. There's a bunch of workarounds that flycheck could use:

- bind `noninteractive'
- bind `inhibit-message'

> Would you please be more strict about updating
> NEWS for breaking changes such as this?

This isn't a breaking change. If you have any problem with checkdoc, the
usual procedure is to:

    git log --follow lisp/emacs-lisp/checkdoc.el

or the equivalent "lf" in magit.

Actually, I'd think that it would be beneficial for flycheck to be able
to run checkdoc in batch, since async can make things faster. But then,
I'm not really familiar with flycheck.

Oleh




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20754; Package emacs. (Sun, 07 Jun 2015 15:30:07 GMT) Full text and rfc822 format available.

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

From: Sebastian Wiesner <swiesner <at> lunaryorn.com>
To: Oleh Krehel <ohwoeowho <at> gmail.com>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, 20754 <at> debbugs.gnu.org
Subject: Re: bug#20754: checkdoc-current-buffer prints to stdout?!
Date: Sun, 7 Jun 2015 17:29:00 +0200
[Message part 1 (text/plain, inline)]
2015-06-07 16:23 GMT+02:00 Oleh Krehel <ohwoeowho <at> gmail.com>:

> Sebastian Wiesner <swiesner <at> lunaryorn.com> writes:
>
> > while debugging unit test failures in Flycheck, I accidentally discovered
> > checkdoc-current-buffer apparently prints messages to standard output in
> > Emacs 25.1 in noninteractive mode.
> >
> > Would you please revert this change?
>
> No, this change doesn't need to be reverted. It's useful for running
> checkdoc in batch. And it does check for `noninteractive' before
> printing.


That is exactly _why_ I'd like to see this change reverted.  It introduces
output that is controlled by an entirely unrelated global variable.  YMMV,
but I don't think that this is good design at all.

> Would you please be more strict about updating
> > NEWS for breaking changes such as this?
>
> This isn't a breaking change.


It _did_ break Flycheck.

If you have any problem with checkdoc, the
> usual procedure is to:
>
>     git log --follow lisp/emacs-lisp/checkdoc.el


> or the equivalent "lf" in magit.
>

No offence meant, but why do you even bother with NEWS at all if that's
your general response to such issues?


> Actually, I'd think that it would be beneficial for flycheck to be able
> to run checkdoc in batch, since async can make things faster.


Flycheck has been successfully running checkdoc asynchronously in a
non-interactive batch session in batch since long before this change was
made.  This change didn't have any benefits at all for Flycheck, it only
made matters worse.

Why can't you just leave checkdoc-current-buffer as is, and introduce a new
entry point?

What works for ERT, can't be bad for checkdoc, and it means a lot less
trouble for anyone who's using checkdoc noninteractively, mostly because
they can explicitly opt in to this new behaviour instead of being forced
into it.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20754; Package emacs. (Sun, 07 Jun 2015 18:29:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Oleh Krehel <ohwoeowho <at> gmail.com>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>,
 Sebastian Wiesner <swiesner <at> lunaryorn.com>, 20754 <at> debbugs.gnu.org
Subject: Re: bug#20754: checkdoc-current-buffer prints to stdout?!
Date: Sun, 07 Jun 2015 14:27:59 -0400
Oleh Krehel wrote:

>> Would you please be more strict about updating
>> NEWS for breaking changes such as this?
>
> This isn't a breaking change.

NEWS should be updated for any change that may affect users,
"breaking" or otherwise.
When in doubt, make a NEWS entry.
It can always be removed on review before the next release.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20754; Package emacs. (Mon, 08 Jun 2015 06:04:01 GMT) Full text and rfc822 format available.

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

From: Oleh Krehel <ohwoeowho <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>,
 Sebastian Wiesner <swiesner <at> lunaryorn.com>, 20754 <at> debbugs.gnu.org
Subject: Re: bug#20754: checkdoc-current-buffer prints to stdout?!
Date: Mon, 08 Jun 2015 07:56:22 +0200
Glenn Morris <rgm <at> gnu.org> writes:

> Oleh Krehel wrote:
>
>>> Would you please be more strict about updating
>>> NEWS for breaking changes such as this?
>>
>> This isn't a breaking change.
>
> NEWS should be updated for any change that may affect users,
> "breaking" or otherwise.
> When in doubt, make a NEWS entry.
> It can always be removed on review before the next release.

Should I make the entry now?

    ** New functionality in `checkdoc-current-buffer'
    When called in -batch, print the warnings to the standard output.

Or introduce a new function `checkdoc-file', akin to
`byte-compile-file', that would only print the warnings to the standard
output?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20754; Package emacs. (Mon, 08 Jun 2015 06:43:02 GMT) Full text and rfc822 format available.

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

From: Oleh Krehel <ohwoeowho <at> gmail.com>
To: Sebastian Wiesner <swiesner <at> lunaryorn.com>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, 20754 <at> debbugs.gnu.org
Subject: Re: bug#20754: checkdoc-current-buffer prints to stdout?!
Date: Mon, 08 Jun 2015 08:35:19 +0200
Sebastian Wiesner <swiesner <at> lunaryorn.com> writes:

> Why can't you just leave checkdoc-current-buffer as is, and introduce
> a new entry point?

Done. Also added a NEWS entry.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20754; Package emacs. (Mon, 08 Jun 2015 09:18:03 GMT) Full text and rfc822 format available.

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

From: Sebastian Wiesner <swiesner <at> lunaryorn.com>
To: Oleh Krehel <ohwoeowho <at> gmail.com>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, 20754 <at> debbugs.gnu.org
Subject: Re: bug#20754: checkdoc-current-buffer prints to stdout?!
Date: Mon, 8 Jun 2015 11:17:13 +0200
[Message part 1 (text/plain, inline)]
2015-06-08 8:35 GMT+02:00 Oleh Krehel <ohwoeowho <at> gmail.com>:

> Sebastian Wiesner <swiesner <at> lunaryorn.com> writes:
>
> > Why can't you just leave checkdoc-current-buffer as is, and introduce
> > a new entry point?
>
> Done. Also added a NEWS entry.
>

Thank you very much!  That's a nice change which benefits Flycheck, and
will make checkdoc easier as soon as Flycheck drops Emacs 24 compatibility.
[Message part 2 (text/html, inline)]

Reply sent to Oleh Krehel <ohwoeowho <at> gmail.com>:
You have taken responsibility. (Mon, 08 Jun 2015 09:40:04 GMT) Full text and rfc822 format available.

Notification sent to Paul Eggert <eggert <at> cs.ucla.edu>:
bug acknowledged by developer. (Mon, 08 Jun 2015 09:40:05 GMT) Full text and rfc822 format available.

Message #28 received at 20754-done <at> debbugs.gnu.org (full text, mbox):

From: Oleh Krehel <ohwoeowho <at> gmail.com>
To: Sebastian Wiesner <swiesner <at> lunaryorn.com>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, 20754-done <at> debbugs.gnu.org
Subject: Re: bug#20754: checkdoc-current-buffer prints to stdout?!
Date: Mon, 08 Jun 2015 11:33:00 +0200
Sebastian Wiesner <swiesner <at> lunaryorn.com> writes:

> 2015-06-08 8:35 GMT+02:00 Oleh Krehel <ohwoeowho <at> gmail.com>:
>
>     Sebastian Wiesner <swiesner <at> lunaryorn.com> writes:
>     
>     > Why can't you just leave checkdoc-current-buffer as is, and
>     introduce
>     > a new entry point?
>     
>     Done. Also added a NEWS entry.
>     
>
> Thank you very much! That's a nice change which benefits Flycheck, and
> will make checkdoc easier as soon as Flycheck drops Emacs 24
> compatibility.

You're welcome, marking as done.




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

This bug report was last modified 9 years and 354 days ago.

Previous Next


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