From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Re: [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda Date: Fri, 10 Oct 2014 12:25:15 -0400 Message-ID: <87lhonx578.fsf@gmail.com> References: <84d2a0ypk7.fsf@tm6592.fritz.box> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xcd0b-0001EU-1c for emacs-orgmode@gnu.org; Fri, 10 Oct 2014 12:25:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xcd0V-0006Yq-B7 for emacs-orgmode@gnu.org; Fri, 10 Oct 2014 12:25:36 -0400 Received: from mail-wg0-x22e.google.com ([2a00:1450:400c:c00::22e]:41858) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xcd0V-0006YF-1d for emacs-orgmode@gnu.org; Fri, 10 Oct 2014 12:25:31 -0400 Received: by mail-wg0-f46.google.com with SMTP id l18so4349907wgh.5 for ; Fri, 10 Oct 2014 09:25:29 -0700 (PDT) In-Reply-To: <84d2a0ypk7.fsf@tm6592.fritz.box> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Marco Wahl , emacs-orgmode@gnu.org Hi Marco, Thanks for the patch. 2014ko urriak 10an, Marco Wahl-ek idatzi zuen: >=20 > Hi, >=20 > it has just been reported on the emacs devel list that > 'fancy-diary-display' has been replaced by 'diary-fancy-display' in > Emacs 25. >=20 > This breaks diary inclusion into the agenda. >=20 > I think the appropriate fix is to choose the display function > dependending on the Emacs version. See the patch below. Comments are > welcome. >=20 >=20 > Best regards, Marco > From ebf45bd1c6d7435a8f9f991c6466bf704f223ce9 Mon Sep 17 00:00:00 2001 > From: Marco Wahl > Date: Fri, 10 Oct 2014 15:49:38 +0200 > Subject: [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda >=20 > * lisp/org-agenda.el (org-get-entries-from-diary): Choose display > function depending on version >=20 > `fancy-diary-display' is `diary-fancy-display' in Emacs 25. > --- > lisp/org-agenda.el | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) >=20 > diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el > index da7993c..5fd9fbc 100644 > --- a/lisp/org-agenda.el > +++ b/lisp/org-agenda.el > @@ -5112,8 +5112,10 @@ of what a project is and how to check if it stuck,= customize the variable > "Get the (Emacs Calendar) diary entries for DATE." > (require 'diary-lib) > (let* ((diary-fancy-buffer "*temporary-fancy-diary-buffer*") > - (diary-display-hook '(fancy-diary-display)) > - (diary-display-function 'fancy-diary-display) > + (diary-display-function (if (version< emacs-version "25") > + 'fancy-diary-display > + 'diary-fancy-display)) The rule of thumb is that Org should support the current major version of emacs and one previous. These functions have been aliased for a while, with fancy-diary-display marked as deprecated. The commit that removed them from emacs says this is at least since v 23.1, so it=E2=80=99s safe to just use the new name unconditionally. > + (diary-display-hook '(diary-display-function)) This puts the symbol =E2=80=98diary-display-function=E2=80=99 in the list, = which may or may not be correct (it=E2=80=99s different than the old behavior, which effectively put the value of that variable). Maybe you want =E2=80=98(list diary-display-function)=E2=80=99 instead? --=20 Aaron Ecay