[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda
From: |
Aaron Ecay |
Subject: |
Re: [O] [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda |
Date: |
Fri, 10 Oct 2014 12:25:15 -0400 |
User-agent: |
Notmuch/0.18.1+56~g6c9721a (http://notmuchmail.org) Emacs/24.4.50.2 (x86_64-unknown-linux-gnu) |
Hi Marco,
Thanks for the patch.
2014ko urriak 10an, Marco Wahl-ek idatzi zuen:
>
> 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
> From ebf45bd1c6d7435a8f9f991c6466bf704f223ce9 Mon Sep 17 00:00:00 2001
> From: Marco Wahl <address@hidden>
> 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))
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
<http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/118057> says this
is at least since v 23.1, so it’s safe to just use the new name
unconditionally.
> + (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?
--
Aaron Ecay
- [O] [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda, Marco Wahl, 2014/10/10
- Re: [O] [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda,
Aaron Ecay <=
- Re: [O] [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda, Marco Wahl, 2014/10/11
- Re: [O] [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda, Bastien, 2014/10/11
- Re: [O] [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda, Marco Wahl, 2014/10/11
- Re: [O] [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda, Achim Gratz, 2014/10/11
- Re: [O] [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda, Aaron Ecay, 2014/10/11
- Re: [O] [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda, Marco Wahl, 2014/10/13
- Re: [O] [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda, Marco Wahl, 2014/10/13
- Re: [O] [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda, Achim Gratz, 2014/10/13