emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-habit: allow overriding org-scheduled-past-days and always including time of day
@ 2018-11-05  0:31 John Lee
  2018-11-05 13:01 ` [PATCH] " John Lee
  2018-11-18 23:40 ` Nicolas Goaziou
  0 siblings, 2 replies; 6+ messages in thread
From: John Lee @ 2018-11-05  0:31 UTC (permalink / raw)
  To: emacs-orgmode

Hi

Here's a couple of patches that add new org-habit variables.  I hope the variable documentation describes them sufficiently: if not I need to change the docs so if you review these patches please read the patch before the rest of this email so that you're not "cheating"!


Does the idea behind each of these seem appropriate to people?  They work for me of course, and behaviour is unchanged unless you set non-default values for the new variables -- but I know people have different workflows.

My own workflow around this is similar to GTD, so I'm using SCHEDULED as basically a way to get TODO items to show up after the scheduled date, not to show up in the calendar except as a reminder that I have new TODOs.  For that reason I set org-scheduled-past-days to a low value (3 right now).  I also set org-agenda-todo-ignore-scheduled to 'future and org-agenda-tags-todo-honor-ignore-options to t (not directly relevant here except as context).  For habits that causes habits not to show up sometimes because of the short org-scheduled-past-days, which isn't appropriate for my habits: if I say .+5d, I still want to see the habit there if it's due, even if it's been 4 days since the last done date (which is more than the 3 days of org-scheduled-past-days).  This motivates `org-habit-schedul
 ed-past-days'.

Similarly, since I want to do some of my habits at a particular time of day, org-agenda's omitting of the time of day from the scheduled timestamp if this is a "repeat" (i.e. I missed doing the habit) is unhelpful for habits, because now I have to scan though a long-ish list of habits (5 or 10 right now!) and think "is now the right time, should I have done that already?" for every habit in the list, rather than just eyeballing it to see which ones are around now in time.  This motivates `org-habit-always-show-time'.

I have not yet submitted the FSF copyright assignment form but am prepared to do so.


From 7bcf7b70b201af7a3d3cbbcf6a95511944370627 Mon Sep 17 00:00:00 2001
From: John Lee <jjl@pobox.com>
Date: Sun, 4 Nov 2018 23:11:17 +0000
Subject: [PATCH 1/2] org-habit: Add org-habit-scheduled-past-days

* lisp/org-habit.el: Add new variable `org-habit-scheduled-past-days'
  to allow overriding `org-scheduled-past-days' for habits

* lisp/org-agenda.el (org-agenda-get-scheduled): override
  `org-scheduled-past-days' for habits if
  `org-habit-scheduled-past-days` is not nil
---
 lisp/org-agenda.el |  5 ++++-
 lisp/org-habit.el  | 11 +++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 180a0612c..e2bd5cc2d 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6196,7 +6196,10 @@ scheduled items with an hour specification like [h]h:mm."
 		       habitp
 		       (bound-and-true-p org-habit-show-all-today))
 	    (when (or (and (> ddays 0) (< diff ddays))
-		      (> diff org-scheduled-past-days)
+		      (> diff (if habitp
+				  (or org-habit-scheduled-past-days
+				      org-scheduled-past-days)
+				org-scheduled-past-days))
 		      (> schedule current)
 		      (and (/= current schedule)
 			   (/= current today)
diff --git a/lisp/org-habit.el b/lisp/org-habit.el
index 375714e35..b8415bdde 100644
--- a/lisp/org-habit.el
+++ b/lisp/org-habit.el
@@ -89,6 +89,17 @@ It will be green even if it was done after the deadline."
   :group 'org-habit
   :type 'boolean)
 
+(defcustom org-habit-scheduled-past-days nil
+  "Non-nil means the value of this variable will be used instead
+of org-scheduled-past-days, for habits only.
+Setting this to say 10000 is a way to make habits always show up
+as a reminder, even if you set org-scheduled-past-days to a small
+value because you regard SCHEDULED items as a way of 'turning on'
+TODO items on a particular date, rather than as a means of
+creating calendar-based reminders."
+  :group 'org-habit
+  :type 'integer)
+
 (defface org-habit-clear-face
   '((((background light)) (:background "#8270f9"))
     (((background dark)) (:background "blue")))
-- 
2.17.1

From a1d6e3af978237b3f555682a111c2439f17b45b9 Mon Sep 17 00:00:00 2001
From: John Lee <jjl@pobox.com>
Date: Sun, 4 Nov 2018 23:17:15 +0000
Subject: [PATCH 2/2] org-habit: Add org-habit-always-show-time

* lisp/org-habit.el: Add new variable `org-habit-always-show-time'
  to force always showing the time of day

* lisp/org-agenda.el (org-agenda-get-scheduled): honour
  `org-habit-always-show-time`
---
 lisp/org-agenda.el | 12 +++++++++---
 lisp/org-habit.el  | 10 ++++++++++
 2 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index e2bd5cc2d..08e286730 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6253,9 +6253,15 @@ scheduled items with an hour specification like [h]h:mm."
 		   (head (buffer-substring (point) (line-end-position)))
 		   (time
 		    (cond
-		     ;; No time of day designation if it is only
-		     ;; a reminder.
-		     ((and (/= current schedule) (/= current repeat)) nil)
+		     ;; No time of day designation if it is only a
+		     ;; reminder (unless org-habit-always-show-time
+		     ;; forces display of the time of day
+		     ;; designation).
+		     ((and
+		       (not (and habitp org-habit-always-show-time))
+		       (/= current schedule)
+		       (/= current repeat))
+		      nil)
 		     ((string-match " \\([012]?[0-9]:[0-9][0-9]\\)" s)
 		      (concat (substring s (match-beginning 1)) " "))
 		     (t 'time)))
diff --git a/lisp/org-habit.el b/lisp/org-habit.el
index b8415bdde..7215174f9 100644
--- a/lisp/org-habit.el
+++ b/lisp/org-habit.el
@@ -100,6 +100,16 @@ creating calendar-based reminders."
   :group 'org-habit
   :type 'integer)
 
+(defcustom org-habit-always-show-time nil
+  "Non-nil means always show the time of day designation from the
+timestamp, even if the habit is past its due date.
+Setting this to t is useful if you regard the time of day
+designation in some of your habits' scheduled timestamps as a
+guide to when to do the habit, rather than only a time after
+which the habit is due."
+  :group 'org-habit
+  :type 'boolean)
+
 (defface org-habit-clear-face
   '((((background light)) (:background "#8270f9"))
     (((background dark)) (:background "blue")))
-- 
2.17.1

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

* [PATCH] org-habit: allow overriding org-scheduled-past-days and always including time of day
  2018-11-05  0:31 org-habit: allow overriding org-scheduled-past-days and always including time of day John Lee
@ 2018-11-05 13:01 ` John Lee
  2018-11-18 23:40 ` Nicolas Goaziou
  1 sibling, 0 replies; 6+ messages in thread
From: John Lee @ 2018-11-05 13:01 UTC (permalink / raw)
  To: emacs-orgmode

I guess I'm supposed to add the [PATCH] tag to the subject line?  So this email is just to do that.

Sorry if I've missed some instructions about this...

On Mon, 5 Nov 2018, at 00:31, John Lee wrote:
> Hi
> 
> Here's a couple of patches that add new org-habit variables.  I hope the 
> variable documentation describes them sufficiently: if not I need to 
> change the docs so if you review these patches please read the patch 
> before the rest of this email so that you're not "cheating"!
> 
> 
> Does the idea behind each of these seem appropriate to people?  They 
> work for me of course, and behaviour is unchanged unless you set non-
> default values for the new variables -- but I know people have different 
> workflows.
> 
> My own workflow around this is similar to GTD, so I'm using SCHEDULED as 
> basically a way to get TODO items to show up after the scheduled date, 
> not to show up in the calendar except as a reminder that I have new 
> TODOs.  For that reason I set org-scheduled-past-days to a low value (3 
> right now).  I also set org-agenda-todo-ignore-scheduled to 'future and 
> org-agenda-tags-todo-honor-ignore-options to t (not directly relevant 
> here except as context).  For habits that causes habits not to show up 
> sometimes because of the short org-scheduled-past-days, which isn't 
> appropriate for my habits: if I say .+5d, I still want to see the habit 
> there if it's due, even if it's been 4 days since the last done date 
> (which is more than the 3 days of org-scheduled-past-days).  This 
> motivates `org-habit-scheduled-past-days'.
> 
> Similarly, since I want to do some of my habits at a particular time of 
> day, org-agenda's omitting of the time of day from the scheduled 
> timestamp if this is a "repeat" (i.e. I missed doing the habit) is 
> unhelpful for habits, because now I have to scan though a long-ish list 
> of habits (5 or 10 right now!) and think "is now the right time, should 
> I have done that already?" for every habit in the list, rather than just 
> eyeballing it to see which ones are around now in time.  This motivates 
> `org-habit-always-show-time'.
> 
> I have not yet submitted the FSF copyright assignment form but am 
> prepared to do so.
> 
> 
> From 7bcf7b70b201af7a3d3cbbcf6a95511944370627 Mon Sep 17 00:00:00 2001
> From: John Lee <jjl@pobox.com>
> Date: Sun, 4 Nov 2018 23:11:17 +0000
> Subject: [PATCH 1/2] org-habit: Add org-habit-scheduled-past-days
> 
> * lisp/org-habit.el: Add new variable `org-habit-scheduled-past-days'
>   to allow overriding `org-scheduled-past-days' for habits
> 
> * lisp/org-agenda.el (org-agenda-get-scheduled): override
>   `org-scheduled-past-days' for habits if
>   `org-habit-scheduled-past-days` is not nil
> ---
>  lisp/org-agenda.el |  5 ++++-
>  lisp/org-habit.el  | 11 +++++++++++
>  2 files changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index 180a0612c..e2bd5cc2d 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -6196,7 +6196,10 @@ scheduled items with an hour specification like [h]h:mm."
>  		       habitp
>  		       (bound-and-true-p org-habit-show-all-today))
>  	    (when (or (and (> ddays 0) (< diff ddays))
> -		      (> diff org-scheduled-past-days)
> +		      (> diff (if habitp
> +				  (or org-habit-scheduled-past-days
> +				      org-scheduled-past-days)
> +				org-scheduled-past-days))
>  		      (> schedule current)
>  		      (and (/= current schedule)
>  			   (/= current today)
> diff --git a/lisp/org-habit.el b/lisp/org-habit.el
> index 375714e35..b8415bdde 100644
> --- a/lisp/org-habit.el
> +++ b/lisp/org-habit.el
> @@ -89,6 +89,17 @@ It will be green even if it was done after the deadline."
>    :group 'org-habit
>    :type 'boolean)
>  
> +(defcustom org-habit-scheduled-past-days nil
> +  "Non-nil means the value of this variable will be used instead
> +of org-scheduled-past-days, for habits only.
> +Setting this to say 10000 is a way to make habits always show up
> +as a reminder, even if you set org-scheduled-past-days to a small
> +value because you regard SCHEDULED items as a way of 'turning on'
> +TODO items on a particular date, rather than as a means of
> +creating calendar-based reminders."
> +  :group 'org-habit
> +  :type 'integer)
> +
>  (defface org-habit-clear-face
>    '((((background light)) (:background "#8270f9"))
>      (((background dark)) (:background "blue")))
> -- 
> 2.17.1
> 
> From a1d6e3af978237b3f555682a111c2439f17b45b9 Mon Sep 17 00:00:00 2001
> From: John Lee <jjl@pobox.com>
> Date: Sun, 4 Nov 2018 23:17:15 +0000
> Subject: [PATCH 2/2] org-habit: Add org-habit-always-show-time
> 
> * lisp/org-habit.el: Add new variable `org-habit-always-show-time'
>   to force always showing the time of day
> 
> * lisp/org-agenda.el (org-agenda-get-scheduled): honour
>   `org-habit-always-show-time`
> ---
>  lisp/org-agenda.el | 12 +++++++++---
>  lisp/org-habit.el  | 10 ++++++++++
>  2 files changed, 19 insertions(+), 3 deletions(-)
> 
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index e2bd5cc2d..08e286730 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -6253,9 +6253,15 @@ scheduled items with an hour specification like [h]h:mm."
>  		   (head (buffer-substring (point) (line-end-position)))
>  		   (time
>  		    (cond
> -		     ;; No time of day designation if it is only
> -		     ;; a reminder.
> -		     ((and (/= current schedule) (/= current repeat)) nil)
> +		     ;; No time of day designation if it is only a
> +		     ;; reminder (unless org-habit-always-show-time
> +		     ;; forces display of the time of day
> +		     ;; designation).
> +		     ((and
> +		       (not (and habitp org-habit-always-show-time))
> +		       (/= current schedule)
> +		       (/= current repeat))
> +		      nil)
>  		     ((string-match " \\([012]?[0-9]:[0-9][0-9]\\)" s)
>  		      (concat (substring s (match-beginning 1)) " "))
>  		     (t 'time)))
> diff --git a/lisp/org-habit.el b/lisp/org-habit.el
> index b8415bdde..7215174f9 100644
> --- a/lisp/org-habit.el
> +++ b/lisp/org-habit.el
> @@ -100,6 +100,16 @@ creating calendar-based reminders."
>    :group 'org-habit
>    :type 'integer)
>  
> +(defcustom org-habit-always-show-time nil
> +  "Non-nil means always show the time of day designation from the
> +timestamp, even if the habit is past its due date.
> +Setting this to t is useful if you regard the time of day
> +designation in some of your habits' scheduled timestamps as a
> +guide to when to do the habit, rather than only a time after
> +which the habit is due."
> +  :group 'org-habit
> +  :type 'boolean)
> +
>  (defface org-habit-clear-face
>    '((((background light)) (:background "#8270f9"))
>      (((background dark)) (:background "blue")))
> -- 
> 2.17.1
> 
> 

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

* Re: org-habit: allow overriding org-scheduled-past-days and always including time of day
  2018-11-05  0:31 org-habit: allow overriding org-scheduled-past-days and always including time of day John Lee
  2018-11-05 13:01 ` [PATCH] " John Lee
@ 2018-11-18 23:40 ` Nicolas Goaziou
  2019-02-02 18:50   ` John Lee
  2019-02-03 15:53   ` John Lee
  1 sibling, 2 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2018-11-18 23:40 UTC (permalink / raw)
  To: John Lee; +Cc: emacs-orgmode

Hello,

John Lee <jjl@pobox.com> writes:

> Here's a couple of patches that add new org-habit variables.  I hope
> the variable documentation describes them sufficiently: if not I need
> to change the docs so if you review these patches please read the
> patch before the rest of this email so that you're not "cheating"!

Thank you. Some comments follow.

> My own workflow around this is similar to GTD, so I'm using SCHEDULED
> as basically a way to get TODO items to show up after the scheduled
> date, not to show up in the calendar except as a reminder that I have
> new TODOs. For that reason I set org-scheduled-past-days to a low
> value (3 right now). I also set org-agenda-todo-ignore-scheduled to
> 'future and org-agenda-tags-todo-honor-ignore-options to t (not
> directly relevant here except as context). For habits that causes
> habits not to show up sometimes because of the short
> org-scheduled-past-days, which isn't appropriate for my habits: if
> I say .+5d, I still want to see the habit there if it's due, even if
> it's been 4 days since the last done date (which is more than the
> 3 days of org-scheduled-past-days). This motivates
> `org-habit-scheduled-past-days'.

It sounds reasonable.

> Similarly, since I want to do some of my habits at a particular time
> of day, org-agenda's omitting of the time of day from the scheduled
> timestamp if this is a "repeat" (i.e. I missed doing the habit) is
> unhelpful for habits, because now I have to scan though a long-ish
> list of habits (5 or 10 right now!) and think "is now the right time,
> should I have done that already?" for every habit in the list, rather
> than just eyeballing it to see which ones are around now in time. This
> motivates `org-habit-always-show-time'.

It sounds good too. However, I wonder if that shouldn't be the default.
Hiding the time for a missed scheduled item hadn't the habits in mind
(see http://lists.gnu.org/archive/html/emacs-orgmode/2016-11/msg00539.html).

To put it differently, is there any workflow wanting to hide the time
for habits in this case?

> I have not yet submitted the FSF copyright assignment form but am
> prepared to do so.

This can go as a TINYCHANGE (you need to put that string at the end of
the commit messages).

However, if you plan to be able to provide more code to Org, I suggest
starting the copyright assignment nonetheless.

> * lisp/org-habit.el: Add new variable `org-habit-scheduled-past-days'
>   to allow overriding `org-scheduled-past-days' for habits

It should simply be:

* lisp/org-habit.el (org-habit-scheduled-past-days): New variable.

>  	    (when (or (and (> ddays 0) (< diff ddays))
> -		      (> diff org-scheduled-past-days)
> +		      (> diff (if habitp
> +				  (or org-habit-scheduled-past-days
> +				      org-scheduled-past-days)
> +				org-scheduled-past-days))

Nitpick:

    (or (and habitp org-habit-scheduled-past-days)
        org-scheduled-past-days)

> +(defcustom org-habit-scheduled-past-days nil
> +  "Non-nil means the value of this variable will be used instead
> +of org-scheduled-past-days, for habits only.

First line needs to be a full sentence. Also,

  `org-scheduled-past-days'

> +Setting this to say 10000 is a way to make habits always show up
> +as a reminder, even if you set org-scheduled-past-days to a small

Ditto: `org-scheduled-past-days'.

> +value because you regard SCHEDULED items as a way of 'turning on'

scheduled items

"turning on"

> +TODO items on a particular date, rather than as a means of
> +creating calendar-based reminders."

as a mean of...

> +  :group 'org-habit
> +  :type 'integer)

You need to add :package-version and :safe keywords.

> * lisp/org-habit.el: Add new variable `org-habit-always-show-time'
>   to force always showing the time of day

See above.

> * lisp/org-agenda.el (org-agenda-get-scheduled): honour
>   `org-habit-always-show-time`
> ---
>  lisp/org-agenda.el | 12 +++++++++---
>  lisp/org-habit.el  | 10 ++++++++++
>  2 files changed, 19 insertions(+), 3 deletions(-)
>
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index e2bd5cc2d..08e286730 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -6253,9 +6253,15 @@ scheduled items with an hour specification like [h]h:mm."
>  		   (head (buffer-substring (point) (line-end-position)))
>  		   (time
>  		    (cond
> -		     ;; No time of day designation if it is only
> -		     ;; a reminder.
> -		     ((and (/= current schedule) (/= current repeat)) nil)
> +		     ;; No time of day designation if it is only a
> +		     ;; reminder (unless org-habit-always-show-time
> +		     ;; forces display of the time of day
> +		     ;; designation).
> +		     ((and
> +		       (not (and habitp org-habit-always-show-time))
> +		       (/= current schedule)
> +		       (/= current repeat))
> +		      nil)

Per my suggestion, maybe (and (not habitp) ...) would be enough. WDYT?

> +(defcustom org-habit-always-show-time nil
> +  "Non-nil means always show the time of day designation from the
> +timestamp, even if the habit is past its due date.
> +Setting this to t is useful if you regard the time of day
> +designation in some of your habits' scheduled timestamps as a
> +guide to when to do the habit, rather than only a time after
> +which the habit is due."
> +  :group 'org-habit
> +  :type 'boolean)

If we keep this variable, please see suggestions above.

Regards,

-- 
Nicolas Goaziou

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

* Re: org-habit: allow overriding org-scheduled-past-days and always including time of day
  2018-11-18 23:40 ` Nicolas Goaziou
@ 2019-02-02 18:50   ` John Lee
  2019-02-02 21:45     ` Nicolas Goaziou
  2019-02-03 15:53   ` John Lee
  1 sibling, 1 reply; 6+ messages in thread
From: John Lee @ 2019-02-02 18:50 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

On Sun, 18 Nov 2018, at 23:40, Nicolas Goaziou wrote:
> Hello,

Hi, sorry Nicolas I totally missed your review comments!

> John Lee <jjl@pobox.com> writes:

For context since it's months ago now:

> > My own workflow around this is similar to GTD, so I'm using SCHEDULED
> > as basically a way to get TODO items to show up after the scheduled
> > date, not to show up in the calendar except as a reminder that I have
> > new TODOs. For that reason I set org-scheduled-past-days to a low
> > value (3 right now). I also set org-agenda-todo-ignore-scheduled to
> > 'future and org-agenda-tags-todo-honor-ignore-options to t (not
> > directly relevant here except as context). For habits that causes
> > habits not to show up sometimes because of the short
> > org-scheduled-past-days, which isn't appropriate for my habits: if
> > I say .+5d, I still want to see the habit there if it's due, even if
> > it's been 4 days since the last done date (which is more than the
> > 3 days of org-scheduled-past-days). This motivates
> > `org-habit-scheduled-past-days'.
> 
> It sounds reasonable.
> 
> > Similarly, since I want to do some of my habits at a particular time
> > of day, org-agenda's omitting of the time of day from the scheduled
> > timestamp if this is a "repeat" (i.e. I missed doing the habit) is
> > unhelpful for habits, because now I have to scan though a long-ish
> > list of habits (5 or 10 right now!) and think "is now the right time,
> > should I have done that already?" for every habit in the list, rather
> > than just eyeballing it to see which ones are around now in time. This
> > motivates `org-habit-always-show-time'.
> 
> It sounds good too. However, I wonder if that shouldn't be the default.
> Hiding the time for a missed scheduled item hadn't the habits in mind
> (see http://lists.gnu.org/archive/html/emacs-orgmode/2016-11/msg00539.html).
> 
> To put it differently, is there any workflow wanting to hide the time
> for habits in this case?

I don't know.  There's always somebody :-)  Perhaps nobody has filed an issue before because some people find the current behaviour useful -- but perhaps it's only because nobody uses times for habits, maybe because of this very issue.

Trying hard to make up a reason for utility of the current behaviour: let's say your habits tend to be weekly and have an optimum time and weekday, but if you miss them it's just "as soon as possible".  But if anybody actually does see their habits that way, that would seem likely to vary by habit.  So I'd be surprised if the current behaviour was very useful.

Shall I make it the default, then?


> > I have not yet submitted the FSF copyright assignment form but am
> > prepared to do so.
> 
> This can go as a TINYCHANGE (you need to put that string at the end of
> the commit messages).
> 
> However, if you plan to be able to provide more code to Org, I suggest
> starting the copyright assignment nonetheless.

Thank you.  Right now I have one other change I'd like to submit which is also tiny, do I need to start the assignment process?


> > +(defcustom org-habit-scheduled-past-days nil
> > +  "Non-nil means the value of this variable will be used instead
> > +of org-scheduled-past-days, for habits only.
> 
> First line needs to be a full sentence. Also,

To me it looks like a full sentence?  Should it be something like this below (based on looking at other docstrings)?

"Value to use instead of `org-scheduled-past-days', for habits only.

If nil, `org-scheduled-past-days' is used."


> > +TODO items on a particular date, rather than as a means of
> > +creating calendar-based reminders."
> 
> as a mean of...

I think "as a mean of" is not correct English (I'm a native speaker in the UK).


> > +  :group 'org-habit
> > +  :type 'integer)
> 
> You need to add :package-version and :safe keywords.

Presumably I should use the version from the highest current git tag "plus one", i.e. 9.3?

    :package-version '(Org . "9.3")


Thanks for your comments

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

* Re: org-habit: allow overriding org-scheduled-past-days and always including time of day
  2019-02-02 18:50   ` John Lee
@ 2019-02-02 21:45     ` Nicolas Goaziou
  0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2019-02-02 21:45 UTC (permalink / raw)
  To: John Lee; +Cc: emacs-orgmode

Hello,

John Lee <jjl@pobox.com> writes:

> Hi, sorry Nicolas I totally missed your review comments!

No problem.

> Trying hard to make up a reason for utility of the current behaviour:
> let's say your habits tend to be weekly and have an optimum time and
> weekday, but if you miss them it's just "as soon as possible". But if
> anybody actually does see their habits that way, that would seem
> likely to vary by habit. So I'd be surprised if the current behaviour
> was very useful.
>
> Shall I make it the default, then?

I think so.

> Thank you. Right now I have one other change I'd like to submit which
> is also tiny, do I need to start the assignment process?

If both changes do not add up to around 15 non-trivial locs, that's
fine.

>> > +(defcustom org-habit-scheduled-past-days nil
>> > +  "Non-nil means the value of this variable will be used instead
>> > +of org-scheduled-past-days, for habits only.
>> 
>> First line needs to be a full sentence. Also,
>
> To me it looks like a full sentence?

What I meant is the first line should contain only full sentences. Yours
spans over two lines.

> Should it be something like this below (based on looking at other docstrings)?
>
> "Value to use instead of `org-scheduled-past-days', for habits only.
>
> If nil, `org-scheduled-past-days' is used."

That's better, indeed.

> I think "as a mean of" is not correct English (I'm a native speaker in
> the UK).

Of course, you're right. Sorry for the noise.

> Presumably I should use the version from the highest current git tag "plus one", i.e. 9.3?
>
>     :package-version '(Org . "9.3")

That's correct.

Regards,

-- 
Nicolas Goaziou

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

* Re: org-habit: allow overriding org-scheduled-past-days and always including time of day
  2018-11-18 23:40 ` Nicolas Goaziou
  2019-02-02 18:50   ` John Lee
@ 2019-02-03 15:53   ` John Lee
  1 sibling, 0 replies; 6+ messages in thread
From: John Lee @ 2019-02-03 15:53 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

On Sun, 18 Nov 2018, at 23:40, Nicolas Goaziou wrote:
> * lisp/org-habit.el (org-habit-scheduled-past-days): New variable.
> 
> >  	    (when (or (and (> ddays 0) (< diff ddays))
> > -		      (> diff org-scheduled-past-days)
> > +		      (> diff (if habitp
> > +				  (or org-habit-scheduled-past-days
> > +				      org-scheduled-past-days)
> > +				org-scheduled-past-days))
> 
> Nitpick:
> 
>     (or (and habitp org-habit-scheduled-past-days)
>         org-scheduled-past-days)

Oops, I just remembered that 0 is not "falsy" in elisp.  So I'll make this change after all and submit that first patch again, again...

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

end of thread, other threads:[~2019-02-03 15:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-05  0:31 org-habit: allow overriding org-scheduled-past-days and always including time of day John Lee
2018-11-05 13:01 ` [PATCH] " John Lee
2018-11-18 23:40 ` Nicolas Goaziou
2019-02-02 18:50   ` John Lee
2019-02-02 21:45     ` Nicolas Goaziou
2019-02-03 15:53   ` John Lee

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