From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marco Wahl Subject: Re: [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda Date: Sat, 11 Oct 2014 12:36:05 +0200 Message-ID: <84siiuj3l6.fsf@tm6592.fritz.box> References: <84d2a0ypk7.fsf@tm6592.fritz.box> <87lhonx578.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33817) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xcu2R-0002Cg-SD for emacs-orgmode@gnu.org; Sat, 11 Oct 2014 06:36:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xcu2M-00018o-FS for emacs-orgmode@gnu.org; Sat, 11 Oct 2014 06:36:39 -0400 Received: from plane.gmane.org ([80.91.229.3]:46240) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xcu2M-00018h-68 for emacs-orgmode@gnu.org; Sat, 11 Oct 2014 06:36:34 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Xcu27-000331-ER for emacs-orgmode@gnu.org; Sat, 11 Oct 2014 12:36:19 +0200 Received: from stgt-5f71bcd4.pool.mediaways.net ([95.113.188.212]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 11 Oct 2014 12:36:19 +0200 Received: from marcowahlsoft by stgt-5f71bcd4.pool.mediaways.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 11 Oct 2014 12:36:19 +0200 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: emacs-orgmode@gnu.org Cc: Aaron Ecay --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Hi Aaron, Aaron Ecay writes: > 2014ko urriak 10an, Marco Wahl-ek idatzi zuen: >> 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. Just to be sure: Are 23.1 and 25.0 major versions of emacs? > 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’s safe to just use the new name > unconditionally. Thanks for pointing that out. >> + (diary-display-hook '(diary-display-function)) > > This puts the symbol ‘diary-display-function’ in the list, which may > or may not be correct (it’s different than the old behavior, which > effectively put the value of that variable). Maybe you want ‘(list > diary-display-function)’ instead? I would have wanted the latter. Thanks again for the clarification. But actually it does not matter since diary-display-hook has been marked obsolete some versions ago. See the emacs ChangeLog entry 2014-10-06 Glenn Morris Remove calendar code obsolete since at least version 23.1. ...diary-display-hook...fancy-diary-display... The patch has shrunk considerably and hopefully is worth for the push now. Best regards, Marco --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Fix-Emacs-25-fancy-diary-inclusion-in-agenda.patch Content-Description: Fix: Emacs 25 fancy diary inclusion in agenda >From 3bc2837ebad7d6a6ffdceb53d4f95c260c1ee342 Mon Sep 17 00:00:00 2001 From: Marco Wahl Date: Sat, 11 Oct 2014 11:39:02 +0200 Subject: [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda * lisp/org-agenda.el (org-get-entries-from-diary): Use the suitable display function. Drop the usage of the obsolete diary-display-hook. fancy-diary-display has been dropped in Emacs 25. diary-fancy-display is the long known replacement of fancy-diary-display. diary-display-hook has been marked obsolete before Emacs 23.2. --- lisp/org-agenda.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index da7993c..fd99bc9 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -5112,8 +5112,7 @@ 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 'diary-fancy-display) (pop-up-frames nil) (diary-list-entries-hook (cons 'org-diary-default-entry diary-list-entries-hook)) -- 2.1.2 --=-=-= Content-Type: text/plain -- http://www.wahlzone.de GPG: 0x0A3AE6F2 --=-=-=--