From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Roland Winkler" Newsgroups: gmane.emacs.bugs Subject: bug#15987: 24.3; diary-add-to-list ignored by diary-mark-entries Date: Tue, 20 Aug 2019 21:48:00 -0500 Message-ID: <45280.87155.162160.23900@gargle.gargle.HOWL> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="209854"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 15987@debbugs.gnu.org, Stephen Berman To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 21 04:49:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i0GgQ-000sST-Nw for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Aug 2019 04:49:10 +0200 Original-Received: from localhost ([::1]:43566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0GgP-0000Fy-MC for geb-bug-gnu-emacs@m.gmane.org; Tue, 20 Aug 2019 22:49:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40794) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0GgJ-0000Fg-BN for bug-gnu-emacs@gnu.org; Tue, 20 Aug 2019 22:49:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i0GgI-0005PS-BQ for bug-gnu-emacs@gnu.org; Tue, 20 Aug 2019 22:49:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53791) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i0GgI-0005PO-7q for bug-gnu-emacs@gnu.org; Tue, 20 Aug 2019 22:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i0GgI-0005r1-55 for bug-gnu-emacs@gnu.org; Tue, 20 Aug 2019 22:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Roland Winkler" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Aug 2019 02:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15987 X-GNU-PR-Package: emacs Original-Received: via spool by 15987-submit@debbugs.gnu.org id=B15987.156635569222408 (code B ref 15987); Wed, 21 Aug 2019 02:49:02 +0000 Original-Received: (at 15987) by debbugs.gnu.org; 21 Aug 2019 02:48:12 +0000 Original-Received: from localhost ([127.0.0.1]:34379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0GfT-0005pL-J8 for submit@debbugs.gnu.org; Tue, 20 Aug 2019 22:48:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0GfS-0005p6-D3 for 15987@debbugs.gnu.org; Tue, 20 Aug 2019 22:48:10 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i0GfM-0004rs-Rm; Tue, 20 Aug 2019 22:48:04 -0400 Original-Received: from [2602:30a:2e52:d720:65b7:1416:12e7:8bfb] (port=43876 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1i0GfL-000079-Mr; Tue, 20 Aug 2019 22:48:04 -0400 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:165468 Archived-At: On Sun Aug 18 2019 Stefan Kangas wrote: > "Roland Winkler" 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.)