[Top][All Lists]

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

Re: Propertizing the minor-mode-alist

From: James Clark
Subject: Re: Propertizing the minor-mode-alist
Date: Wed, 22 Sep 2004 14:30:42 +0700

On Wed, 2004-09-22 at 01:31, Richard Stallman wrote:
>     I misspoke earlier: there's a keystroke for goto to next error, but not
>     for goto first error.
> C-u C-x ` goes to the first error.  C-x ` goes to the first error
> when you have not visited any errors.
> If this can be made to do the job, I would definitely prefer it.

I like the idea of using a C-u prefix to make the next error command go
to the first error.  I can definitely use that.

I don't see a good way to make it work with C-x `.  nxml-mode presents
errors using a very different style of UI from compile.el.  It's more
like what you see in modern IDEs.  The closest analog in Emacs in
jit-lock.  The errors are detected automatically and continuously
without the user explicitly calling a compile function (although they
can turn it off if they want).  It works by installing an
after-change-function: things that can be done quickly are done there,
the rest is done with an idle-timer.  Modifications don't necessarily
cause a complete reparse; it works incrementally and after most
modifications is usually able to just reparse and revalidate a small
part of the buffer.  Detected errors are highlighted with an overlay
over the exact range of characters that is in error with the error
message as a tooltip.  The error messages are generally quite short and
and designed to make sense in the context of the highlighting of the
precise relevant range of characters rather than the whole line or just
a position in the line; they wouldn't be very meaningful out of that
context. The next error function moves around the current buffer between
the highlighted errors.

I don't see any way to make compile.el do this.  Also I didn't want to
rebind C-x ` to my next error function, because I think it will be
common to want to run external compiler-like programs on XML files (e.g.
an XSLT processor), and a user would want to be able to use C-x ` to
step through the errors from that. My error function is currently bound
to C-c C-n.  Without an arg, it always moves to the first error after


reply via email to

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