emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Overlay arrow in *compilation* and *grep* buffers


From: Eli Zaretskii
Subject: Overlay arrow in *compilation* and *grep* buffers
Date: Sun, 24 Apr 2005 13:45:35 +0300

A couple of weeks ago, a change to compile.el introduced an overlay
arrow into buffers created by compile.el: the overlay arrow now marks
the current line in the compilation buffer.  (Here, ``current line''
means the line whose locus is displayed in the other window;
next-error and mouse-1 change that line.)

At least on a text terminal, this feature is problematic.

First, suppose that "M-x compile" produced the following *compilation*
buffer (I indent the buffer contents 2 columns to the right to make it
stand out):

  -*- mode: compilation; default-directory: "~/" -*-
  gcc -Wall -O -c tfwd.c
  tfwd.c: In function `foo':
  tfwd.c:5: warning: implicit declaration of function `bar'
  tfwd.c: At top level:
  tfwd.c:11: warning: type mismatch with previous implicit declaration
  tfwd.c:5: warning: previous implicit declaration of `bar'
  tfwd.c:11: warning: `bar' was previously implicitly declared to return `int'
  tfwd.c: In function `bar':
  tfwd.c:13: warning: implicit declaration of function `callme'
  tfwd.c: At top level:
  tfwd.c:4: warning: `foo' defined but not used

  Compilation finished at Sun Apr 24 06:01:25

Now, if I type "C-x `", the window that displays the compilation
buffer looks like this:

  =>wd.c:5: warning: implicit declaration of function `bar'
  tfwd.c: At top level:
  tfwd.c:11: warning: type mismatch with previous implicit declaration
  tfwd.c:5: warning: previous implicit declaration of `bar'
  tfwd.c:11: warning: `bar' was previously implicitly declared to return `int'
  tfwd.c: In function `bar':
  tfwd.c:13: warning: implicit declaration of function `callme'
  tfwd.c: At top level:
  tfwd.c:4: warning: `foo' defined but not used

  Compilation finished at Sun Apr 24 06:01:25

Notice the overlay arrow that covered part of the file name: this is a
bug, IMHO.  If we want to have an arrow pointing out the current line,
we should indent the buffer text to the right as many columns as the
arrow string takes.

Moreover, next-error scrolls the display to keep the current line at
the top of the window.  I think it's a bit silly to mark the with an
arrow a line that is always at the top of its window; such an arrow
might make sense if we do not scroll the window except when the
current line is no longer visible.  Perhaps we need a user option to
control these two features (scrolling and arrow) in a way that would
by default prevent scrolling when the arrow is used to show the
current line.

Also, the arrow feature is not customizable.  What about users who
will dislike it and would wish to turn it off?

Finally, I don't really understand why new features such as this one
get installed while we are in a feature freeze.  At the very least, it
should have been discussed (such a discussion could also lead to
better design decisions wrt scrolling).  However, I couldn't find
anything related in emacs-devel archives (sorry if I missed
something).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]