From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#49995: 28.0.50; EBDB Anniversaries do not appear marked in calendar Date: Tue, 17 Aug 2021 19:16:00 +0200 Message-ID: <87r1es56wf.fsf@web.de> References: <87h7ft5ea2.fsf@ericabrahamsen.net> <877dgogihz.fsf@web.de> <87y293527m.fsf@ericabrahamsen.net> <87bl5zxso8.fsf@ericabrahamsen.net> <871r6uhmn9.fsf@web.de> <87y292wzmy.fsf@ericabrahamsen.net> <87tujqwvi9.fsf@ericabrahamsen.net> <87k0kmwjie.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25766"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 49995@debbugs.gnu.org, Pankaj Jangid To: Eric Abrahamsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 17 19:17:12 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mG2i8-0006Pj-4U for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Aug 2021 19:17:12 +0200 Original-Received: from localhost ([::1]:39992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mG2i6-0008PH-4V for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Aug 2021 13:17:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mG2hy-0008N9-JR for bug-gnu-emacs@gnu.org; Tue, 17 Aug 2021 13:17:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42450) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mG2hy-00006W-D2 for bug-gnu-emacs@gnu.org; Tue, 17 Aug 2021 13:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mG2hy-0004oQ-9J for bug-gnu-emacs@gnu.org; Tue, 17 Aug 2021 13:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Aug 2021 17:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49995 X-GNU-PR-Package: emacs Original-Received: via spool by 49995-submit@debbugs.gnu.org id=B49995.162922058318424 (code B ref 49995); Tue, 17 Aug 2021 17:17:02 +0000 Original-Received: (at 49995) by debbugs.gnu.org; 17 Aug 2021 17:16:23 +0000 Original-Received: from localhost ([127.0.0.1]:53991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG2hK-0004n6-UC for submit@debbugs.gnu.org; Tue, 17 Aug 2021 13:16:23 -0400 Original-Received: from mout.web.de ([212.227.17.12]:54363) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG2hF-0004mo-Pz for 49995@debbugs.gnu.org; Tue, 17 Aug 2021 13:16:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1629220561; bh=7h9KGwK5UKy5WIdHWyjqQlpQGbIP+z7fhVDf48lWmk8=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=rQcGV7CDLxBlt004JIWDP0xry+fnLGAwZavQgctYOvAUw0Gu8qhfeqj/tCVYLt1Gi m64jooctqV/A8miZaX+ZW1ERBRtSNqbW4xsnrSArpwtMK1ZHP/mIVv/zGL6KH/YEbm Kub6PZtih9rnaETx2akV7Am1LH6plCskYXT6x7hQ= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([88.66.201.45]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MGign-1mK9Qm0LvF-00DW3N; Tue, 17 Aug 2021 19:16:01 +0200 In-Reply-To: <87k0kmwjie.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sun, 15 Aug 2021 13:16:57 -0700") X-Provags-ID: V03:K1:mQG/c4YO/T7RRVvVLHwHDpgQDosgHk6CEZ/raxdKeBB+ORr9N2i VqzbpIzl6DFao2zUO4+3A8HbxYTkk49fBMWJMCrlotIi7/jSOCWIiwjBVmkwYdhxPLfiohU uf6k+xbB0RNjGJ3yDWEE3HWanvc43lefEOftL/7SJ5GoGJptKlYZb7O8breXLqipYxSr+C4 dPZzzqKGloY8BvBnn3A+w== X-UI-Out-Filterresults: notjunk:1;V03:K0:lSiFKaeCeXE=:xfbIG6jAbTgZa2QbxQW9bg QWjpz5oIxGcfXkxkxfHQ7r9mnsGpdxyXYo+I16KeCqLYiu7KfYkIoQ7iPFsY46I2438lJb0vT 2yUxC+rIAYhc4fb2DOGw/Iq13FZP6YhNiqA5IaTh03cH6lVIjbsBUtf8Ge4CXfbqqMYPMTWzA gMxlsMUMWPt/Nm6XC/MIn6qr1sml6suu10IoFituhg3LpzJNV1QHffsjVktyAUqc0XJnTHaIR oFhbJ/WalYp0kz8elHZy07gJ5OqoA/8qaJMuRfHVlOhM8QkN9G+ZHdQW3gu1zpf0EbBZ8DYD4 U4XBIKwZvw9nZzGJ3LZvw7MkX4udDRruGox7URN2lFHJlTCWlyaC5Dr5oXyYaxU1Do9MEumj7 LnAEqnrywqMl4g0SFz5IRtrQ5KMmGE7ea+FC78fb8OdH49t91OaJ/kxzkQPBvUIRTfMN5GICf +QiMHaIuhMh0I7xchEs39g8VtzrWgFjuXaZAXit/XvDtSFSJvCniXf8rkadvdGlSIYL7kS29o i4jawX1ZBpALB4TsRZ5WXCQpjLdqkWelprX860JAGbwLrlEgqEkiofstS/PcF9ax4iTtoaaKh YSfUAI1HE1m3NedtcxxXzb/5UTnndLORvrLk7WKGNm/Cm/QWe+gUfdjMdewjVC4/N0esb7Dwh +qjnR1v5xUt+9+aAxzU0k2HPokKJfSQktMQGtxlw5wMqlPpBwEFEX8SDGPI/iaCBmebOkzUL+ mvC1qtUJBRl0/wJa+qv5MyvH8r29J9UPE3IcVuARUHwygkqM8FoUz9KAUsYbAQfk3aqWukx7 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:212098 Archived-At: Eric Abrahamsen 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.