all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: checkdoc-batch.el v.3
       [not found] <mailman.5.1273618593.5320.gnu-emacs-sources@gnu.org>
@ 2010-05-12 15:10 ` Stefan Monnier
  2010-05-13  1:38   ` Eric M. Ludlam
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2010-05-12 15:10 UTC (permalink / raw)
  To: Kevin Ryde; +Cc: emacs-devel

> This spot of code runs M-x checkdoc in "batch" style, giving a report of
> problems instead of going through interactively fixing them.

This sounds desirable.

> The implementation is diabolical,

That sounds less so.

I generally like checkdoc, but it's too much in-your-face for my taste.
If you're interested, it would be wonderful if you could change it so it
doesn't signal errors all the time, but just messages/warnings instead.

The intention would be:
- make it possible/bearable to enable checkdoc-mode unconditionally
  (so M-C-x will always check your docstrings, whether you want it or
  not, which clearly requires reducing substantially the
  in-your-faceness factor).
- solve the problem you mention that rejecting one suggestion can make
  you miss subsequent ones.
- make something like checkdoc-batch possible without resorting to
  a diabolical implementation.


        Stefan



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: checkdoc-batch.el v.3
  2010-05-12 15:10 ` checkdoc-batch.el v.3 Stefan Monnier
@ 2010-05-13  1:38   ` Eric M. Ludlam
  2010-05-13  2:40     ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Eric M. Ludlam @ 2010-05-13  1:38 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Kevin Ryde, emacs-devel

Hi,

I missed the first post, and perhaps I have misinterpreted what the 
original post was.

On 05/12/2010 11:10 AM, Stefan Monnier wrote:
>> This spot of code runs M-x checkdoc in "batch" style, giving a report of
>> problems instead of going through interactively fixing them.
>
> This sounds desirable.

If you pass a prefix argument to checkdoc-current-buffer, and a couple 
other functions, it logs all the messages to a buffer.

If you are instead discussing the doc strings in the C code, here is 
some code I posted a long time ago:

http://lists.gnu.org/archive/html/emacs-devel/2001-11/msg00760.html

>> The implementation is diabolical,
>
> That sounds less so.
>
> I generally like checkdoc, but it's too much in-your-face for my taste.

I have found that once code is clean, checkdoc doesn't complain.  If it 
does I fix the code and it stops complaining.  If you work constantly in 
non-compliant code, this would indeed be a pain.

Checkdoc follows a model similar to unit tests for your C code.  If a 
test fails, the build fails, and you have to fix it or you can play with 
your change.

Of course, you can always set the checkdoc-autofix-flag to 'never, which 
won't ask you questions.  I don't really remember what it would do.

> If you're interested, it would be wonderful if you could change it so it
> doesn't signal errors all the time, but just messages/warnings instead.
>
> The intention would be:
> - make it possible/bearable to enable checkdoc-mode unconditionally
>    (so M-C-x will always check your docstrings, whether you want it or
>    not, which clearly requires reducing substantially the
>    in-your-faceness factor).

See above.

> - solve the problem you mention that rejecting one suggestion can make
>    you miss subsequent ones.

Using the log mode I mentioned above solves this.

Eric




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: checkdoc-batch.el v.3
  2010-05-13  1:38   ` Eric M. Ludlam
@ 2010-05-13  2:40     ` Stefan Monnier
  2010-05-14 23:15       ` Kevin Ryde
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2010-05-13  2:40 UTC (permalink / raw)
  To: Eric M. Ludlam; +Cc: Kevin Ryde, emacs-devel

>>> This spot of code runs M-x checkdoc in "batch" style, giving a report of
>>> problems instead of going through interactively fixing them.
>> This sounds desirable.
> If you pass a prefix argument to checkdoc-current-buffer, and a couple other
> functions, it logs all the messages to a buffer.

I know.  That's pretty much the only way I use checkdoc explicitly.
Note that it may still not list all problems (it seems that if there are
problems in the general file layout (e.g. missing trailer) it doesn't
move on to further things).

>> I generally like checkdoc, but it's too much in-your-face for my taste.
> I have found that once code is clean, checkdoc doesn't complain.  If it does
> I fix the code and it stops complaining.  If you work constantly in
> non-compliant code, this would indeed be a pain.

I want to turn it on unconditionally.  That means it should just be
a nag, but not a pain, if you don't care to follow its advice.
BTW, I often don't follow its advice, and other times I do but it
doesn't notice/understand it.

>> - solve the problem you mention that rejecting one suggestion can make
>> you miss subsequent ones.
> Using the log mode I mentioned above solves this.

I don't think it does completely.


        Stefan



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: checkdoc-batch.el v.3
  2010-05-13  2:40     ` Stefan Monnier
@ 2010-05-14 23:15       ` Kevin Ryde
  0 siblings, 0 replies; 4+ messages in thread
From: Kevin Ryde @ 2010-05-14 23:15 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel, Eric M. Ludlam

Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
> Note that it may still not list all problems (it seems that if there are
> problems in the general file layout (e.g. missing trailer) it doesn't
> move on to further things).

That and running on a set of files were the two main things I wanted.
I also found it a bit hard to tell quite what an add-on check should do
for multiple problems and querying the user about fix or not.  It may be
just a matter of better words there, though I might have said before it
seems run-hook-with-args-until-success in checkdoc-run-hooks ends up
meaning stop on the first problem detected by an add-on.  But perhaps
that's intended ...



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-14 23:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.5.1273618593.5320.gnu-emacs-sources@gnu.org>
2010-05-12 15:10 ` checkdoc-batch.el v.3 Stefan Monnier
2010-05-13  1:38   ` Eric M. Ludlam
2010-05-13  2:40     ` Stefan Monnier
2010-05-14 23:15       ` Kevin Ryde

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.