help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Compilation Message Presentation


From: Pascal J. Bourguignon
Subject: Re: Compilation Message Presentation
Date: Thu, 03 Dec 2009 18:49:43 +0100
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (darwin)

Nordlöw <address@hidden> 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__


reply via email to

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