all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* calendar day face incorrect when Monday first day?
@ 2014-03-17  8:58 David Belohrad
  2014-03-17  9:09 ` Bastien
  0 siblings, 1 reply; 3+ messages in thread
From: David Belohrad @ 2014-03-17  8:58 UTC (permalink / raw)
  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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: calendar day face incorrect when Monday first day?
  2014-03-17  8:58 calendar day face incorrect when Monday first day? David Belohrad
@ 2014-03-17  9:09 ` Bastien
  2014-03-17 10:02   ` David Belohrad
  0 siblings, 1 reply; 3+ messages in thread
From: Bastien @ 2014-03-17  9:09 UTC (permalink / raw)
  To: David Belohrad; +Cc: org-mode

Hi David,

David Belohrad <david@belohrad.ch> writes:

> 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...

I don't know if it is intentional but I observe the same.

> any comments on this? eventually proposals to who to send this email to
> propose this functionality?

Your best chance is to send an Emacs bug report with

M-x report-emacs-bug RET

Best,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: calendar day face incorrect when Monday first day?
  2014-03-17  9:09 ` Bastien
@ 2014-03-17 10:02   ` David Belohrad
  0 siblings, 0 replies; 3+ messages in thread
From: David Belohrad @ 2014-03-17 10:02 UTC (permalink / raw)
  To: Bastien; +Cc: org-mode

Ok, I then send a copy of this email to emacs guys


Bastien <bzg@gnu.org> writes:

> Hi David,
>
> David Belohrad <david@belohrad.ch> writes:
>
>> 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...
>
> I don't know if it is intentional but I observe the same.
>
>> any comments on this? eventually proposals to who to send this email to
>> propose this functionality?
>
> Your best chance is to send an Emacs bug report with
>
> M-x report-emacs-bug RET
>
> Best,
>
> -- 
>  Bastien

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-17 10:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-17  8:58 calendar day face incorrect when Monday first day? David Belohrad
2014-03-17  9:09 ` Bastien
2014-03-17 10:02   ` David Belohrad

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.