GNU bug report logs - #15987
24.3; diary-add-to-list ignored by diary-mark-entries

Previous Next

Package: emacs;

Reported by: "Roland Winkler" <winkler <at> gnu.org>

Date: Thu, 28 Nov 2013 14:42:02 UTC

Severity: wishlist

Found in version 24.3

Full log


Message #23 received at 15987 <at> debbugs.gnu.org (full text, mbox):

From: "Roland Winkler" <winkler <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: Glenn Morris <rgm <at> gnu.org>, 15987 <at> debbugs.gnu.org,
 Stephen Berman <stephen.berman <at> gmx.net>
Subject: Re: bug#15987: 24.3; diary-add-to-list ignored by diary-mark-entries
Date: Tue, 20 Aug 2019 21:48:00 -0500
On Sun Aug 18 2019 Stefan Kangas wrote:
> "Roland Winkler" <winkler <at> gnu.org> writes:
> > On Sun Dec 1 2013 Stephen Berman wrote:
> >> It should be possible to do this by implementing a BBDB function for
> >> diary-goto-entry-function; see todo-diary-goto-entry for an example.
> >> (In fact, diary-goto-entry-function was added when the new version of
> >> todo-mode.el was added to Emacs, precisely for this purpose; note,
> >> however, that Todo files that are meant to contain diary entries must be
> >> included in the diary by the usual #include mechanism.)
> >
> > Thanks, I'll look into this.  Hopefully, such an approach will not
> > require too dirty tricks.
> 
> Did you ever get a chance to look into this?  I'm asking since it's
> been a while (six years more or less), and it would be good if we
> could clarify if this is indeed doable and/or desirable.

Thanks for the reminder.  Some time ago, I implemented a solution to
this, see the function bbdb-anniv-goto-entry in bbdb-anniv.el that
serves as a value for diary-goto-entry-function (see BBDB in GNU
Elpa or the BBDB repository on savannah).  Despite its (current)
prefix `bbdb' the function bbdb-anniv-goto-entry is really
independent of BBDB and it should work for other packages, too.  The
idea is to give strings passed to `diary-add-to-list' a text
property `diary-goto-entry' which should be a list (FUNCTION ARG1
ARG2 ...), see the docstring of bbdb-anniv-goto-entry.  Then,
bbdb-anniv-goto-entry checks for the presence of this text property
and calls FUNCTION to locate the entry.

I believe, the cleanest, backward-compatible solution would be to
use bbdb-anniv-goto-entry as a replacement for diary-goto-entry
and declare diary-goto-entry-function obsolete.  (The obsolete
variable diary-goto-entry-function could be kept for some time
without harm.)




This bug report was last modified 5 years and 298 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.