Subject: bug#9510: closed (Re: bug#9510: 23.3; Wishlist: custom calendar header for `calendar-generate-month')

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 19 Sep 2012 07:32:02 +0000

Your bug report

#9510: 23.3; Wishlist: custom calendar header for `calendar-generate-month'

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
9510: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9510
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#9510: 23.3; Wishlist: custom calendar header for `calendar-generate-month'
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Wed, 19 Sep 2012 03:30:09 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 24.3

Added `calendar-month-header' option to trunk for 24.3.
It respects calendar-date-style.

Thanks for the suggestion.

Subject: 23.3; Wishlist: custom calendar header for `calendar-generate-month'
From: [email-masked]
To: [email-masked]
Date: Thu, 15 Sep 2011 12:22:40 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

This is a feature request, not a bug report.

In `M-x calenar', the current `calendar-generate-month' function
generates the month header using:

In calendar.el:

   (insert
    (calendar-string-spread
     (list (format "%s %d" (calendar-month-name month) year))
                   ^^^^^^^
     ?\s calendar-month-digit-width))

Since the order of month and year is fixed, it is difficult to have the
localized custom month header.  For example, In several east Asian
countries use "Year-Month" order, not "Month Year" order.

It would be great if `calenar-generate-month' expose a custom method
(or a hook?) to create the month header from the user-specified
function or variable.  For example:

Add following code in calendar.el:

(defcustom calendar-month-header-format
  (list '(format "%s %d" (calendar-month-name month) year))
  "The header line of the calendar.
This is a list of items that evaluate to strings.  During
evaluation, the variable `month' and `year' are available as the
month and year of the calendar.")

And, replace the code '(insert ...)' in the `calendar-generate-month'
to the following:

   (insert
    (calendar-string-spread
     (mapcar 'eval calendar-month-header-format)
     ?\s calendar-month-digit-width))

Then, it's upto the user for the definition of
`calendar-month-header-format' to provide the custom header format of
the calendar.

Thank you.

In GNU Emacs 23.3.1 (i686-pc-linux-gnu, GTK+ Version 2.24.4)
 of 2011-08-20 on silvanus
Windowing system distributor `The X.Org Foundation', version 11.0.10905000
configured using `configure  '--prefix=/usr' '--build=i686-pc-linux-gnu' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--program-suffix=-emacs-23' '--infodir=/usr/share/info/emacs-23' '--with-crt-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.4.5/../../..' '--with-gameuser=games' '--without-hesiod' '--without-kerberos' '--without-kerberos5' '--without-gpm' '--with-dbus' '--with-sound' '--with-x' '--without-ns' '--without-gconf' '--with-toolkit-scroll-bars' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xpm' '--with-xft' '--without-libotf' '--without-m17n-flt' '--with-x-toolkit=gtk' 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu' 'CFLAGS=-O2 -march=pentium4 -pipe -fno-strict-aliasing' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: C
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: C
  value of $LANG: ko_KR.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  shell-dirtrack-mode: t
  yas/global-mode: t
  yas/minor-mode: t
  which-function-mode: t
  iswitchb-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<down-mouse-1> <mouse-1> M-x r e p o r t <tab> <re
turn>

Recent messages:
Loading /home/cinsk/.emacs.d/xskel.el (source)...done
Loading /usr/share/emacs/site-lisp/nxml-mode/rng-auto.el (source)...done
dired-garbage-files-regexp has unexpected value `"\\(?:\\.\\(?:aux\\|bak\\|dvi\\|log\\|orig\\|rej\\|toc\\)\\)\\'"'
Loading /usr/share/emacs/site-lisp/color-theme/themes/color-theme-example.el (source)...done
Loading /usr/share/emacs/site-lisp/color-theme/themes/color-theme-library.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
/usr/share/emacs/site-lisp/cedet/speedbar/sb-image hides /usr/share/emacs/23.3/lisp/sb-image
/usr/share/emacs/site-lisp/cedet/speedbar/dframe hides /usr/share/emacs/23.3/lisp/dframe
/usr/share/emacs/site-lisp/cedet/speedbar/speedbar hides /usr/share/emacs/23.3/lisp/speedbar
/usr/share/emacs/site-lisp/cedet/common/ezimage hides /usr/share/emacs/23.3/lisp/ezimage
/usr/share/emacs/site-lisp/css-mode/css-mode hides /usr/share/emacs/23.3/lisp/textmodes/css-mode
/usr/share/emacs/site-lisp/ruby-mode/ruby-mode hides /usr/share/emacs/23.3/lisp/progmodes/ruby-mode
/usr/share/emacs/site-lisp/org-mode/org-faces hides /usr/share/emacs/23.3/lisp/org/org-faces
/usr/share/emacs/site-lisp/org-mode/org-wl hides /usr/share/emacs/23.3/lisp/org/org-wl
/usr/share/emacs/site-lisp/org-mode/org-agenda hides /usr/share/emacs/23.3/lisp/org/org-agenda
/usr/share/emacs/site-lisp/org-mode/org-list hides /usr/share/emacs/23.3/lisp/org/org-list
/usr/share/emacs/site-lisp/org-mode/org-bibtex hides /usr/share/emacs/23.3/lisp/org/org-bibtex
/usr/share/emacs/site-lisp/org-mode/org-info hides /usr/share/emacs/23.3/lisp/org/org-info
/usr/share/emacs/site-lisp/org-mode/org-docbook hides /usr/share/emacs/23.3/lisp/org/org-docbook
/usr/share/emacs/site-lisp/org-mode/org-xoxo hides /usr/share/emacs/23.3/lisp/org/org-xoxo
/usr/share/emacs/site-lisp/org-mode/org-inlinetask hides /usr/share/emacs/23.3/lisp/org/org-inlinetask
/usr/share/emacs/site-lisp/org-mode/org-id hides /usr/share/emacs/23.3/lisp/org/org-id
/usr/share/emacs/site-lisp/org-mode/org-footnote hides /usr/share/emacs/23.3/lisp/org/org-footnote
/usr/share/emacs/site-lisp/org-mode/org-mew hides /usr/share/emacs/23.3/lisp/org/org-mew
/usr/share/emacs/site-lisp/org-mode/org-jsinfo hides /usr/share/emacs/23.3/lisp/org/org-jsinfo
/usr/share/emacs/site-lisp/org-mode/org-ascii hides /usr/share/emacs/23.3/lisp/org/org-ascii
/usr/share/emacs/site-lisp/org-mode/org-publish hides /usr/share/emacs/23.3/lisp/org/org-publish
/usr/share/emacs/site-lisp/org-mode/org-crypt hides /usr/share/emacs/23.3/lisp/org/org-crypt
/usr/share/emacs/site-lisp/org-mode/org-timer hides /usr/share/emacs/23.3/lisp/org/org-timer
/usr/share/emacs/site-lisp/org-mode/org-feed hides /usr/share/emacs/23.3/lisp/org/org-feed
/usr/share/emacs/site-lisp/org-mode/org-icalendar hides /usr/share/emacs/23.3/lisp/org/org-icalendar
/usr/share/emacs/site-lisp/org-mode/org-freemind hides /usr/share/emacs/23.3/lisp/org/org-freemind
/usr/share/emacs/site-lisp/org-mode/org-src hides /usr/share/emacs/23.3/lisp/org/org-src
/usr/share/emacs/site-lisp/org-mode/org-remember hides /usr/share/emacs/23.3/lisp/org/org-remember
/usr/share/emacs/site-lisp/org-mode/org-habit hides /usr/share/emacs/23.3/lisp/org/org-habit
/usr/share/emacs/site-lisp/org-mode/org-indent hides /usr/share/emacs/23.3/lisp/org/org-indent
/usr/share/emacs/site-lisp/org-mode/org-plot hides /usr/share/emacs/23.3/lisp/org/org-plot
/usr/share/emacs/site-lisp/org-mode/org-mac-message hides /usr/share/emacs/23.3/lisp/org/org-mac-message
/usr/share/emacs/site-lisp/org-mode/org-attach hides /usr/share/emacs/23.3/lisp/org/org-attach
/usr/share/emacs/site-lisp/org-mode/org-table hides /usr/share/emacs/23.3/lisp/org/org-table
/usr/share/emacs/site-lisp/org-mode/org-vm hides /usr/share/emacs/23.3/lisp/org/org-vm
/usr/share/emacs/site-lisp/org-mode/org-datetree hides /usr/share/emacs/23.3/lisp/org/org-datetree
/usr/share/emacs/site-lisp/org-mode/org-colview hides /usr/share/emacs/23.3/lisp/org/org-colview
/usr/share/emacs/site-lisp/org-mode/org-install hides /usr/share/emacs/23.3/lisp/org/org-install
/usr/share/emacs/site-lisp/org-mode/org-rmail hides /usr/share/emacs/23.3/lisp/org/org-rmail
/usr/share/emacs/site-lisp/org-mode/org-protocol hides /usr/share/emacs/23.3/lisp/org/org-protocol
/usr/share/emacs/site-lisp/org-mode/org-exp-blocks hides /usr/share/emacs/23.3/lisp/org/org-exp-blocks
/usr/share/emacs/site-lisp/org-mode/org-exp hides /usr/share/emacs/23.3/lisp/org/org-exp
/usr/share/emacs/site-lisp/org-mode/org-mhe hides /usr/share/emacs/23.3/lisp/org/org-mhe
/usr/share/emacs/site-lisp/org-mode/org-compat hides /usr/share/emacs/23.3/lisp/org/org-compat
/usr/share/emacs/site-lisp/org-mode/org-clock hides /usr/share/emacs/23.3/lisp/org/org-clock
/usr/share/emacs/site-lisp/org-mode/org hides /usr/share/emacs/23.3/lisp/org/org
/usr/share/emacs/site-lisp/org-mode/org-bbdb hides /usr/share/emacs/23.3/lisp/org/org-bbdb
/usr/share/emacs/site-lisp/org-mode/org-w3m hides /usr/share/emacs/23.3/lisp/org/org-w3m
/usr/share/emacs/site-lisp/org-mode/org-latex hides /usr/share/emacs/23.3/lisp/org/org-latex
/usr/share/emacs/site-lisp/org-mode/org-macs hides /usr/share/emacs/23.3/lisp/org/org-macs
/usr/share/emacs/site-lisp/org-mode/org-mouse hides /usr/share/emacs/23.3/lisp/org/org-mouse
/usr/share/emacs/site-lisp/org-mode/org-archive hides /usr/share/emacs/23.3/lisp/org/org-archive
/usr/share/emacs/site-lisp/org-mode/org-gnus hides /usr/share/emacs/23.3/lisp/org/org-gnus
/usr/share/emacs/site-lisp/org-mode/org-irc hides /usr/share/emacs/23.3/lisp/org/org-irc
/usr/share/emacs/site-lisp/org-mode/org-mobile hides /usr/share/emacs/23.3/lisp/org/org-mobile
/usr/share/emacs/site-lisp/org-mode/org-html hides /usr/share/emacs/23.3/lisp/org/org-html
/usr/share/emacs/site-lisp/nxml-mode/nxml-maint hides /usr/share/emacs/23.3/lisp/nxml/nxml-maint
/usr/share/emacs/site-lisp/nxml-mode/rng-cmpct hides /usr/share/emacs/23.3/lisp/nxml/rng-cmpct
/usr/share/emacs/site-lisp/nxml-mode/nxml-rap hides /usr/share/emacs/23.3/lisp/nxml/nxml-rap
/usr/share/emacs/site-lisp/nxml-mode/nxml-parse hides /usr/share/emacs/23.3/lisp/nxml/nxml-parse
/usr/share/emacs/site-lisp/nxml-mode/nxml-outln hides /usr/share/emacs/23.3/lisp/nxml/nxml-outln
/usr/share/emacs/site-lisp/nxml-mode/rng-valid hides /usr/share/emacs/23.3/lisp/nxml/rng-valid
/usr/share/emacs/site-lisp/nxml-mode/rng-loc hides /usr/share/emacs/23.3/lisp/nxml/rng-loc
/usr/share/emacs/site-lisp/nxml-mode/nxml-ns hides /usr/share/emacs/23.3/lisp/nxml/nxml-ns
/usr/share/emacs/site-lisp/nxml-mode/rng-parse hides /usr/share/emacs/23.3/lisp/nxml/rng-parse
/usr/share/emacs/site-lisp/nxml-mode/rng-pttrn hides /usr/share/emacs/23.3/lisp/nxml/rng-pttrn
/usr/share/emacs/site-lisp/nxml-mode/rng-xsd hides /usr/share/emacs/23.3/lisp/nxml/rng-xsd
/usr/share/emacs/site-lisp/nxml-mode/rng-match hides /usr/share/emacs/23.3/lisp/nxml/rng-match
/usr/share/emacs/site-lisp/nxml-mode/rng-uri hides /usr/share/emacs/23.3/lisp/nxml/rng-uri
/usr/share/emacs/site-lisp/nxml-mode/nxml-enc hides /usr/share/emacs/23.3/lisp/nxml/nxml-enc
/usr/share/emacs/site-lisp/nxml-mode/nxml-glyph hides /usr/share/emacs/23.3/lisp/nxml/nxml-glyph
/usr/share/emacs/site-lisp/nxml-mode/rng-nxml hides /usr/share/emacs/23.3/lisp/nxml/rng-nxml
/usr/share/emacs/site-lisp/nxml-mode/nxml-util hides /usr/share/emacs/23.3/lisp/nxml/nxml-util
/usr/share/emacs/site-lisp/nxml-mode/nxml-uchnm hides /usr/share/emacs/23.3/lisp/nxml/nxml-uchnm
/usr/share/emacs/site-lisp/nxml-mode/xsd-regexp hides /usr/share/emacs/23.3/lisp/nxml/xsd-regexp
/usr/share/emacs/site-lisp/nxml-mode/nxml-mode hides /usr/share/emacs/23.3/lisp/nxml/nxml-mode
/usr/share/emacs/site-lisp/nxml-mode/rng-dt hides /usr/share/emacs/23.3/lisp/nxml/rng-dt
/usr/share/emacs/site-lisp/nxml-mode/rng-util hides /usr/share/emacs/23.3/lisp/nxml/rng-util
/usr/share/emacs/site-lisp/nxml-mode/rng-maint hides /usr/share/emacs/23.3/lisp/nxml/rng-maint
/usr/share/emacs/site-lisp/nxml-mode/xmltok hides /usr/share/emacs/23.3/lisp/nxml/xmltok
/usr/share/emacs/site-lisp/cjk-latex/thai-word hides /usr/share/emacs/23.3/lisp/language/thai-word
/usr/share/emacs/site-lisp/cedet/eieio/eieio-opt hides /usr/share/emacs/23.3/lisp/emacs-lisp/eieio-opt
/usr/share/emacs/site-lisp/cedet/eieio/eieio-base hides /usr/share/emacs/23.3/lisp/emacs-lisp/eieio-base
/usr/share/emacs/site-lisp/cedet/eieio/eieio hides /usr/share/emacs/23.3/lisp/emacs-lisp/eieio
/usr/share/emacs/site-lisp/cedet/eieio/chart hides /usr/share/emacs/23.3/lisp/emacs-lisp/chart
/usr/share/emacs/site-lisp/cedet/eieio/eieio-datadebug hides /usr/share/emacs/23.3/lisp/emacs-lisp/eieio-datadebug
/usr/share/emacs/site-lisp/cedet/eieio/eieio-comp hides /usr/share/emacs/23.3/lisp/emacs-lisp/eieio-comp
/usr/share/emacs/site-lisp/cedet/eieio/eieio-custom hides /usr/share/emacs/23.3/lisp/emacs-lisp/eieio-custom
/usr/share/emacs/site-lisp/cedet/eieio/eieio-speedbar hides /usr/share/emacs/23.3/lisp/emacs-lisp/eieio-speedbar
/usr/share/emacs/site-lisp/cedet/common/pulse hides /usr/share/emacs/23.3/lisp/cedet/pulse
/usr/share/emacs/site-lisp/cedet/common/data-debug hides /usr/share/emacs/23.3/lisp/cedet/data-debug
/usr/share/emacs/site-lisp/cedet/ede/ede hides /usr/share/emacs/23.3/lisp/cedet/ede
/usr/share/emacs/site-lisp/cedet/common/cedet-files hides /usr/share/emacs/23.3/lisp/cedet/cedet-files
/usr/share/emacs/site-lisp/cedet/semantic/semantic hides /usr/share/emacs/23.3/lisp/cedet/semantic
/usr/share/emacs/site-lisp/cedet/common/cedet-idutils hides /usr/share/emacs/23.3/lisp/cedet/cedet-idutils
/usr/share/emacs/site-lisp/cedet/common/cedet hides /usr/share/emacs/23.3/lisp/cedet/cedet
/usr/share/emacs/site-lisp/cedet/common/cedet-global hides /usr/share/emacs/23.3/lisp/cedet/cedet-global
/usr/share/emacs/site-lisp/cedet/srecode/srecode hides /usr/share/emacs/23.3/lisp/cedet/srecode
/usr/share/emacs/site-lisp/cedet/common/mode-local hides /usr/share/emacs/23.3/lisp/cedet/mode-local
/usr/share/emacs/site-lisp/cedet/common/inversion hides /usr/share/emacs/23.3/lisp/cedet/inversion
/usr/share/emacs/site-lisp/cedet/common/cedet-cscope hides /usr/share/emacs/23.3/lisp/cedet/cedet-cscope

Features:
(shadow sort mail-extr message ecomplete rfc822 mml mml-sec
password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231
rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc
time-date mm-util mail-prsvr gmm-utils mailheader canlock sha1 hex-util
hashcash mail-utils emacsbug ess-toolbar ess-mouse mouseme thingatpt
browse-url ess-menu ess-swv ess-noweb noweb-font-lock-mode ess-bugs-l
essd-els ess-sas-d ess-sas-l ess-sas-a executable shell ess-arc-d
ess-vst-d ess-xls-d ess-lsp-l ess-sta-d ess-sta-l make-regexp ess-sp6-d
ess-sp5-d ess-sp3-d ess-r-d ess-r-args ess-s-l ess-inf ess-utils
ess-mode noweb-mode ess ess-custom ess-compat ess-site scala-mode-auto
advice help-fns advice-preload yasnippet assoc w3m-load inf-ruby
ruby-mode python-mode info-look info ansi-color compile comint
org-install cal-menu calendar cal-loaddefs cinsk-wood color-theme
wid-edit starttls smtpmail sendmail xcscope dired-x dired-aux dired
nxml-enc slime-autoloads windmove winner vc-jump vc vc-dispatcher git
log-edit easy-mmode ring pcvs-util add-log ewoc ffap which-func imenu
iswitchb cc-mode cc-fonts easymenu cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs regexp-opt xskel xlicense autoinsert skeleton
edmacro kmacro cl cl-19 korea-util tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset
image fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev loaddefs button minibuffer faces cus-face files
text-properties overlay md5 base64 format env code-pages mule custom
widget hashtable-print-readable backquote make-network-process dbusbind
font-render-setting gtk x-toolkit x multi-tty emacs)

-- 
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
Korean Ver: http://www.cinsk.org/cfaqs/