all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Compilation Message Presentation
@ 2009-12-02 22:36 Nordlöw
  2009-12-03  0:14 ` Drew Adams
       [not found] ` <mailman.12063.1259799543.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Nordlöw @ 2009-12-02 22:36 UTC (permalink / raw)
  To: help-gnu-emacs

Does anybody know of an extensions to grep()/complie() in compile.el
that highlights messages/warning/errors/notes in the *source-buffer*
using either *overlays* or *fringes*?

/Nordlöw


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

* RE: Compilation Message Presentation
  2009-12-02 22:36 Compilation Message Presentation Nordlöw
@ 2009-12-03  0:14 ` Drew Adams
       [not found] ` <mailman.12063.1259799543.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Drew Adams @ 2009-12-03  0:14 UTC (permalink / raw)
  To: 'Nordlöw', help-gnu-emacs

> Does anybody know of an extensions to grep()/complie() in compile.el
> that highlights messages/warning/errors/notes in the *source-buffer*
> using either *overlays* or *fringes*?

Isn't that what it does already (overlay, not fringe)?
It does for me, at least.

I use compile+.el and grep+.el, but I don't think that makes much difference
here.

Here is the code in `compilation-goto-locus':
(overlay-put compilation-highlight-overlay 'face 'next-error)
See also variable `compilation-highlight-regexp'.

Oh, I also use simple+.el - maybe that has something to do with it. I added
`until-move' as a possible value for option `next-error-highlight'. Otherwise,
the highlighting goes away too quickly for my taste.

(Since I use separate frames, if the value is `t' it goes away even when I just
switch to the source-buffer frame, because a frame switch is considered the next
command.)





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

* Re: Compilation Message Presentation
       [not found] ` <mailman.12063.1259799543.2239.help-gnu-emacs@gnu.org>
@ 2009-12-03 16:25   ` Nordlöw
  2009-12-03 17:49     ` Pascal J. Bourguignon
  2009-12-04  3:16     ` Stefan Monnier
  0 siblings, 2 replies; 6+ messages in thread
From: Nordlöw @ 2009-12-03 16:25 UTC (permalink / raw)
  To: help-gnu-emacs

I mean in a more elaborate way, by highlighting all messages at the
same tim but in different colors (green, yellow, orange, red, etc.)
either with underlining overlays or using the fringe. Most other IDEs
does this and I find its presentation a bit more grasping than Emacs
default 1-second flashing.

Couldn't we also highlight the code in the grep buffer using indirect
buffers or buffer-substring() as soon as the grep-hit-file is opened
and font-locked?

Another question: Why isn't font-locking cached if I reopen a file
that hasn't been modified since last time I opened with font-locking?
If I would like to implement such a feature could we extract the font-
locking-attributes from a file and save it separately?

/Nordlöw


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

* Re: Compilation Message Presentation
  2009-12-03 16:25   ` Nordlöw
@ 2009-12-03 17:49     ` Pascal J. Bourguignon
  2009-12-04  3:16     ` Stefan Monnier
  1 sibling, 0 replies; 6+ messages in thread
From: Pascal J. Bourguignon @ 2009-12-03 17:49 UTC (permalink / raw)
  To: help-gnu-emacs

Nordlöw <per.nordlow@gmail.com> writes:

> I mean in a more elaborate way, by highlighting all messages at the
> same tim but in different colors (green, yellow, orange, red, etc.)
> either with underlining overlays or using the fringe. Most other IDEs
> does this and I find its presentation a bit more grasping than Emacs
> default 1-second flashing.
>
> Couldn't we also highlight the code in the grep buffer using indirect
> buffers or buffer-substring() as soon as the grep-hit-file is opened
> and font-locked?
>
> Another question: Why isn't font-locking cached if I reopen a file
> that hasn't been modified since last time I opened with font-locking?
> If I would like to implement such a feature could we extract the font-
> locking-attributes from a file and save it separately?

It is what is called the properties of the buffer.
You can indeed scan them and save them to reapply them later.
See text-properties-at and set-text-properties
buffer-substring returns a string with properties.
buffer-substring-no-properties returns a string without properties.

(list (text-properties-at  1)
      (text-properties-at 20)
      (buffer-substring 1 28))

--> ((face message-header-name fontified t)
     (face message-header-newsgroups fontified t)
     #("Newsgroups: gnu.emacs.help
" 
        0 10 (face message-header-name fontified t)
       10 11 (face message-header-name fontified t)
       11 12 (fontified t) 
       12 26 (face message-header-newsgroups fontified t)
       26 27 (fontified t)))


-- 
__Pascal Bourguignon__


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

* Re: Compilation Message Presentation
  2009-12-03 16:25   ` Nordlöw
  2009-12-03 17:49     ` Pascal J. Bourguignon
@ 2009-12-04  3:16     ` Stefan Monnier
  2009-12-04  3:42       ` Lennart Borgman
  1 sibling, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2009-12-04  3:16 UTC (permalink / raw)
  To: help-gnu-emacs

> I mean in a more elaborate way, by highlighting all messages at the
> same tim but in different colors (green, yellow, orange, red, etc.)
> either with underlining overlays or using the fringe.  Most other IDEs
> does this and I find its presentation a bit more grasping than Emacs
> default 1-second flashing.

Maybe you want to look at flymake.

> Another question: Why isn't font-locking cached if I reopen a file
> that hasn't been modified since last time I opened with font-locking?
> If I would like to implement such a feature could we extract the font-
> locking-attributes from a file and save it separately?

It's called fast-lock, and of course it's slow.
If on-the-fly font-locking is slow, it's usually a bug.


        Stefan


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

* Re: Compilation Message Presentation
  2009-12-04  3:16     ` Stefan Monnier
@ 2009-12-04  3:42       ` Lennart Borgman
  0 siblings, 0 replies; 6+ messages in thread
From: Lennart Borgman @ 2009-12-04  3:42 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: help-gnu-emacs

On Fri, Dec 4, 2009 at 4:16 AM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> I mean in a more elaborate way, by highlighting all messages at the
>> same tim but in different colors (green, yellow, orange, red, etc.)
>> either with underlining overlays or using the fringe.  Most other IDEs
>> does this and I find its presentation a bit more grasping than Emacs
>> default 1-second flashing.
>
> Maybe you want to look at flymake.
>
>> Another question: Why isn't font-locking cached if I reopen a file
>> that hasn't been modified since last time I opened with font-locking?
>> If I would like to implement such a feature could we extract the font-
>> locking-attributes from a file and save it separately?
>
> It's called fast-lock, and of course it's slow.
> If on-the-fly font-locking is slow, it's usually a bug.


Any interest in installing my additions to flymake before the freeze?




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

end of thread, other threads:[~2009-12-04  3:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-02 22:36 Compilation Message Presentation Nordlöw
2009-12-03  0:14 ` Drew Adams
     [not found] ` <mailman.12063.1259799543.2239.help-gnu-emacs@gnu.org>
2009-12-03 16:25   ` Nordlöw
2009-12-03 17:49     ` Pascal J. Bourguignon
2009-12-04  3:16     ` Stefan Monnier
2009-12-04  3:42       ` Lennart Borgman

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.