emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Eric S Fraga <e.fraga@ucl.ac.uk>
Cc: emacs-orgmode@gnu.org
Subject: Re: [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	[thread overview]
Message-ID: <D1609D28-BCA7-41FF-918A-3D8C25967512@gmail.com> (raw)
In-Reply-To: <87lix242ya.fsf_-_@ucl.ac.uk>


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

> Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> 
>> Carsten Dominik <carsten.dominik@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?
> 
> <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	other threads:[~2011-06-16 13:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87wrht82iw.fsf@gmx.co.uk>
2011-05-15 16:02 ` org-bbdb-anniversaries gives error 'bad sexp' Roland Winkler
2011-05-15 16:13   ` Roland Winkler
2011-05-15 16:58   ` Matt Lundin
2011-05-15 17:35     ` Roland Winkler
2011-05-16 14:03       ` Matt Lundin
2011-05-15 18:18     ` Leo
2011-05-16 14:08       ` Matt Lundin
2011-06-12 23:36         ` Philipp Haselwarter
2011-06-13  4:40           ` Nick Dokos
2011-06-13 12:27           ` Matt Lundin
2011-06-13 16:15             ` Philipp Haselwarter
2011-06-15 14:32               ` Carsten Dominik
2011-06-15 19:13                 ` [bug] Problem with insert anniversary agenda function (was Re: org-bbdb-anniversaries gives error 'bad sexp') Eric S Fraga
2011-06-16  8:04                   ` [patch] " Eric S Fraga
2011-06-16 12:41                     ` Carsten Dominik [this message]
2011-06-20  7:41                       ` Eric S Fraga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D1609D28-BCA7-41FF-918A-3D8C25967512@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).