From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Belohrad Subject: calendar day face incorrect when Monday first day? Date: Mon, 17 Mar 2014 09:58:40 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPTOF-0007dM-Vq for emacs-orgmode@gnu.org; Mon, 17 Mar 2014 04:59:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPTO4-0005C6-94 for emacs-orgmode@gnu.org; Mon, 17 Mar 2014 04:59:23 -0400 Received: from static-212-101-19-163.adsl.solnet.ch ([212.101.19.163]:59062 helo=server.belohrad.ch) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPTO4-0005Bb-0u for emacs-orgmode@gnu.org; Mon, 17 Mar 2014 04:59:12 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: org-mode Dear All, this might be out for this group, but maybe there will be some help, as calendar is used extensively in org mode. In Czech Rep, the week starts always by monday, so I do (setq calendar-week-start-day 1) This perfectly sets the monday in the calendar view (so M-x calendar) as first day of the week. Trouble is, that in the header it still uses face 'as if it was a weekend day'. So I've been browsing through the code to see how to repair it, and to my surprise I did not find any way how to do it. So I dug into the code more and I've found this piece of code in calendar.el (emacs 24git): (dotimes (i 7) (insert (truncate-string-to-width (propertize (calendar-day-name (mod (+ calendar-week-start-day i) 7) 'header t) 'font-lock-face (if (memq i '(0 6)) 'calendar-weekend-header 'calendar-weekday-header)) calendar-day-header-width nil ?\s) (make-string (- calendar-column-width calendar-day-header-width) ?\s))) hidden in calendar-generate-month. Now it seems, that font-lock-face is assigned to weekend header *only* for first and last day of week, which for Czech Rep. is not really correct, as correct should be (imho) saturday/sunday, which would mean, that the (memq... should be: (memq i '(5 6)) Is the hard-wired face for weekend days intentional? I would propose to declare those days in an external variable so user could actually choose what he considers as weekend... any comments on this? eventually proposals to who to send this email to propose this functionality? NB: I've checked with (memq i '(5 6)) and it works correctly. Cheers .d.