From: Michael Heerdegen <michael_heerdegen@web.de>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
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: Tue, 17 Aug 2021 19:16:00 +0200 [thread overview]
Message-ID: <87r1es56wf.fsf@web.de> (raw)
In-Reply-To: <87k0kmwjie.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sun, 15 Aug 2021 13:16:57 -0700")
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> And, because I apparently have nothing else to do on a weekend, here's a
> version that just calls a function directly, nothing fancy. Some overlap
> with `diary-anniversary', but nothing terrible. This is probably the
> best approach.
Yes, looks like more or less what I had suggested. Hope it turns out it
was the right advice.
> -;; `ebdb-field-anniv-diary-entry' is defined below.
> +(defun ebdb-diary-anniversaries (&optional mark)
> + (with-no-warnings
> + (defvar date)
> + (defvar original-date))
> + (when-let ((entries (gethash (seq-subseq date 0 2) ebdb-diary-entries)))
> + (cons mark
> + (mapconcat (pcase-lambda (`(,field ,record))
> + (if (bound-and-true-p original-date)
> + ;; If we have `original-date', we're
> + ;; displaying the diary list, so we need
> + ;; the detailed string.
> + (ebdb-field-anniv-diary-entry
> + field record (nth 2 date))
> + ;; If not, we're just marking dates on the
> + ;; calendar, so any non-nil response value is
> + ;; fine.
> + entry))
> + entries "; "))))
Do you really expect that this if-clause has a measurable effect on
performance? Most people will not have thousands of anniversaries in
their database (and even then, they probably don't want to have them all
listed). OTOH you now need to rely on an internal aspect of the
implementation.
Some more thoughts about this matter:
Do have a version for the Org agenda? I see BBDB has
`org-bbdb-anniversaries'. It handles the 2/29 problem btw.
What I as a user would wish (for the Diary and Org) would be a way to
control on a per-field basis (1) which anniversaries are listed, (2) how
they are presented and (3) a way to allow reminders for some (I might
need some weeks time to buy a present for some people, while I only want
to congratulate others so I don't need a reminder for most).
Regards,
Michael.
next prev parent reply other threads:[~2021-08-17 17:16 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
2021-08-15 15:57 ` Eric Abrahamsen
2021-08-15 20:16 ` Eric Abrahamsen
2021-08-17 17:16 ` Michael Heerdegen [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r1es56wf.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=49995@debbugs.gnu.org \
--cc=eric@ericabrahamsen.net \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.