From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: pjb@informatimago.com (Pascal J. Bourguignon) Newsgroups: gmane.emacs.help Subject: Re: Compilation Message Presentation Date: Thu, 03 Dec 2009 18:49:43 +0100 Organization: Informatimago Message-ID: <87k4x4kkw8.fsf@galatea.local> References: <6d649a69-9a67-40d6-a6ff-c30f7cc66b5e@r5g2000yqb.googlegroups.com> <mailman.12063.1259799543.2239.help-gnu-emacs@gnu.org> <384c4704-b4ab-4dcc-abb2-d10b717dc155@r40g2000yqn.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1259865728 29343 80.91.229.12 (3 Dec 2009 18:42:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Dec 2009 18:42:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 03 19:42:01 2009 Return-path: <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org> Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NGGcn-0007no-RL for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Dec 2009 19:41:58 +0100 Original-Received: from localhost ([127.0.0.1]:46039 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGGcm-00066v-Uo for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Dec 2009 13:41:56 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-X-Trace: individual.net h0IUO13uxhhhdMaLXmT5wQ9dFTDr17SHCIvv0WuhJaaWkn38SM Cancel-Lock: sha1:OWE2ZDk2ZjNjZTlmMDUwMTc5NzM5MzJlNzIxZjdmZWU2MTgzZmEwYw== sha1:V/KeovOW0/J5zifSkAHx/TMxTA4= Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en X-Disabled: X-No-Archive: no User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (darwin) Original-Xref: news.stanford.edu gnu.emacs.help:175287 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org> List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/help-gnu-emacs>, <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe> List-Archive: <http://lists.gnu.org/pipermail/help-gnu-emacs> List-Post: <mailto:help-gnu-emacs@gnu.org> List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help> List-Subscribe: <http://lists.gnu.org/mailman/listinfo/help-gnu-emacs>, <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe> Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:70360 Archived-At: <http://permalink.gmane.org/gmane.emacs.help/70360> 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__