* bug#10452: 24.0.92; calendar-abbrev-length in calendar.el
@ 2012-01-08 10:59 Peter Dyballa
2012-01-08 12:30 ` Andreas Schwab
0 siblings, 1 reply; 4+ messages in thread
From: Peter Dyballa @ 2012-01-08 10:59 UTC (permalink / raw)
To: 10452
Hello!
The introduction of this variable is no good idea. In German we are using two values: the number 2 for day names and the number 3 for month names.
--
Greetings
Pete
To most people solutions mean finding the answers. But to chemists solutions
are things that are still all mixed up.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#10452: 24.0.92; calendar-abbrev-length in calendar.el
2012-01-08 10:59 bug#10452: 24.0.92; calendar-abbrev-length in calendar.el Peter Dyballa
@ 2012-01-08 12:30 ` Andreas Schwab
2012-01-08 19:19 ` Glenn Morris
2012-01-12 5:55 ` Kevin Rodgers
0 siblings, 2 replies; 4+ messages in thread
From: Andreas Schwab @ 2012-01-08 12:30 UTC (permalink / raw)
To: Peter Dyballa; +Cc: 10452
Peter Dyballa <Peter_Dyballa@Freenet.DE> writes:
> The introduction of this variable is no good idea. In German we are using two values: the number 2 for day names and the number 3 for month names.
You can set calendar-day-abbrev-array to anything you like.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#10452: 24.0.92; calendar-abbrev-length in calendar.el
2012-01-08 12:30 ` Andreas Schwab
@ 2012-01-08 19:19 ` Glenn Morris
2012-01-12 5:55 ` Kevin Rodgers
1 sibling, 0 replies; 4+ messages in thread
From: Glenn Morris @ 2012-01-08 19:19 UTC (permalink / raw)
To: 10452-done
tags 10452 notabug wontfix
severity 10452 wishlist
stop
Andreas Schwab wrote:
> Peter Dyballa <Peter_Dyballa@Freenet.DE> writes:
>
>> The introduction of this variable is no good idea.
It exists since Emacs 22.
> You can set calendar-day-abbrev-array to anything you like.
Indeed. calendar-abbrev-length only provides a default set of
abbreviations. I'm not going to introduce separate length variables for
days and months.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#10452: 24.0.92; calendar-abbrev-length in calendar.el
2012-01-08 12:30 ` Andreas Schwab
2012-01-08 19:19 ` Glenn Morris
@ 2012-01-12 5:55 ` Kevin Rodgers
1 sibling, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2012-01-12 5:55 UTC (permalink / raw)
To: 10452
On 1/8/12 5:30 AM, Andreas Schwab wrote:
> Peter Dyballa<Peter_Dyballa@Freenet.DE> writes:
>
>> The introduction of this variable is no good idea. In German we are using two values: the number 2 for day names and the number 3 for month names.
>
> You can set calendar-day-abbrev-array to anything you like.
Here's some code I posted in 2006 to automatically set localized day and month
names. To set localized abbrevs, just use the lowercase "%a" and "%b" formats
instead.
(let ((days (locale-info 'days))
(months (locale-info 'months)))
(if days
(setq calendar-day-name-array days)
(let ((this-year
(string-to-number (format-time-string "%Y")))
(this-month
(string-to-number (format-time-string "%m"))))
(setq calendar-day-name-array
(apply 'vector
(mapcar (lambda (time)
(format-time-string "%A" time))
(sort (mapcar (lambda (day)
(encode-time 0 0 0 day
this-month this-year
0))
'(1 2 3 4 5 6 7))
;; by day of week:
(lambda (time-1 time-2)
(< (nth 6 (decode-time time-1))
(nth 6 (decode-time time-2))))))))))
(if months
(setq calendar-month-name-array months)
(let ((this-year
(string-to-number (format-time-string "%Y"))))
(setq calendar-month-name-array
(apply 'vector
(mapcar (lambda (month)
(let ((first (encode-time 0 0 0 1 month
this-year
0)))
(format-time-string "%B" first t)))
'(1 2 3 4 5 6 7 8 9 10 11 12)))))))
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-01-12 5:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-08 10:59 bug#10452: 24.0.92; calendar-abbrev-length in calendar.el Peter Dyballa
2012-01-08 12:30 ` Andreas Schwab
2012-01-08 19:19 ` Glenn Morris
2012-01-12 5:55 ` Kevin Rodgers
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).