From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#49995: 28.0.50; EBDB Anniversaries do not appear marked in calendar Date: Sun, 15 Aug 2021 07:28:37 -0700 Message-ID: <87y292wzmy.fsf@ericabrahamsen.net> References: <87h7ft5ea2.fsf@ericabrahamsen.net> <877dgogihz.fsf@web.de> <87y293527m.fsf@ericabrahamsen.net> <87bl5zxso8.fsf@ericabrahamsen.net> <871r6uhmn9.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38596"; 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: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 15 16:29:13 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 1mFH8Q-0009fh-Rs for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 15 Aug 2021 16:29:10 +0200 Original-Received: from localhost ([::1]:38680 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFH8O-0002N8-VF for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 15 Aug 2021 10:29:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36130) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFH8I-0002Mz-8S for bug-gnu-emacs@gnu.org; Sun, 15 Aug 2021 10:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36022) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mFH8I-0007rv-1B for bug-gnu-emacs@gnu.org; Sun, 15 Aug 2021 10:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mFH8H-000732-RT for bug-gnu-emacs@gnu.org; Sun, 15 Aug 2021 10:29:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Aug 2021 14:29:01 +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.162903772627068 (code B ref 49995); Sun, 15 Aug 2021 14:29:01 +0000 Original-Received: (at 49995) by debbugs.gnu.org; 15 Aug 2021 14:28:46 +0000 Original-Received: from localhost ([127.0.0.1]:47568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFH82-00072W-L8 for submit@debbugs.gnu.org; Sun, 15 Aug 2021 10:28:46 -0400 Original-Received: from mail.ericabrahamsen.net ([52.70.2.18]:46184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFH81-00072J-6o for 49995@debbugs.gnu.org; Sun, 15 Aug 2021 10:28:46 -0400 Original-Received: from localhost (c-71-197-184-122.hsd1.wa.comcast.net [71.197.184.122]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id A1C36FA07F; Sun, 15 Aug 2021 14:28:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1629037718; bh=SbfkTxVfKSIFZ8h9lOIl69/SqjhOZ3utggZMzQA7cQI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=WVk3YDRrJHZ0EWTdb7qfD2VkWcBnrAEy3NvatMQxXBL/1e0athrf/UNkjErScjMzY OaXo8d3/y3B1bB3XQ+oK493NRmmAUmxDvzSrntwGL6bU5jJJ11jo+Qqcuwc8HusbWP Eoe16Tar4u1NL0xTtck5ppDdHQSfwkA1YyiqpDQQ= In-Reply-To: <871r6uhmn9.fsf@web.de> (Michael Heerdegen's message of "Sun, 15 Aug 2021 15:18:18 +0200") 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:211919 Archived-At: On 08/15/21 15:18 PM, Michael Heerdegen wrote: > Eric Abrahamsen 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