From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.help Subject: Re: efficiently viewing Unix timestamps as dates Date: Tue, 19 Apr 2011 13:09:39 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87r58yf6zg.fsf@lifelogs.com> References: <87mxo9mvxm.fsf@lifelogs.com> <87bp4la59u.fsf@lifelogs.com> <87fwtx5n3c.fsf@lifelogs.com> <87sjtk73tb.fsf@lifelogs.com> <877hav4fj9.fsf@lifelogs.com> <87r58ygyse.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1306267763 12190 80.91.229.12 (24 May 2011 20:09:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 24 May 2011 20:09:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 24 22:09:18 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QOxum-0006Sz-UM for geh-help-gnu-emacs@m.gmane.org; Tue, 24 May 2011 22:09:17 +0200 Original-Received: from localhost ([::1]:52261 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOxum-0002if-EG for geh-help-gnu-emacs@m.gmane.org; Tue, 24 May 2011 16:09:16 -0400 Original-Path: usenet.stanford.edu!news-transit.tcx.org.uk!news.albasani.net!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 42 Original-X-Trace: news.albasani.net g4tZ0vX/TK6E5afKm4kHV1knumeeJ15qbdPkRSOud6WuCROJSEUc7TtnN65Nj7iZznKRChvVPBIkZbrr7JHmXgB7vIcq2/Ijdqxvs8wEDFXi38oLimreVDR9ZxihYfsg Original-NNTP-Posting-Date: Tue, 19 Apr 2011 18:09:39 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="jUQbIWvmOMfET67eyvtQdTliBnd/rQhFkVmveBs124yIkbWZcDPmufuyr9oTQSrz+Jtd7jHaeWNb0DxGUlvmNxz0c/u8v9zFZT2yQHRmoJgmuyU6YEEAdfQ5soO/oPsE"; mail-complaints-to="abuse@albasani.net" User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Cancel-Lock: sha1:6ZQV1fztCW1hhBq86I5D+tna2fs= sha1:lG0dUmEUbjgqRKJ7TLUK605x/C4= Original-Xref: usenet.stanford.edu gnu.emacs.help:186697 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81058 Archived-At: On Tue, 19 Apr 2011 12:23:45 -0300 Stefan Monnier wrote: >> I don't understand why it should remove the display property >> conditionally. I want my package (epoch-view.el) to supercede any other >> display properties for text that matches the epoch timestamp regular >> expression, or it won't work properly (some text will not have the >> display property I want it to have). You can argue that the other >> packages' display property may be important, but I think mine is >> important too. SM> The issue is to not remove the display property placed on *other* SM> chunks of text. The package only applies the display property to text it matches. Where is the display property removed through the font-lock mechanism by my package? Here are the keywords in question (`epoch-view-render' applies the display property). (defvar epoch-view-font-lock-keywords '(("\\<[0-9]\\{8,11\\}\\>" (0 (epoch-view-render)))) "Font-lock keywords of epoch timestamps.") (defun epoch-view-render () "Render a epoch match." (let ((text (match-string-no-properties 0))) `(face font-lock-warning-face display ,(epoch-view--render text)))) (defun epoch-view-turn-on () "Turn on epoch-view-mode." (let ((props (make-local-variable 'font-lock-extra-managed-props))) (add-to-list props 'display)) (font-lock-add-keywords nil epoch-view-font-lock-keywords)) Sorry if I seem dense but I really don't get what's causing this problem. It would be helpful if you could tell me what mode, combined with `epoch-view-mode', will exhibit the problem. Thanks Ted