unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Problems stepping through PC-lint output
@ 2005-11-04 22:46 Sarir Khamsi
  2005-11-05  7:52 ` Juri Linkov
  2005-11-06 16:30 ` Stefan Monnier
  0 siblings, 2 replies; 5+ messages in thread
From: Sarir Khamsi @ 2005-11-04 22:46 UTC (permalink / raw)


I am using GNU Emacs (22.0.50.20) on WinXP, SP2 to step through the
output of PC-lint using the Emacs "next-error" command but am having
problems. First, I execute "compilation-mode" on the PC-lint output
file to get into, well, compilation mode (this also changes the colors
of the warnings, errors, info, etc). Next, I step through the output
with the "next-error" command, as mentioned, but some of the output
gets skipped entirely. That is, when I press "next-error" to have
Emacs go to the source code where the next "error" is, some lines in
the PC-lint output get skipped.

For example, given the lines

   --- Module:   Vehicle.cpp
               _
   #define D2R 0.0174532925199433
   MathGlobals.h:41:12: Note 1923: macro 'D2R' could become const variable --
       Effective C++ #1
                 _
   #define R2D 1/D2R
   MathGlobals.h:42:14: Info 773: Expression-like macro 'R2D' not parenthesized
   MathGlobals.h:42:14: Note 1923: macro 'R2D' could become const variable --
       Effective C++ #1
                      _
      d_IParam(double);
   ConcreteTypes.hpp:21:19: Note 1931: Constructor 'd_IParam::d_IParam(double)'
       can be used for implicit conversions -- More Effective C++ #5
                   _
      i_IParam(int);

the "MathGlobals.h:42:14: Info 773" line will get skipped and Emacs
will jump to the next message (in this case, the second "Note 1923"
about R2D). I am using

-"format=%(%f:%l:%c: %)%t %n: %m"

in my options.lnt file for PC-lint (per some instructions on the web),
which helped get this working at all, but I can't see why lines are
getting skipped. Any ideas? Thanks.

Sarir

PS I can send more info and/or files on request.

-- 
Sarir Khamsi
email: sarir.khamsi@raytheon.com

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

* Re: Problems stepping through PC-lint output
  2005-11-04 22:46 Problems stepping through PC-lint output Sarir Khamsi
@ 2005-11-05  7:52 ` Juri Linkov
  2005-11-05 23:43   ` Richard M. Stallman
  2005-11-06 16:30 ` Stefan Monnier
  1 sibling, 1 reply; 5+ messages in thread
From: Juri Linkov @ 2005-11-05  7:52 UTC (permalink / raw)
  Cc: emacs-devel

>    MathGlobals.h:42:14: Info 773: Expression-like macro 'R2D' not parenthesized
>    MathGlobals.h:42:14: Note 1923: macro 'R2D' could become const variable --
>[...]
> the "MathGlobals.h:42:14: Info 773" line will get skipped and Emacs
> will jump to the next message (in this case, the second "Note 1923"
> about R2D).

Please see the documentation of the variable `compilation-skip-threshold'.
It has the default value 1 which means that `next-error' skips anything
less than a warning.  In your case the "MathGlobals.h:42:14: Info 773" line
is less than a warning.  It is an informational message.  If you set this
variable to 0, you can visit informational messages as well.

Also please note that when you set it to 0, you will skip the error
message on the second line "MathGlobals.h:42:14: Note 1923", but for
another reason: it is located on the same line and column as its
preceding message (i.e. both have 42:14).  The default value `t'
of another variable `compilation-skip-to-next-location' which skips
multiple error messages for the same source location, will skip it too.
You can set it to `nil' if you want.

BTW, after looking at these variables, I have some questions:

These variables are not documented in the Emacs manual.  Should they?

I don't understand why `compilation-skip-to-next-location' is not
defined with `defcustom' whereas other related variables are.  Should it?

The documentation string of `compilation-skip-threshold' says:
"The value can be either 2 -- skip anything less than error, 1 --
skip anything less than warning or 0 -- don't skip any messages."
Is it grammatically correct English?  IIUC, "either" means "one of two",
not "one of three" or more.

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: Problems stepping through PC-lint output
  2005-11-05  7:52 ` Juri Linkov
@ 2005-11-05 23:43   ` Richard M. Stallman
  0 siblings, 0 replies; 5+ messages in thread
From: Richard M. Stallman @ 2005-11-05 23:43 UTC (permalink / raw)
  Cc: sarir.khamsi, emacs-devel

    These variables are not documented in the Emacs manual.  Should they?

How about if you propose a patch to add them?

    The documentation string of `compilation-skip-threshold' says:
    "The value can be either 2 -- skip anything less than error, 1 --
    skip anything less than warning or 0 -- don't skip any messages."
    Is it grammatically correct English?

Yes, it is correct.

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

* Re: Problems stepping through PC-lint output
  2005-11-04 22:46 Problems stepping through PC-lint output Sarir Khamsi
  2005-11-05  7:52 ` Juri Linkov
@ 2005-11-06 16:30 ` Stefan Monnier
  2005-11-14 21:28   ` Sarir Khamsi
  1 sibling, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2005-11-06 16:30 UTC (permalink / raw)
  Cc: emacs-devel

> about R2D). I am using

> -"format=%(%f:%l:%c: %)%t %n: %m"

> in my options.lnt file for PC-lint (per some instructions on the web),

BTW, please tell(complain) to the PC-Lint people that their default format
is inconvenient because it does not follow any standard.


        Stefan

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

* Re: Problems stepping through PC-lint output
  2005-11-06 16:30 ` Stefan Monnier
@ 2005-11-14 21:28   ` Sarir Khamsi
  0 siblings, 0 replies; 5+ messages in thread
From: Sarir Khamsi @ 2005-11-14 21:28 UTC (permalink / raw)
  Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> about R2D). I am using
>
>> -"format=%(%f:%l:%c: %)%t %n: %m"
>
>> in my options.lnt file for PC-lint (per some instructions on the web),
>
> BTW, please tell(complain) to the PC-Lint people that their default format
> is inconvenient because it does not follow any standard.

Done.

Sarir

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

end of thread, other threads:[~2005-11-14 21:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-04 22:46 Problems stepping through PC-lint output Sarir Khamsi
2005-11-05  7:52 ` Juri Linkov
2005-11-05 23:43   ` Richard M. Stallman
2005-11-06 16:30 ` Stefan Monnier
2005-11-14 21:28   ` Sarir Khamsi

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).