unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 49995@debbugs.gnu.org, Pankaj Jangid <pankaj@codeisgreat.org>
Subject: bug#49995: 28.0.50; EBDB Anniversaries do not appear marked in calendar
Date: Sun, 15 Aug 2021 07:28:37 -0700	[thread overview]
Message-ID: <87y292wzmy.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <871r6uhmn9.fsf@web.de> (Michael Heerdegen's message of "Sun, 15 Aug 2021 15:18:18 +0200")


On 08/15/21 15:18 PM, Michael Heerdegen wrote:
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Okay, here's a version of how it might work. I've learned a little bit
>> more about the diary (and as a result will likely use it more! I'd
>> always thought it was just a poor cousin to Org, but I see it has its
>> own strengths), and have a solution that is a bit funky, but might be
>> okay.
>
> Looks quite good.

Thanks for checking!

> I would try to get rid of `diary-anniversary'.  All it does is checking
> the date and calling `format' - things that you already do.  You now
> effectively get `eval' inside `eval' when calling `diary', you have an
> extra layer.  I hope removing that will also get rid of the need to look
> at `original-date'.
>
> [BTW: The only nontrivial thing `diary-anniversary' does is handling of
> birthdays on 2/28, you may want to have a look if you need to handle
> that case specially.]

It seems to me that it isn't `diary-anniversary' that needs to be gotten
rid of, so much as `diary-sexp-entry' -- that's the function that's
basically just eval'ling a string. If I get rid of `diary-anniversary',
I'll basically just end up re-writing it.

At init time, instead of building up strings, I could just build up
closures holding the appropriate dynamic value for DATE and ENTRY, and
calling `diary-anniversary': essentially replace `diary-sexp-entry'.
That's at least one less layer.

I can get rid of the check for `original-date', but I'd still like to
know if we're in a calendar-marking situation vs a listing-the-diary
situation: how else would I do that?

Thanks again,
Eric





  reply	other threads:[~2021-08-15 14:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11  7:13 bug#49995: 28.0.50; EBDB Anniversaries do not appear marked in calendar Pankaj Jangid
2021-08-13 19:35 ` Eric Abrahamsen
2021-08-14 15:20   ` Michael Heerdegen
2021-08-14 18:08     ` Eric Abrahamsen
2021-08-15  4:01       ` Eric Abrahamsen
2021-08-15 13:18         ` Michael Heerdegen
2021-08-15 14:28           ` Eric Abrahamsen [this message]
2021-08-15 15:57             ` Eric Abrahamsen
2021-08-15 20:16               ` Eric Abrahamsen
2021-08-17 17:16                 ` Michael Heerdegen
2021-08-17 19:45                   ` Eric Abrahamsen
2021-08-18 15:57                     ` Michael Heerdegen
2021-08-18 17:13                       ` Eric Abrahamsen

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87y292wzmy.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=49995@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    --cc=pankaj@codeisgreat.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.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).