From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.help Subject: Diary font-lock problem Date: Thu, 05 Apr 2007 17:50:54 +0200 Message-ID: <873b3ees69.fsf@escher.local.home> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1175788314 7227 80.91.229.12 (5 Apr 2007 15:51:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 5 Apr 2007 15:51:54 +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 Apr 05 17:51:50 2007 Return-path: 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 1HZUFU-0007Ha-C1 for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Apr 2007 17:51:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HZUIr-0003Lu-Qv for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Apr 2007 11:55:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HZUIW-0003Gx-GZ for help-gnu-emacs@gnu.org; Thu, 05 Apr 2007 11:54:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HZUIV-0003Fr-Kq for help-gnu-emacs@gnu.org; Thu, 05 Apr 2007 11:54:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HZUIV-0003Fd-IJ for help-gnu-emacs@gnu.org; Thu, 05 Apr 2007 11:54:51 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HZUF7-0003H3-09 for help-gnu-emacs@gnu.org; Thu, 05 Apr 2007 11:51:21 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HZUEn-0002qq-Js for help-gnu-emacs@gnu.org; Thu, 05 Apr 2007 17:51:02 +0200 Original-Received: from i577bccfd.versanet.de ([87.123.204.253]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 05 Apr 2007 17:51:01 +0200 Original-Received: from Stephen.Berman by i577bccfd.versanet.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 05 Apr 2007 17:51:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 88 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: i577bccfd.versanet.de User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.96 (gnu/linux) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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:42446 Archived-At: --=-=-= I would like to have diary entries of the form Thu, Apr 5, 2007 Today's entry in which the string "Thu, Apr 5, 2007" has diary face. This fontification is not provided by the default diary setup, but I had hoped and expected to get it by customizing diary-date-forms appropriately. However, after making what I think is the necessary customization, I still don't get the fontification I want. I can reproduce the problem with emacs -Q: 1. Let ~/.emacs consist only of this sexp: --=-=-= Content-Disposition: attachment Content-Description: ~/.emacs (custom-set-variables '(diary-date-forms (quote ((month "/" day "[^/0-9]") (month "/" day "/" year "[^0-9]") (monthname " *" day "[^,0-9]") (monthname " *" day ", *" year "[^0-9]") (dayname "\\W") (dayname ", *" monthname " *" day ", *" year "[^0-9]"))))) --=-=-= 2. emacs -Q 3. M-x calendar 4. In the calendar type `s' to show the whole diary, then in the diary buffer type the above entry. Only "Thu," has diary face. If I eval diary-font-lock-keywords I get this: --=-=-= Content-Disposition: attachment Content-Transfer-Encoding: quoted-printable Content-Description: diary-font-lock-keywords (("^&?\\(\\([0-9]+\\|\\*\\)/\\([0-9]+\\|\\*\\)[^/0-9]\\)" 1 diary-face) ("^= &?\\(\\([0-9]+\\|\\*\\)/\\([0-9]+\\|\\*\\)/-?\\([0-9]+\\|\\*\\)[^0-9]\\)" 1= diary-face) ("^&?\\(\\(A\\(?:pr\\(?:\\.\\|il\\)?\\|ug\\(?:\\.\\|ust\\)?\\)= \\|Dec\\(?:\\.\\|ember\\)?\\|Feb\\(?:\\.\\|ruary\\)?\\|J\\(?:an\\(?:\\.\\|u= ary\\)?\\|u\\(?:l[.y]\\|n[.e]\\|[ln]\\)\\)\\|Ma\\(?:r\\(?:\\.\\|ch\\)\\|y\\= .\\|[ry]\\)\\|Nov\\(?:\\.\\|ember\\)?\\|Oct\\(?:\\.\\|ober\\)?\\|Sep\\(?:\\= .\\|tember\\)?\\|\\*\\) *\\([0-9]+\\|\\*\\)[^,0-9]\\)" 1 diary-face) ("^&?\= \(\\(A\\(?:pr\\(?:\\.\\|il\\)?\\|ug\\(?:\\.\\|ust\\)?\\)\\|Dec\\(?:\\.\\|em= ber\\)?\\|Feb\\(?:\\.\\|ruary\\)?\\|J\\(?:an\\(?:\\.\\|uary\\)?\\|u\\(?:l[.= y]\\|n[.e]\\|[ln]\\)\\)\\|Ma\\(?:r\\(?:\\.\\|ch\\)\\|y\\.\\|[ry]\\)\\|Nov\\= (?:\\.\\|ember\\)?\\|Oct\\(?:\\.\\|ober\\)?\\|Sep\\(?:\\.\\|tember\\)?\\|\\= *\\) *\\([0-9]+\\|\\*\\), *-?\\([0-9]+\\|\\*\\)[^0-9]\\)" 1 diary-face) ("^= &?\\(\\(Fri\\(?:\\.\\|day\\)?\\|Mon\\(?:\\.\\|day\\)?\\|S\\(?:at\\(?:\\.\\|= urday\\)?\\|un\\(?:\\.\\|day\\)?\\)\\|T\\(?:hu\\(?:\\.\\|rsday\\)?\\|ue\\(?= :\\.\\|sday\\)?\\)\\|Wed\\(?:\\.\\|nesday\\)?\\)\\W\\)" 1 diary-face) ("^&?= \\(\\(Fri\\(?:\\.\\|day\\)?\\|Mon\\(?:\\.\\|day\\)?\\|S\\(?:at\\(?:\\.\\|ur= day\\)?\\|un\\(?:\\.\\|day\\)?\\)\\|T\\(?:hu\\(?:\\.\\|rsday\\)?\\|ue\\(?:\= \.\\|sday\\)?\\)\\|Wed\\(?:\\.\\|nesday\\)?\\), *\\(A\\(?:pr\\(?:\\.\\|il\\= )?\\|ug\\(?:\\.\\|ust\\)?\\)\\|Dec\\(?:\\.\\|ember\\)?\\|Feb\\(?:\\.\\|ruar= y\\)?\\|J\\(?:an\\(?:\\.\\|uary\\)?\\|u\\(?:l[.y]\\|n[.e]\\|[ln]\\)\\)\\|Ma= \\(?:r\\(?:\\.\\|ch\\)\\|y\\.\\|[ry]\\)\\|Nov\\(?:\\.\\|ember\\)?\\|Oct\\(?= :\\.\\|ober\\)?\\|Sep\\(?:\\.\\|tember\\)?\\|\\*\\) *\\([0-9]+\\|\\*\\), *-= ?\\([0-9]+\\|\\*\\)[^0-9]\\)" 1 diary-face) ...) --=-=-= The sexp immediately preceding `...' contains the result of the customization I made above, and the regexp it contains is string-match'd by the above diary entry string: --=-=-= Content-Disposition: attachment Content-Description: string-match (string-match "^&?\\(\\(Fri\\(?:\\.\\|day\\)?\\|Mon\\(?:\\.\\|day\\)?\\|S\\(?:at\\(?:\\.\\|urday\\)?\\|un\\(?:\\.\\|day\\)?\\)\\|T\\(?:hu\\(?:\\.\\|rsday\\)?\\|ue\\(?:\\.\\|sday\\)?\\)\\|Wed\\(?:\\.\\|nesday\\)?\\), *\\(A\\(?:pr\\(?:\\.\\|il\\)?\\|ug\\(?:\\.\\|ust\\)?\\)\\|Dec\\(?:\\.\\|ember\\)?\\|Feb\\(?:\\.\\|ruary\\)?\\|J\\(?:an\\(?:\\.\\|uary\\)?\\|u\\(?:l[.y]\\|n[.e]\\|[ln]\\)\\)\\|Ma\\(?:r\\(?:\\.\\|ch\\)\\|y\\.\\|[ry]\\)\\|Nov\\(?:\\.\\|ember\\)?\\|Oct\\(?:\\.\\|ober\\)?\\|Sep\\(?:\\.\\|tember\\)?\\|\\*\\) *\\([0-9]+\\|\\*\\), *-?\\([0-9]+\\|\\*\\)[^0-9]\\)" "Thu, Apr 5, 2007 Today's entry") => 0 --=-=-= Therefore, I assume my customization is what I want and I would expect the entire date string to have diary face. Should I be doing something else to get the fontification I want (and if so, what) or is there a bug here? Steve Berman --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --=-=-=--