Re: [O] Patch: Mark org-diary-class as obsolete and skip entries on holidays in org-class

2011-10-28 Thread Bastien
Achim Gratz  writes:

> This change introduced a new warning:
>
> In end of data:
> org-agenda.el:8536:1:Warning: the function `calendar-check-holidays' is not
> known to be defined. 

Fixed, thanks.

-- 
 Bastien



Re: [O] Patch: Mark org-diary-class as obsolete and skip entries on holidays in org-class

2011-10-27 Thread Achim Gratz

This change introduced a new warning:

In end of data:
org-agenda.el:8536:1:Warning: the function `calendar-check-holidays' is not
known to be defined. 


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf Blofeld V1.15B11:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] Patch: Mark org-diary-class as obsolete and skip entries on holidays in org-class

2011-10-26 Thread Carsten Dominik
Hi Rüdiger,

On Oct 10, 2011, at 9:15 PM, Rüdiger Sonderfeld wrote:

> Hello,
> I wrote two small patches. The first one marks org-diary-class as obsolete
> (according to its documentation it is deprecated). The second one is a
> patch for org-class. It changes org-class to skip entries that are on
> holidays.

The first is accepted.  The second I have modified.  If any of
SKIP-WEEKS is the symbol `holidays', then holidays will be skipped.

Thanks!

- Carsten

> 
> Maybe the second change should be made optional.
> 
> Regards,
> Rüdiger
> 
> P.S. I have signed the FSF papers.
> <0001-Mark-org-diary-class-as-obsolete-use-org-class.patch><0002-org-class-Skip-entries-on-holidays.patch>

- Carsten






Re: [O] Patch: Mark org-diary-class as obsolete and skip entries on holidays in org-class

2011-10-25 Thread Rüdiger Sonderfeld
Hi Carsten,

On Tue, 25 Oct 2011 16:08:43 +0200, Carsten Dominik
 wrote:
>
> The first is accepted.  The second I have modified.  If any of
> SKIP-WEEKS is the symbol `holidays', then holidays will be skipped.

That sounds good.

Thank you.

Regards,
Rüdiger




Re: [O] Patch: Mark org-diary-class as obsolete and skip entries on holidays in org-class

2011-10-25 Thread Carsten Dominik
Hi Rüdiger,

On Oct 10, 2011, at 9:15 PM, Rüdiger Sonderfeld wrote:

> Hello,
> I wrote two small patches. The first one marks org-diary-class as obsolete
> (according to its documentation it is deprecated). The second one is a
> patch for org-class. It changes org-class to skip entries that are on
> holidays.

The first is accepted.  The second I have modified.  If any of
SKIP-WEEKS is the symbol `holidays', then holidays will be skipped.

Thanks!

- Carsten

> 
> Maybe the second change should be made optional.
> 
> Regards,
> Rüdiger
> 
> P.S. I have signed the FSF papers.
> <0001-Mark-org-diary-class-as-obsolete-use-org-class.patch><0002-org-class-Skip-entries-on-holidays.patch>







[O] Patch: Mark org-diary-class as obsolete and skip entries on holidays in org-class

2011-10-11 Thread Rüdiger Sonderfeld
Hello,
I wrote two small patches. The first one marks org-diary-class as obsolete
(according to its documentation it is deprecated). The second one is a
patch for org-class. It changes org-class to skip entries that are on
holidays.

Maybe the second change should be made optional.

Regards,
Rüdiger

P.S. I have signed the FSF papers.
From 3774298aeb959b36bf39ac0988999b94198c1984 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=BCdiger=20Sonderfeld?= 
Date: Mon, 10 Oct 2011 20:59:28 +0200
Subject: [PATCH 1/2] Mark org-diary-class as obsolete (use org-class).

---
 lisp/org-agenda.el |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index b208d1e..faca285 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4913,6 +4913,7 @@ please use `org-class' instead."
  (nth 2 date1) (car date1) (nth 1 date1)
  (nth 2 date2) (car date2) (nth 1 date2)
  dayname skip-weeks)))
+(make-obsolete 'org-diary-class 'org-class "")
 
 (defalias 'org-get-closed 'org-agenda-get-progress)
 (defun org-agenda-get-progress ()
-- 
1.7.7

From 66fdd7995556002c4b5061641dbac5c1a7788d02 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=BCdiger=20Sonderfeld?= 
Date: Mon, 10 Oct 2011 21:07:02 +0200
Subject: [PATCH 2/2] org-class: Skip entries on holidays.

---
 lisp/org-agenda.el |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index faca285..8fe9cc7 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4881,7 +4881,7 @@ This function is invoked if 
`org-agenda-todo-ignore-deadlines',
   "Entry applies if date is between dates on DAYNAME, but skips SKIP-WEEKS.
 DAYNAME is a number between 0 (Sunday) and 6 (Saturday).  SKIP-WEEKS
 is any number of ISO weeks in the block period for which the item should
-be skipped."
+be skipped. Entries are also skipped if they happen on a holiday."
   (let* ((date1 (calendar-absolute-from-gregorian (list m1 d1 y1)))
 (date2 (calendar-absolute-from-gregorian (list m2 d2 y2)))
 (d (calendar-absolute-from-gregorian date)))
@@ -4893,6 +4893,7 @@ be skipped."
 (progn
   (require 'cal-iso)
   (not (member (car (calendar-iso-from-absolute d)) skip-weeks
+ (not (calendar-check-holidays date))
  entry)))
 
 (defun org-diary-class (m1 d1 y1 m2 d2 y2 dayname &rest skip-weeks)
-- 
1.7.7