unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#15302: calendar + diary + holidy => stacktrace.
@ 2013-09-07 20:50 Jambunathan K
  2013-11-15  5:03 ` Jambunathan K
  0 siblings, 1 reply; 2+ messages in thread
From: Jambunathan K @ 2013-09-07 20:50 UTC (permalink / raw)
  To: 15302

[-- Attachment #1: Type: text/plain, Size: 111 bytes --]


----------------------------------------------------------------
Case I: Stacktrace


1. .emacs for this bug


[-- Attachment #2: .emacs --]
[-- Type: text/plain, Size: 1759 bytes --]

(setq debug-on-error t)
(custom-set-variables
 '(calendar-date-style (quote european))
 '(calendar-holidays
   (quote
    ((holiday-fixed 1 1 "New Year's Day")
     (holiday-fixed 1 26  "Republic Day")
     (holiday-fixed 8 15 "Independence Day")
     (holiday-fixed 10 2 "Gandhi Jayanthi")
     (holiday-fixed 12 25 "Christmas")
     (indian-holidays))))
 '(calendar-mark-diary-entries-flag t)
 '(calendar-mark-holidays-flag t)
 '(calendar-setup nil)
 '(calendar-today-visible-hook (quote (calendar-mark-today)))
 '(calendar-view-diary-initially-flag t)
 '(calendar-view-holidays-initially-flag t)
 '(diary-display-function (quote diary-fancy-display))
 '(diary-file "/home/kjambunathan/data/jambu.diary")
 '(diary-file-name-prefix nil)
 '(diary-file-name-prefix-function (quote file-name-base))
 '(diary-list-include-blanks t)
 '(diary-number-of-entries 7))

(add-hook 'diary-list-entries-hook 'diary-include-other-diary-files)
(add-hook 'diary-mark-entries-hook 'diary-mark-included-diary-files)

(defun indian-holidays ()
  '(;; ((1 14 2013) "Pongal")
    ;; ((1 15 2013) "Thiruvallar Day")
    ;; ((1 16 2013) "Uzhavar Thirunal")
    ;; ((1 25 2013) "Milad-Un Nabi")
    ;; ((3 29 2013) "Good Friday")
    ;; ((4 1 2013) "Annual Closing of Accounts")
    ;; ((4 11 2013) "Telugu New Year's Day")
    ;; ((4 14 2013) "Tamil New Year's Day")
    ;; ((4 24 2013) "Mahavir Jayanthi")
    ((5 1 2013) "May Day")		; Comment this to avoid stacktrace
    ((8 9 2013) "Ramzan")
    ((8 28 2013) "Krishna Jayanthi")
    ((9 9 2013) "Vinayaka Chaturthi")
    ((9 30 2013) "Half-Yearly Closing of Accounts")
    ((10 13 2013) "Ayudha Puja")
    ((10 14 2013) "Vijaya Dasami")
    ((10 16 2013) "Bakrid")
    ((11 2 2013) "Deepavali")
    ((11 14 2013) "Muharram")))

[-- Attachment #3: Type: text/plain, Size: 163 bytes --]


2. Ensure that the `diary-file' exists but is empty.
3. ~/src/emacs/trunk/src/emacs --debug-init -Q -l ~/.emacs
4. M-x calendar
5. See the following stacktrace.


[-- Attachment #4: calendar.stacktrace --]
[-- Type: text/plain, Size: 508 bytes --]

Debugger entered--Lisp error: (wrong-type-argument wholenump -60)
  move-to-column(-60)
  calendar-cursor-to-visible-date((5 1 2013))
  calendar-mark-visible-date((5 1 2013) holiday)
  calendar-mark-holidays()
  calendar-generate-window(9 2013)
  calendar-basic-setup(nil)
  calendar(nil)
  call-interactively(calendar record nil)
  command-execute(calendar record)
  execute-extended-command(nil "calendar")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

[-- Attachment #5: Type: text/plain, Size: 510 bytes --]


Note that the holidays include the May Day which is "outside" the
currently displayed months of Aug, Sep, Oct.  (This bug is filed on 8
Sep 2013)

----------------------------------------------------------------
Case II: Wrong fontification


1. Modify the .emacs so that May Day holiday is commented out.
2. M-x calendar
3. Note that the holidays are displayed fine.
4. Note that the fontification is wrong.  i.e., the holiday face
   stretches beyond the calendar dates to the right edge of the window.

   

[-- Attachment #6: calendar-wrong-fontification.png --]
[-- Type: image/png, Size: 99175 bytes --]

[-- Attachment #7: Type: text/plain, Size: 1154 bytes --]


----------------------------------------------------------------

Case III: Feature request


It is painful to create Indian Holidays within Emacs calendar.

1. Indian dates follow European style.  But the diary's canonical format
   is American.  =>  Cognitive Dissonance.

2. Indian holidays, except for state holidays cannot be algorithmically
   specified.  (Like N-th Sunday of M-th Month of C-th Calendar are
   something like that).  So, they fall on different English months and
   dates.  I don't think Emacs supports traditional Indian calendars.
   (I believe there are many of these with regional variations.)

   So I would much prefer that there be an easy way to create holiday
   entries right from the 3-month calendar by hand.

   I am thinking of something like ...

   A cross between holiday-fixed (holiday-fixed currently doesn't take
   an Year) and `i a' (for inserting anniversaries).  

   I would also appreciate if there be a way to add a reminder to the
   holiday entries.  If we need to go home for Deepavali, then we need
   to make our railway bookings atleast 3 months (IIRC) in advance
   because of holiday rush.
   

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

* bug#15302: calendar + diary + holidy => stacktrace.
  2013-09-07 20:50 bug#15302: calendar + diary + holidy => stacktrace Jambunathan K
@ 2013-11-15  5:03 ` Jambunathan K
  0 siblings, 0 replies; 2+ messages in thread
From: Jambunathan K @ 2013-11-15  5:03 UTC (permalink / raw)
  To: 15302-done


OP here.  Closing it.





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

end of thread, other threads:[~2013-11-15  5:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-07 20:50 bug#15302: calendar + diary + holidy => stacktrace Jambunathan K
2013-11-15  5:03 ` Jambunathan K

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