all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: stephe <stephen_leake@stephe-leake.org>
To: 5983@debbugs.gnu.org
Subject: bug#5983: 23.1.96; compilation-next-error broken
Date: Tue, 20 Apr 2010 05:45:02 -0400	[thread overview]
Message-ID: <827ho24fvl.fsf@stephe-leake.org> (raw)

Starting from `emacs -Q':

open this C file:

------------
int main (int argc, char *argv[])
{

   printf ("missing include\n");
   printf ("missing paren";
   return 0;
} /* end main */
/* end of file */
------------

(note that it is missing a #include, and is missing a paren)

Attempt to compile it:

M-x compile

Change the compile command to:

gcc test.c

This gives a list of compilation errors:

-*- mode: compilation; default-directory: "/home/stephe/" -*-
Compilation started at Tue Apr 20 05:25:38

gcc test.c
test.c: In function ‘main’:
test.c:4: warning: incompatible implicit declaration of built-in function ‘printf’
test.c:5: error: expected ‘)’ before ‘;’ token
test.c:7: error: expected ‘;’ before ‘}’ token

Compilation exited abnormally with code 1 at Tue Apr 20 05:25:38
------------

Go to the first error: C-x ` . point is now on the line that prints
"missing include". Fix the problem by adding a line "#include <stdio.h>"
at the top of the buffer. Now the line number in the next error message
is wrong, but Emacs used to handle that by using markers appropriately.

Now go to the next error: C-x `. Point should be on the line that prints
"missing paren", but it is on the previous line (the current line 5).

The problem seems to be in compilation-next-error. It has a mechanism
that sets markers based on the line/column info in the error messages,
assuming the file has not changed. It puts file mod timestamps in the
compilation error structure to record that this has been done, so it
doesn't get done again (after the buffer has changed). However, it
doesn't set the timestamp in every line, and when it gets to a line
without a timestamp, it processes the marker info again, which is wrong.

I don't have a fix.

This same bug is in trunk (emacs version 24.0.50.2, bzr rev 99948)

In GNU Emacs 23.1.96.1 (i686-pc-linux-gnu, GTK+ Version 2.18.6)
 of 2010-04-20 on Shevek
Windowing system distributor `The Cygwin/X Project', version 11.0.10706000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x r e p o r t - e m a c s - b u g <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml
easymenu mml-sec password-cache mm-decode mm-bodies mm-encode mailcap
mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader
gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit
mailheader canlock sha1 hex-util hashcash mail-utils emacsbug tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting
tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process font-render-setting gtk x-toolkit x
multi-tty emacs)








             reply	other threads:[~2010-04-20  9:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-20  9:45 stephe [this message]
2010-04-20 14:26 ` bug#5983: 23.1.96; compilation-next-error broken Ted Zlatanov
2010-04-20 16:06   ` Chong Yidong
2010-04-20 15:37 ` Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=827ho24fvl.fsf@stephe-leake.org \
    --to=stephen_leake@stephe-leake.org \
    --cc=5983@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.