From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: bug#10452: 24.0.92; calendar-abbrev-length in calendar.el Date: Wed, 11 Jan 2012 22:55:22 -0700 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1326347745 24655 80.91.229.12 (12 Jan 2012 05:55:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 12 Jan 2012 05:55:45 +0000 (UTC) To: 10452@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 12 06:55:39 2012 Return-path: Envelope-to: geb-bug-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 1RlDdS-0001L7-DK for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Jan 2012 06:55:38 +0100 Original-Received: from localhost ([::1]:55652 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlDdR-0001EG-Mn for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Jan 2012 00:55:37 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:33659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlDdP-0001E3-34 for bug-gnu-emacs@gnu.org; Thu, 12 Jan 2012 00:55:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RlDdN-0003DW-8W for bug-gnu-emacs@gnu.org; Thu, 12 Jan 2012 00:55:35 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59747) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlDdN-0003DS-5f for bug-gnu-emacs@gnu.org; Thu, 12 Jan 2012 00:55:33 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RlDdq-0007T1-Bd for bug-gnu-emacs@gnu.org; Thu, 12 Jan 2012 00:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Kevin Rodgers Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Jan 2012 05:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10452 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug wontfix X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.132634775528690 (code B ref -1); Thu, 12 Jan 2012 05:56:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Jan 2012 05:55:55 +0000 Original-Received: from localhost ([127.0.0.1]:54420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RlDdj-0007Sg-IT for submit@debbugs.gnu.org; Thu, 12 Jan 2012 00:55:55 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:55702) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RlDdg-0007SY-AZ for submit@debbugs.gnu.org; Thu, 12 Jan 2012 00:55:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RlDdC-0003DD-1X for submit@debbugs.gnu.org; Thu, 12 Jan 2012 00:55:23 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:37495) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlDdC-0003D9-09 for submit@debbugs.gnu.org; Thu, 12 Jan 2012 00:55:22 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:33631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlDdA-0001DT-Ti for bug-gnu-emacs@gnu.org; Thu, 12 Jan 2012 00:55:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RlDd9-0003Cy-Oe for bug-gnu-emacs@gnu.org; Thu, 12 Jan 2012 00:55:20 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:60505) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlDd9-0003Ch-FL for bug-gnu-emacs@gnu.org; Thu, 12 Jan 2012 00:55:19 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RlDd7-0001HX-0X for bug-gnu-emacs@gnu.org; Thu, 12 Jan 2012 06:55:17 +0100 Original-Received: from c-71-237-25-24.hsd1.co.comcast.net ([71.237.25.24]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Jan 2012 06:55:16 +0100 Original-Received: from kevin.d.rodgers by c-71-237-25-24.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Jan 2012 06:55:16 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 49 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-71-237-25-24.hsd1.co.comcast.net User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.25) Gecko/20111213 Thunderbird/3.1.17 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:55649 Archived-At: On 1/8/12 5:30 AM, Andreas Schwab wrote: > Peter Dyballa 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