unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: byte-compile making erroneous *Compile Log*
@ 2009-05-30  9:52 martin rudalics
  2009-05-31  5:17 ` David Vanderschel
  0 siblings, 1 reply; 12+ messages in thread
From: martin rudalics @ 2009-05-30  9:52 UTC (permalink / raw)
  To: DJV5; +Cc: help-gnu-emacs

 > The first part is a link into the file and that works fine.  However, if the
 > 'error' is found in a defun, I get something like the following:
 >
 >    In dv-java-keys:  eemacs.el:223:9:Warning: assignment to free variable
 >     `c-basic-offset'
 >
 > and then the link does not work, because the follower logic believes that the
 > "In <defun-name>" is part of the file name.

Have you set `byte-compile-error-on-warn' to a non-nil value?

martin




^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: byte-compile making erroneous *Compile Log*
@ 2009-06-02  6:23 martin rudalics
       [not found] ` <000401c9e4da$2e106680$650aa8c0@austin.rr.com>
  0 siblings, 1 reply; 12+ messages in thread
From: martin rudalics @ 2009-06-02  6:23 UTC (permalink / raw)
  To: DJV5; +Cc: help-gnu-emacs

 > I did (edebug-on-entry (quote fill-region) nil) and the debugger did not start,
 > so I must be missing something.  (E.g., do I have to recompile fill-region with
 > debugging enabled, or something like that?)

Sorry, I should have told you.  Try

M-x find-function RET fill-region RET

followed by C-u C-M-x which calls `edebug-defun` and is also on the
Emacs-Lisp menu.

 > Looking for "fill" in my initialization I found that
 > fill-individual-varying-indent and paragraph-ignore-fill-prefix were set to t.
 > However, setting both to nil did not help.  I did not see anything else that
 > looks like suspicious.

Let's see what happens when you debug this with and without your .emacs
(obviously the bug may be caused by something else than filling).

 > I am satisfied with my workaround, which took remarkably little code.  However,
 > Martin, if you are trying to debug this, I'll continue to pursue it for you -
 > just give me another clue.

I hope `edebug-defun' works for you.  You can use the following function

(defun make-empty-compile-log ()
   (interactive)
   (let ((inhibit-read-only t))
     (with-current-buffer (get-buffer-create "*Compile-Log*")
       (delete-region (point-min) (point-max))
       (display-buffer (current-buffer)))))

to create, empty and display the *Compile-Log* buffer.

Here I can't do anything because I have no recipe to reproduce your bug.

 > (Incidentally, I had poked around in the byte compiler code trying to find where
 > it was inserting the warnings - and I could not find it.  At least Martin has
 > pointed me to where it happens now.)

It's a bit tricky indeed.  `display-warning' which is in the file
warnings.el has the call

	  (if warning-prefix-function
	      (setq level-info (funcall warning-prefix-function
					level level-info)))

where `warning-prefix-function' is set by `byte-compile-log-warning' to
`byte-compile-warning-prefix'.  If you edebug-defun both
`display-warning' and `byte-compile-warning-prefix' you can observe how
these functions and the "funcall" interact when compiling a file.

martin




^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: byte-compile making erroneous *Compile Log*
@ 2009-05-31 11:40 martin rudalics
  2009-06-02  0:36 ` David Vanderschel
  0 siblings, 1 reply; 12+ messages in thread
From: martin rudalics @ 2009-05-31 11:40 UTC (permalink / raw)
  To: DJV5; +Cc: help-gnu-emacs

 > I just downloaded emacs-snapshot for Emacs 23 and the problem still exists.
 > Rather than try to figure out what was causing it, I have implemented a simple
 > program that goes into the *Compile-Log* buffer and fixes the problem by
 > inserting the missing newlines before the file name.  I had not realized it
 > initially, but some of the "In <defun-name>" log entries do appear correctly on
 > their own lines.

So IMHO the only possible culprit is the call to `fill-region' in
`display-warning' which goes as:

	  (when (and warning-fill-prefix (not (string-match "\n" message)))
	    (let ((fill-prefix warning-fill-prefix)
		  (fill-column 78))
	      (fill-region start (point))))

Please try to edebug `fill-region' (with the *Compile-Log* buffer
displayed in some window to see what's going on).  I suppose one of
your .emacs settings wrt to filling cause the behavior you observe.

martin




^ permalink raw reply	[flat|nested] 12+ messages in thread
* byte-compile making erroneous *Compile Log*
@ 2009-05-29 20:43 David Vanderschel
  2009-05-29 21:09 ` Drew Adams
  0 siblings, 1 reply; 12+ messages in thread
From: David Vanderschel @ 2009-05-29 20:43 UTC (permalink / raw)
  To: help-gnu-emacs

The typical message looks like the following:

    eemacs.el:233:25:Warning: assignment to free variable `w32-lwindow-modifier'

The first part is a link into the file and that works fine.  However, if the
'error' is found in a defun, I get something like the following:

   In dv-java-keys:  eemacs.el:223:9:Warning: assignment to free variable
    `c-basic-offset'

and then the link does not work, because the follower logic believes that the
"In <defun-name>" is part of the file name.

Now this does not happen when I start Emacs with "emacs -Q".  So I am trying
without luck to figure out what in my initialization is causing the extra defun
identifier to appear.  I thought maybe the "verbose" option for the bytecomp
group might be relevant, but no joy there.  Checking other things that I thought
might be relevant, I am failing to find it.  My initialization is a bit too
large to try to narrow it down by partial execution; so I am hoping that someone
has enough insight into this behaviour to point me to something that could be
causing it.

Emacs version: GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.14.1) of
2008-09-05 on vernadsky, modified by Ubuntu

Running under Ubuntu 9.04.







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

end of thread, other threads:[~2009-06-06  8:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-30  9:52 byte-compile making erroneous *Compile Log* martin rudalics
2009-05-31  5:17 ` David Vanderschel
  -- strict thread matches above, loose matches on Subject: below --
2009-06-02  6:23 martin rudalics
     [not found] ` <000401c9e4da$2e106680$650aa8c0@austin.rr.com>
     [not found]   ` <4A2773E2.9030001@gmx.at>
2009-06-05  8:16     ` David Vanderschel
2009-06-05  9:26       ` martin rudalics
2009-06-06  0:02         ` David Vanderschel
2009-06-06  8:21           ` martin rudalics
2009-05-31 11:40 martin rudalics
2009-06-02  0:36 ` David Vanderschel
2009-05-29 20:43 David Vanderschel
2009-05-29 21:09 ` Drew Adams
2009-05-29 22:50   ` David Vanderschel

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).