all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Patch: Mark org-diary-class as obsolete and skip entries on holidays in org-class
@ 2011-10-10 19:15 Rüdiger Sonderfeld
  2011-10-25 14:08 ` Carsten Dominik
  2011-10-27  6:22 ` Carsten Dominik
  0 siblings, 2 replies; 6+ messages in thread
From: Rüdiger Sonderfeld @ 2011-10-10 19:15 UTC (permalink / raw)
  To: emacs-orgmode

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

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.

[-- Attachment #2: 0001-Mark-org-diary-class-as-obsolete-use-org-class.patch --]
[-- Type: text/plain, Size: 791 bytes --]

From 3774298aeb959b36bf39ac0988999b94198c1984 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=BCdiger=20Sonderfeld?= <ruediger@c-plusplus.de>
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


[-- Attachment #3: 0002-org-class-Skip-entries-on-holidays.patch --]
[-- Type: text/plain, Size: 1303 bytes --]

From 66fdd7995556002c4b5061641dbac5c1a7788d02 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=BCdiger=20Sonderfeld?= <ruediger@c-plusplus.de>
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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-10-28 14:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-10 19:15 Patch: Mark org-diary-class as obsolete and skip entries on holidays in org-class Rüdiger Sonderfeld
2011-10-25 14:08 ` Carsten Dominik
2011-10-25 17:03   ` Rüdiger Sonderfeld
2011-10-27  6:22 ` Carsten Dominik
2011-10-27 16:44   ` Achim Gratz
2011-10-28 14:53     ` Bastien

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.