emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH 1/4] Rename org-agenda-today to org-today.
@ 2010-11-29 14:18 Julien Danjou
  2010-11-29 14:18 ` [PATCH 2/4] org-habit: Use org-today Julien Danjou
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Julien Danjou @ 2010-11-29 14:18 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Julien Danjou

Signed-off-by: Julien Danjou <julien@danjou.info>
---
 lisp/org-agenda.el |   18 ++++++------------
 lisp/org.el        |    6 ++++++
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 48856c9..aee7ca7 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -3208,7 +3208,7 @@ dates."
 					 org-timeline-show-empty-dates))
 	 (org-deadline-warning-days 0)
 	 (org-agenda-only-exact-dates t)
-	 (today (org-agenda-today))
+	 (today (org-today))
 	 (past t)
 	 args
 	 s e rtn d emptyp)
@@ -3285,7 +3285,7 @@ When EMPTY is non-nil, also include days without any entries."
 	     (if inactive org-ts-regexp-both org-ts-regexp)))
 	 dates dates1 date day day1 day2 ts1 ts2)
     (if force-today
-	(setq dates (list (org-agenda-today))))
+	(setq dates (list (org-today))))
     (save-excursion
       (goto-char beg)
       (while (re-search-forward re end t)
@@ -3396,7 +3396,7 @@ given in `org-agenda-start-on-weekday'."
 	      org-agenda-start-on-weekday nil))
 	 (thefiles (org-agenda-files nil 'ifmode))
 	 (files thefiles)
-	 (today (org-agenda-today))
+	 (today (org-today))
 	 (sd (or start-day today))
 	 (start (if (or (null org-agenda-start-on-weekday)
 			(< org-agenda-ndays 7))
@@ -3839,7 +3839,7 @@ for a keyword.  A numeric prefix directly selects the Nth keyword in
   (org-set-sorting-strategy 'todo)
   (org-prepare-agenda "TODO")
   (if (and (stringp arg) (not (string-match "\\S-" arg))) (setq arg nil))
-  (let* ((today (org-agenda-today))
+  (let* ((today (org-today))
 	 (date (calendar-gregorian-from-absolute today))
 	 (kwds org-todo-keywords-for-agenda)
 	 (completion-ignore-case t)
@@ -7956,7 +7956,7 @@ belonging to the \"Work\" category."
   (let* ((cnt 0) ; count added events
 	 (org-agenda-new-buffers nil)
 	 (org-deadline-warning-days 0)
-	 ;; Do not use `org-agenda-today' here because appt only takes
+	 ;; Do not use `org-today' here because appt only takes
 	 ;; time and without date as argument, so it may pass wrong
 	 ;; information otherwise
 	 (today (org-date-to-gregorian
@@ -7999,15 +7999,9 @@ belonging to the \"Work\" category."
 	(message "No event to add")
       (message "Added %d event%s for today" cnt (if (> cnt 1) "s" "")))))
 
-(defun org-agenda-today ()
-  "Return today date, considering `org-extend-today-until'."
-  (time-to-days
-   (time-subtract (current-time)
-		  (list 0 (* 3600 org-extend-today-until) 0))))
-
 (defun org-agenda-todayp (date)
   "Does DATE mean today, when considering `org-extend-today-until'?"
-  (let ((today (org-agenda-today))
+  (let ((today (org-today))
 	(date (if (and date (listp date)) (calendar-absolute-from-gregorian date)
 		date)))
     (eq date today)))
diff --git a/lisp/org.el b/lisp/org.el
index 873b294..6c4c433 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4798,6 +4798,12 @@ The following commands are available:
 		       (nthcdr 2 time))))
     (current-time)))
 
+(defun org-today ()
+  "Return today date, considering `org-extend-today-until'."
+  (time-to-days
+   (time-subtract (current-time)
+		  (list 0 (* 3600 org-extend-today-until) 0))))
+
 ;;;; Font-Lock stuff, including the activators
 
 (defvar org-mouse-map (make-sparse-keymap))
-- 
1.7.2.3

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

* [PATCH 2/4] org-habit: Use org-today.
  2010-11-29 14:18 [PATCH 1/4] Rename org-agenda-today to org-today Julien Danjou
@ 2010-11-29 14:18 ` Julien Danjou
  2010-11-30 23:49   ` [Accepted] [Orgmode,2/4] " Carsten Dominik
  2010-11-29 14:18 ` [PATCH 3/4] org-capture: use org-today Julien Danjou
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Julien Danjou @ 2010-11-29 14:18 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Julien Danjou

* org-habit.el: Use org-today.

Signed-off-by: Julien Danjou <julien@danjou.info>
---
 lisp/org-habit.el |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/lisp/org-habit.el b/lisp/org-habit.el
index 394b4fb..04a2328 100644
--- a/lisp/org-habit.el
+++ b/lisp/org-habit.el
@@ -197,10 +197,7 @@ This list represents a \"habit\" for the rest of this module."
   "Determine the relative priority of a habit.
 This must take into account not just urgency, but consistency as well."
   (let ((pri 1000)
-	(now (time-to-days
-	      (or moment
-		  (time-subtract (current-time)
-				 (list 0 (* 3600 org-extend-today-until) 0)))))
+	(now (if moment (time-to-days moment) (org-today)))
 	(scheduled (org-habit-scheduled habit))
 	(deadline (org-habit-deadline habit)))
     ;; add 10 for every day past the scheduled date, and subtract for every
@@ -240,7 +237,7 @@ Habits are assigned colors on the following basis:
 	 (deadline (if scheduled-days
 		       (+ scheduled-days (- d-repeat s-repeat))
 		     (org-habit-deadline habit)))
-	 (m-days (or now-days (time-to-days (current-time)))))
+	 (m-days (or now-days (org-today))))
     (cond
      ((< m-days scheduled)
       '(org-habit-clear-face . org-habit-clear-future-face))
@@ -319,8 +316,7 @@ current time."
   "Insert consistency graph for any habitual tasks."
   (let ((inhibit-read-only t) l c
 	(buffer-invisibility-spec '(org-link))
-	(moment (time-subtract (current-time)
-			       (list 0 (* 3600 org-extend-today-until) 0))))
+	(moment (days-to-time (org-today))))
     (save-excursion
       (goto-char (if line (point-at-bol) (point-min)))
       (while (not (eobp))
-- 
1.7.2.3

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

* [PATCH 3/4] org-capture: use org-today
  2010-11-29 14:18 [PATCH 1/4] Rename org-agenda-today to org-today Julien Danjou
  2010-11-29 14:18 ` [PATCH 2/4] org-habit: Use org-today Julien Danjou
@ 2010-11-29 14:18 ` Julien Danjou
  2010-11-30 23:50   ` [Accepted] [Orgmode,3/4] " Carsten Dominik
  2010-11-29 14:18 ` [PATCH 4/4] org: use org-today in habits auto repeat Julien Danjou
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Julien Danjou @ 2010-11-29 14:18 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Julien Danjou

* org-capture.el: Use org-today.

Signed-off-by: Julien Danjou <julien@danjou.info>
---
 lisp/org-capture.el |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index a5c6a4d..7d0f1ac 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -671,15 +671,10 @@ already gone."
 	    ;; prompt for date
 	    (time-to-days (org-read-date 
 			   nil t nil "Date for tree entry:"
-			   (time-subtract (current-time)
-					  (list 0 (* 3600 
-						     org-extend-today-until)
-						0)))))
+			   (days-to-time (org-today)))))
 	   (t
 	    ;; current date, possible corrected for late night workers
-	    (time-to-days
-	     (time-subtract (current-time)
-			    (list 0 (* 3600 org-extend-today-until) 0))))))))
+	    (org-today))))))
        
        ((eq (car target) 'file+function)
 	(set-buffer (org-capture-target-buffer (nth 1 target)))
-- 
1.7.2.3

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

* [PATCH 4/4] org: use org-today in habits auto repeat
  2010-11-29 14:18 [PATCH 1/4] Rename org-agenda-today to org-today Julien Danjou
  2010-11-29 14:18 ` [PATCH 2/4] org-habit: Use org-today Julien Danjou
  2010-11-29 14:18 ` [PATCH 3/4] org-capture: use org-today Julien Danjou
@ 2010-11-29 14:18 ` Julien Danjou
  2010-11-30 23:49   ` [Accepted] [Orgmode, " Carsten Dominik
  2010-11-30  6:27 ` [PATCH 1/4] Rename org-agenda-today to org-today Carsten Dominik
  2010-11-30 23:48 ` [Accepted] [Orgmode, " Carsten Dominik
  4 siblings, 1 reply; 12+ messages in thread
From: Julien Danjou @ 2010-11-29 14:18 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Julien Danjou

* org.el (org-auto-repeat-maybe): Use org-today.

Signed-off-by: Julien Danjou <julien@danjou.info>
---
 lisp/org.el |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 6c4c433..7a76559 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -11393,13 +11393,13 @@ This function is run automatically after each state change to a DONE state."
 	     ((equal (match-string 1 ts) ".")
 	      ;; Shift starting date to today
 	      (org-timestamp-change
-	       (- (time-to-days (current-time)) (time-to-days time))
+	       (- (org-today) (time-to-days time))
 	       'day))
 	     ((equal (match-string 1 ts) "+")
 	      (let ((nshiftmax 10) (nshift 0))
 		(while (or (= nshift 0)
 			   (<= (time-to-days time)
-			       (time-to-days (current-time))))
+			       (org-today)))
 		  (when (= (incf nshift) nshiftmax)
 		    (or (y-or-n-p (message "%d repeater intervals were not enough to shift date past today.  Continue? " nshift))
 			(error "Abort")))
-- 
1.7.2.3

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

* Re: [PATCH 1/4] Rename org-agenda-today to org-today.
  2010-11-29 14:18 [PATCH 1/4] Rename org-agenda-today to org-today Julien Danjou
                   ` (2 preceding siblings ...)
  2010-11-29 14:18 ` [PATCH 4/4] org: use org-today in habits auto repeat Julien Danjou
@ 2010-11-30  6:27 ` Carsten Dominik
  2010-11-30  9:06   ` Julien Danjou
  2010-11-30 23:48 ` [Accepted] [Orgmode, " Carsten Dominik
  4 siblings, 1 reply; 12+ messages in thread
From: Carsten Dominik @ 2010-11-30  6:27 UTC (permalink / raw)
  To: Julien Danjou; +Cc: emacs-orgmode

Hi Julien,

the purpose of this change is .... to be able to use
this also in org.el without having to load org-agenda.el?

- Carsten

On Nov 29, 2010, at 3:18 PM, Julien Danjou wrote:

> Signed-off-by: Julien Danjou <julien@danjou.info>
> ---
> lisp/org-agenda.el |   18 ++++++------------
> lisp/org.el        |    6 ++++++
> 2 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index 48856c9..aee7ca7 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -3208,7 +3208,7 @@ dates."
> 					 org-timeline-show-empty-dates))
> 	 (org-deadline-warning-days 0)
> 	 (org-agenda-only-exact-dates t)
> -	 (today (org-agenda-today))
> +	 (today (org-today))
> 	 (past t)
> 	 args
> 	 s e rtn d emptyp)
> @@ -3285,7 +3285,7 @@ When EMPTY is non-nil, also include days  
> without any entries."
> 	     (if inactive org-ts-regexp-both org-ts-regexp)))
> 	 dates dates1 date day day1 day2 ts1 ts2)
>     (if force-today
> -	(setq dates (list (org-agenda-today))))
> +	(setq dates (list (org-today))))
>     (save-excursion
>       (goto-char beg)
>       (while (re-search-forward re end t)
> @@ -3396,7 +3396,7 @@ given in `org-agenda-start-on-weekday'."
> 	      org-agenda-start-on-weekday nil))
> 	 (thefiles (org-agenda-files nil 'ifmode))
> 	 (files thefiles)
> -	 (today (org-agenda-today))
> +	 (today (org-today))
> 	 (sd (or start-day today))
> 	 (start (if (or (null org-agenda-start-on-weekday)
> 			(< org-agenda-ndays 7))
> @@ -3839,7 +3839,7 @@ for a keyword.  A numeric prefix directly  
> selects the Nth keyword in
>   (org-set-sorting-strategy 'todo)
>   (org-prepare-agenda "TODO")
>   (if (and (stringp arg) (not (string-match "\\S-" arg))) (setq arg  
> nil))
> -  (let* ((today (org-agenda-today))
> +  (let* ((today (org-today))
> 	 (date (calendar-gregorian-from-absolute today))
> 	 (kwds org-todo-keywords-for-agenda)
> 	 (completion-ignore-case t)
> @@ -7956,7 +7956,7 @@ belonging to the \"Work\" category."
>   (let* ((cnt 0) ; count added events
> 	 (org-agenda-new-buffers nil)
> 	 (org-deadline-warning-days 0)
> -	 ;; Do not use `org-agenda-today' here because appt only takes
> +	 ;; Do not use `org-today' here because appt only takes
> 	 ;; time and without date as argument, so it may pass wrong
> 	 ;; information otherwise
> 	 (today (org-date-to-gregorian
> @@ -7999,15 +7999,9 @@ belonging to the \"Work\" category."
> 	(message "No event to add")
>       (message "Added %d event%s for today" cnt (if (> cnt 1) "s"  
> "")))))
>
> -(defun org-agenda-today ()
> -  "Return today date, considering `org-extend-today-until'."
> -  (time-to-days
> -   (time-subtract (current-time)
> -		  (list 0 (* 3600 org-extend-today-until) 0))))
> -
> (defun org-agenda-todayp (date)
>   "Does DATE mean today, when considering `org-extend-today-until'?"
> -  (let ((today (org-agenda-today))
> +  (let ((today (org-today))
> 	(date (if (and date (listp date)) (calendar-absolute-from-gregorian  
> date)
> 		date)))
>     (eq date today)))
> diff --git a/lisp/org.el b/lisp/org.el
> index 873b294..6c4c433 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -4798,6 +4798,12 @@ The following commands are available:
> 		       (nthcdr 2 time))))
>     (current-time)))
>
> +(defun org-today ()
> +  "Return today date, considering `org-extend-today-until'."
> +  (time-to-days
> +   (time-subtract (current-time)
> +		  (list 0 (* 3600 org-extend-today-until) 0))))
> +
> ;;;; Font-Lock stuff, including the activators
>
> (defvar org-mouse-map (make-sparse-keymap))
> -- 
> 1.7.2.3
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [PATCH 1/4] Rename org-agenda-today to org-today.
  2010-11-30  6:27 ` [PATCH 1/4] Rename org-agenda-today to org-today Carsten Dominik
@ 2010-11-30  9:06   ` Julien Danjou
  2010-11-30 23:50     ` Carsten Dominik
  2010-12-01 13:26     ` Bernt Hansen
  0 siblings, 2 replies; 12+ messages in thread
From: Julien Danjou @ 2010-11-30  9:06 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 430 bytes --]

On Tue, Nov 30 2010, Carsten Dominik wrote:

> the purpose of this change is .... to be able to use
> this also in org.el without having to load org-agenda.el?

Yes, and to be consistent. The variable org-extend-today-until is
defined in org.el, it seems more general than org-agenda, i.e. it has no
sense to be defined as an agenda function.

-- 
Julien Danjou
// ᐰ <julien@danjou.info>   http://julien.danjou.info

[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* [Accepted] [Orgmode, 1/4] Rename org-agenda-today to org-today.
  2010-11-29 14:18 [PATCH 1/4] Rename org-agenda-today to org-today Julien Danjou
                   ` (3 preceding siblings ...)
  2010-11-30  6:27 ` [PATCH 1/4] Rename org-agenda-today to org-today Carsten Dominik
@ 2010-11-30 23:48 ` Carsten Dominik
  4 siblings, 0 replies; 12+ messages in thread
From: Carsten Dominik @ 2010-11-30 23:48 UTC (permalink / raw)
  To: emacs-orgmode

Patch 416 (http://patchwork.newartisans.com/patch/416/) is now "Accepted".

Maintainer comment: No comment

This relates to the following submission:

http://mid.gmane.org/%3C1291040314-1884-1-git-send-email-julien%40danjou.info%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [Orgmode,1/4] Rename org-agenda-today to org-today.
> Date: Mon, 29 Nov 2010 19:18:31 -0000
> From: Julien Danjou <julien@danjou.info>
> X-Patchwork-Id: 416
> Message-Id: <1291040314-1884-1-git-send-email-julien@danjou.info>
> To: emacs-orgmode@gnu.org
> Cc: Julien Danjou <julien@danjou.info>
> 
> Signed-off-by: Julien Danjou <julien@danjou.info>
> 
> ---
> lisp/org-agenda.el |   18 ++++++------------
>  lisp/org.el        |    6 ++++++
>  2 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index 48856c9..aee7ca7 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -3208,7 +3208,7 @@ dates."
>  					 org-timeline-show-empty-dates))
>  	 (org-deadline-warning-days 0)
>  	 (org-agenda-only-exact-dates t)
> -	 (today (org-agenda-today))
> +	 (today (org-today))
>  	 (past t)
>  	 args
>  	 s e rtn d emptyp)
> @@ -3285,7 +3285,7 @@ When EMPTY is non-nil, also include days without any entries."
>  	     (if inactive org-ts-regexp-both org-ts-regexp)))
>  	 dates dates1 date day day1 day2 ts1 ts2)
>      (if force-today
> -	(setq dates (list (org-agenda-today))))
> +	(setq dates (list (org-today))))
>      (save-excursion
>        (goto-char beg)
>        (while (re-search-forward re end t)
> @@ -3396,7 +3396,7 @@ given in `org-agenda-start-on-weekday'."
>  	      org-agenda-start-on-weekday nil))
>  	 (thefiles (org-agenda-files nil 'ifmode))
>  	 (files thefiles)
> -	 (today (org-agenda-today))
> +	 (today (org-today))
>  	 (sd (or start-day today))
>  	 (start (if (or (null org-agenda-start-on-weekday)
>  			(< org-agenda-ndays 7))
> @@ -3839,7 +3839,7 @@ for a keyword.  A numeric prefix directly selects the Nth keyword in
>    (org-set-sorting-strategy 'todo)
>    (org-prepare-agenda "TODO")
>    (if (and (stringp arg) (not (string-match "\\S-" arg))) (setq arg nil))
> -  (let* ((today (org-agenda-today))
> +  (let* ((today (org-today))
>  	 (date (calendar-gregorian-from-absolute today))
>  	 (kwds org-todo-keywords-for-agenda)
>  	 (completion-ignore-case t)
> @@ -7956,7 +7956,7 @@ belonging to the \"Work\" category."
>    (let* ((cnt 0) ; count added events
>  	 (org-agenda-new-buffers nil)
>  	 (org-deadline-warning-days 0)
> -	 ;; Do not use `org-agenda-today' here because appt only takes
> +	 ;; Do not use `org-today' here because appt only takes
>  	 ;; time and without date as argument, so it may pass wrong
>  	 ;; information otherwise
>  	 (today (org-date-to-gregorian
> @@ -7999,15 +7999,9 @@ belonging to the \"Work\" category."
>  	(message "No event to add")
>        (message "Added %d event%s for today" cnt (if (> cnt 1) "s" "")))))
>  
> -(defun org-agenda-today ()
> -  "Return today date, considering `org-extend-today-until'."
> -  (time-to-days
> -   (time-subtract (current-time)
> -		  (list 0 (* 3600 org-extend-today-until) 0))))
> -
>  (defun org-agenda-todayp (date)
>    "Does DATE mean today, when considering `org-extend-today-until'?"
> -  (let ((today (org-agenda-today))
> +  (let ((today (org-today))
>  	(date (if (and date (listp date)) (calendar-absolute-from-gregorian date)
>  		date)))
>      (eq date today)))
> diff --git a/lisp/org.el b/lisp/org.el
> index 873b294..6c4c433 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -4798,6 +4798,12 @@ The following commands are available:
>  		       (nthcdr 2 time))))
>      (current-time)))
>  
> +(defun org-today ()
> +  "Return today date, considering `org-extend-today-until'."
> +  (time-to-days
> +   (time-subtract (current-time)
> +		  (list 0 (* 3600 org-extend-today-until) 0))))
> +
>  ;;;; Font-Lock stuff, including the activators
>  
>  (defvar org-mouse-map (make-sparse-keymap))
> 

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

* [Accepted] [Orgmode, 4/4] org: use org-today in habits auto repeat
  2010-11-29 14:18 ` [PATCH 4/4] org: use org-today in habits auto repeat Julien Danjou
@ 2010-11-30 23:49   ` Carsten Dominik
  0 siblings, 0 replies; 12+ messages in thread
From: Carsten Dominik @ 2010-11-30 23:49 UTC (permalink / raw)
  To: emacs-orgmode

Patch 417 (http://patchwork.newartisans.com/patch/417/) is now "Accepted".

Maintainer comment: No comment

This relates to the following submission:

http://mid.gmane.org/%3C1291040314-1884-4-git-send-email-julien%40danjou.info%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [Orgmode,4/4] org: use org-today in habits auto repeat
> Date: Mon, 29 Nov 2010 19:18:34 -0000
> From: Julien Danjou <julien@danjou.info>
> X-Patchwork-Id: 417
> Message-Id: <1291040314-1884-4-git-send-email-julien@danjou.info>
> To: emacs-orgmode@gnu.org
> Cc: Julien Danjou <julien@danjou.info>
> 
> * org.el (org-auto-repeat-maybe): Use org-today.
> 
> Signed-off-by: Julien Danjou <julien@danjou.info>
> 
> ---
> lisp/org.el |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lisp/org.el b/lisp/org.el
> index 6c4c433..7a76559 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -11393,13 +11393,13 @@ This function is run automatically after each state change to a DONE state."
>  	     ((equal (match-string 1 ts) ".")
>  	      ;; Shift starting date to today
>  	      (org-timestamp-change
> -	       (- (time-to-days (current-time)) (time-to-days time))
> +	       (- (org-today) (time-to-days time))
>  	       'day))
>  	     ((equal (match-string 1 ts) "+")
>  	      (let ((nshiftmax 10) (nshift 0))
>  		(while (or (= nshift 0)
>  			   (<= (time-to-days time)
> -			       (time-to-days (current-time))))
> +			       (org-today)))
>  		  (when (= (incf nshift) nshiftmax)
>  		    (or (y-or-n-p (message "%d repeater intervals were not enough to shift date past today.  Continue? " nshift))
>  			(error "Abort")))
> 

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

* [Accepted] [Orgmode,2/4] org-habit: Use org-today.
  2010-11-29 14:18 ` [PATCH 2/4] org-habit: Use org-today Julien Danjou
@ 2010-11-30 23:49   ` Carsten Dominik
  0 siblings, 0 replies; 12+ messages in thread
From: Carsten Dominik @ 2010-11-30 23:49 UTC (permalink / raw)
  To: emacs-orgmode

Patch 418 (http://patchwork.newartisans.com/patch/418/) is now "Accepted".

Maintainer comment: No comment

This relates to the following submission:

http://mid.gmane.org/%3C1291040314-1884-2-git-send-email-julien%40danjou.info%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [Orgmode,2/4] org-habit: Use org-today.
> Date: Mon, 29 Nov 2010 19:18:32 -0000
> From: Julien Danjou <julien@danjou.info>
> X-Patchwork-Id: 418
> Message-Id: <1291040314-1884-2-git-send-email-julien@danjou.info>
> To: emacs-orgmode@gnu.org
> Cc: Julien Danjou <julien@danjou.info>
> 
> * org-habit.el: Use org-today.
> 
> Signed-off-by: Julien Danjou <julien@danjou.info>
> 
> ---
> lisp/org-habit.el |   10 +++-------
>  1 files changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/lisp/org-habit.el b/lisp/org-habit.el
> index 394b4fb..04a2328 100644
> --- a/lisp/org-habit.el
> +++ b/lisp/org-habit.el
> @@ -197,10 +197,7 @@ This list represents a \"habit\" for the rest of this module."
>    "Determine the relative priority of a habit.
>  This must take into account not just urgency, but consistency as well."
>    (let ((pri 1000)
> -	(now (time-to-days
> -	      (or moment
> -		  (time-subtract (current-time)
> -				 (list 0 (* 3600 org-extend-today-until) 0)))))
> +	(now (if moment (time-to-days moment) (org-today)))
>  	(scheduled (org-habit-scheduled habit))
>  	(deadline (org-habit-deadline habit)))
>      ;; add 10 for every day past the scheduled date, and subtract for every
> @@ -240,7 +237,7 @@ Habits are assigned colors on the following basis:
>  	 (deadline (if scheduled-days
>  		       (+ scheduled-days (- d-repeat s-repeat))
>  		     (org-habit-deadline habit)))
> -	 (m-days (or now-days (time-to-days (current-time)))))
> +	 (m-days (or now-days (org-today))))
>      (cond
>       ((< m-days scheduled)
>        '(org-habit-clear-face . org-habit-clear-future-face))
> @@ -319,8 +316,7 @@ current time."
>    "Insert consistency graph for any habitual tasks."
>    (let ((inhibit-read-only t) l c
>  	(buffer-invisibility-spec '(org-link))
> -	(moment (time-subtract (current-time)
> -			       (list 0 (* 3600 org-extend-today-until) 0))))
> +	(moment (days-to-time (org-today))))
>      (save-excursion
>        (goto-char (if line (point-at-bol) (point-min)))
>        (while (not (eobp))
> 

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

* [Accepted] [Orgmode,3/4] org-capture: use org-today
  2010-11-29 14:18 ` [PATCH 3/4] org-capture: use org-today Julien Danjou
@ 2010-11-30 23:50   ` Carsten Dominik
  0 siblings, 0 replies; 12+ messages in thread
From: Carsten Dominik @ 2010-11-30 23:50 UTC (permalink / raw)
  To: emacs-orgmode

Patch 419 (http://patchwork.newartisans.com/patch/419/) is now "Accepted".

Maintainer comment: No comment

This relates to the following submission:

http://mid.gmane.org/%3C1291040314-1884-3-git-send-email-julien%40danjou.info%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [Orgmode,3/4] org-capture: use org-today
> Date: Mon, 29 Nov 2010 19:18:33 -0000
> From: Julien Danjou <julien@danjou.info>
> X-Patchwork-Id: 419
> Message-Id: <1291040314-1884-3-git-send-email-julien@danjou.info>
> To: emacs-orgmode@gnu.org
> Cc: Julien Danjou <julien@danjou.info>
> 
> * org-capture.el: Use org-today.
> 
> Signed-off-by: Julien Danjou <julien@danjou.info>
> 
> ---
> lisp/org-capture.el |    9 ++-------
>  1 files changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/lisp/org-capture.el b/lisp/org-capture.el
> index a5c6a4d..7d0f1ac 100644
> --- a/lisp/org-capture.el
> +++ b/lisp/org-capture.el
> @@ -671,15 +671,10 @@ already gone."
>  	    ;; prompt for date
>  	    (time-to-days (org-read-date 
>  			   nil t nil "Date for tree entry:"
> -			   (time-subtract (current-time)
> -					  (list 0 (* 3600 
> -						     org-extend-today-until)
> -						0)))))
> +			   (days-to-time (org-today)))))
>  	   (t
>  	    ;; current date, possible corrected for late night workers
> -	    (time-to-days
> -	     (time-subtract (current-time)
> -			    (list 0 (* 3600 org-extend-today-until) 0))))))))
> +	    (org-today))))))
>         
>         ((eq (car target) 'file+function)
>  	(set-buffer (org-capture-target-buffer (nth 1 target)))
> 

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

* Re: [PATCH 1/4] Rename org-agenda-today to org-today.
  2010-11-30  9:06   ` Julien Danjou
@ 2010-11-30 23:50     ` Carsten Dominik
  2010-12-01 13:26     ` Bernt Hansen
  1 sibling, 0 replies; 12+ messages in thread
From: Carsten Dominik @ 2010-11-30 23:50 UTC (permalink / raw)
  To: Julien Danjou; +Cc: emacs-orgmode


On Nov 30, 2010, at 10:06 AM, Julien Danjou wrote:

> On Tue, Nov 30 2010, Carsten Dominik wrote:
>
>> the purpose of this change is .... to be able to use
>> this also in org.el without having to load org-agenda.el?
>
> Yes, and to be consistent. The variable org-extend-today-until is
> defined in org.el, it seems more general than org-agenda, i.e. it  
> has no
> sense to be defined as an agenda function.

Applied, thanks.

- Carsten

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

* Re: [PATCH 1/4] Rename org-agenda-today to org-today.
  2010-11-30  9:06   ` Julien Danjou
  2010-11-30 23:50     ` Carsten Dominik
@ 2010-12-01 13:26     ` Bernt Hansen
  1 sibling, 0 replies; 12+ messages in thread
From: Bernt Hansen @ 2010-12-01 13:26 UTC (permalink / raw)
  To: Julien Danjou; +Cc: emacs-orgmode, Carsten Dominik

Julien Danjou <julien@danjou.info> writes:

> On Tue, Nov 30 2010, Carsten Dominik wrote:
>
>> the purpose of this change is .... to be able to use
>> this also in org.el without having to load org-agenda.el?
>
> Yes, and to be consistent. The variable org-extend-today-until is
> defined in org.el, it seems more general than org-agenda, i.e. it has no
> sense to be defined as an agenda function.

Hi Julien,

These details should be in the commit message text when you post patches
to the list.  My initial reaction to your patches was 'Why do we need
this?'

Please add enough detail in the commit message text in the future so the
purpose of the patch is clearly stated.

Thanks,
Bernt

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

end of thread, other threads:[~2010-12-02 13:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-29 14:18 [PATCH 1/4] Rename org-agenda-today to org-today Julien Danjou
2010-11-29 14:18 ` [PATCH 2/4] org-habit: Use org-today Julien Danjou
2010-11-30 23:49   ` [Accepted] [Orgmode,2/4] " Carsten Dominik
2010-11-29 14:18 ` [PATCH 3/4] org-capture: use org-today Julien Danjou
2010-11-30 23:50   ` [Accepted] [Orgmode,3/4] " Carsten Dominik
2010-11-29 14:18 ` [PATCH 4/4] org: use org-today in habits auto repeat Julien Danjou
2010-11-30 23:49   ` [Accepted] [Orgmode, " Carsten Dominik
2010-11-30  6:27 ` [PATCH 1/4] Rename org-agenda-today to org-today Carsten Dominik
2010-11-30  9:06   ` Julien Danjou
2010-11-30 23:50     ` Carsten Dominik
2010-12-01 13:26     ` Bernt Hansen
2010-11-30 23:48 ` [Accepted] [Orgmode, " Carsten Dominik

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).