emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [patch] Problem with insert anniversary agenda function (was Re:


From: Carsten Dominik
Subject: Re: [O] [patch] Problem with insert anniversary agenda function (was Re: org-bbdb-anniversaries gives error 'bad sexp')
Date: Thu, 16 Jun 2011 14:41:51 +0200

On Jun 16, 2011, at 10:04 AM, Eric S Fraga wrote:

> Eric S Fraga <address@hidden> writes:
> 
>> Carsten Dominik <address@hidden> 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?
> 
> <org-agenda-consider-iso-dates.patch>
> 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.

Thanks for the patch!  Indeed, there was a bug here which always forced
one particular date style even though the code was supposed to do the
right thing.  Thanks!

However, instead of applying your patch, I thought that maybe I
should put my foot where my mouth is and remove these dependencies
altogether.

So I have just introduced a few functions org-anniversary, org-cyclic
and a few more which are just like their diary-* cousins, but with a
stable (ISO) order of arguments.  Ahhhhh, I like this *much* better.
`i a' in the agenda will now also use org-anniversary, not diary-anniversary.

For users of org-diary-class, there is a new function org-class which works
the same as org-diary-class, but with stable argument ordering.

- Carsten



reply via email to

[Prev in Thread] Current Thread [Next in Thread]