emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Marco Wahl <marcowahlsoft@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda
Date: Fri, 10 Oct 2014 16:20:08 +0200	[thread overview]
Message-ID: <84d2a0ypk7.fsf@tm6592.fritz.box> (raw)

[-- Attachment #1: Type: text/plain, Size: 350 bytes --]

Hi,

it has just been reported on the emacs devel list that
'fancy-diary-display' has been replaced by 'diary-fancy-display' in
Emacs 25.

This breaks diary inclusion into the agenda.

I think the appropriate fix is to choose the display function
dependending on the Emacs version.  See the patch below.  Comments are
welcome.


Best regards,  Marco

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda --]
[-- Type: text/x-diff, Size: 1224 bytes --]

From ebf45bd1c6d7435a8f9f991c6466bf704f223ce9 Mon Sep 17 00:00:00 2001
From: Marco Wahl <marcowahlsoft@gmail.com>
Date: Fri, 10 Oct 2014 15:49:38 +0200
Subject: [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda

* lisp/org-agenda.el (org-get-entries-from-diary): Choose display
  function depending on version

`fancy-diary-display' is `diary-fancy-display' in Emacs 25.
---
 lisp/org-agenda.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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))
+	 (diary-display-hook '(diary-display-function))
 	 (pop-up-frames nil)
 	 (diary-list-entries-hook
 	  (cons 'org-diary-default-entry diary-list-entries-hook))
-- 
2.1.2


[-- Attachment #3: Type: text/plain, Size: 43 bytes --]

-- 
http://www.wahlzone.de
PGP: 0x0A3AE6F2

             reply	other threads:[~2014-10-10 14:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-10 14:20 Marco Wahl [this message]
2014-10-10 16:25 ` [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda Aaron Ecay
2014-10-11 10:36   ` Marco Wahl
2014-10-11 12:38     ` Bastien
2014-10-11 16:20       ` Marco Wahl
2014-10-11 17:45         ` Achim Gratz
2014-10-11 20:36           ` Aaron Ecay
2014-10-13  9:49             ` Marco Wahl
2014-10-13  9:43           ` Marco Wahl
2014-10-13 16:59             ` Achim Gratz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=84d2a0ypk7.fsf@tm6592.fritz.box \
    --to=marcowahlsoft@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).