From: pjb@informatimago.com (Pascal J. Bourguignon)
To: help-gnu-emacs@gnu.org
Subject: Re: Compilation Message Presentation
Date: Thu, 03 Dec 2009 18:49:43 +0100 [thread overview]
Message-ID: <87k4x4kkw8.fsf@galatea.local> (raw)
In-Reply-To: 384c4704-b4ab-4dcc-abb2-d10b717dc155@r40g2000yqn.googlegroups.com
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__
next prev parent reply other threads:[~2009-12-03 17:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2009-12-04 3:16 ` Stefan Monnier
2009-12-04 3:42 ` Lennart Borgman
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k4x4kkw8.fsf@galatea.local \
--to=pjb@informatimago.com \
--cc=help-gnu-emacs@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).