Eric S Fraga <e.fr...@ucl.ac.uk> writes: > Carsten Dominik <carsten.domi...@gmail.com> writes: > >> On Jun 13, 2011, at 6:15 PM, Philipp Haselwarter wrote: >> >>> thanks, got it working now (with some fiddling). >>> >>> looks like `calendar-date-style' is not honored /at all/, if you don't >>> use YYYY-MM-DD format (as stated in the org-bbdb.el header, admittedly), >>> it just blows up in your face :) >> >> While I think the org-bbdb code could be made more forgiving, >> I strongly feel that calendar-date-style is an evil variable, >> especially if it is applied to input. One should never rely on it. >> >> my 5c. >> >> - Carsten > > Although I am likely to agree with you on this, any interactions with > Emacs's diary requires working with it. > > This reminds me of a problem with the insert anniversary function in the > default agenda view ("i a"). This function ignores the > calendar-date-style and inserts dates in the american style, which of > course means that diary entries are quietly ignored if you have > calendar-date-style set to anything other than 'american... > > Not a big deal... I don't use anniversaries *that* often!
I've made a simple change (attached) to org-agenda.el which at least considers the 'iso date style as well as european. Might not be fancy lisp code but I think it works?
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 991a94a..0d074a7 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7770,11 +7770,12 @@ the resulting entry will not be shown. When TEXT is empty, switch to (insert "\n") (require 'diary-lib) (let ((calendar-date-display-form - (if (if (boundp 'calendar-date-style) - (eq calendar-date-style 'european) - (with-no-warnings ;; european-calendar-style is obsolete as of version 23.1 - (org-bound-and-true-p european-calendar-style))) ; Emacs 22 - '(day " " month " " year) + (if (boundp 'calendar-date-style) + (if (eq calendar-date-style 'european) + '(day " " month " " year) + (if (eq calendar-date-style 'iso) + '(year " " month " " day) + '(month " " day " " year))) '(month " " day " " year)))) (insert (format "%%%%(diary-anniversary %s) %s"
I know I should be formatting this appropriately etc but I'm still not very comfortable with git... too much to do, so little time. sorry. -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.5 (release_7.5.399.g01eb.dirty)