all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Marking items done in the past
@ 2014-08-18  0:52 Noah Slater
  2014-08-21 22:40 ` Noah Slater
  2014-09-13 15:24 ` Karl Voit
  0 siblings, 2 replies; 8+ messages in thread
From: Noah Slater @ 2014-08-18  0:52 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I have a number of habits set up that I regularly fill in the day
after the activity was done. Is there a way to mark an item as done
(in a way that hooks into the habits stuff) but for a day in the past?

So instead of doing C-c C-t d (I have "d" set up as "DONE") I could
get a prompt which asked me for a date.

Something like that anyway.

Thanks,

-- 
Noah Slater
https://twitter.com/nslater

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

* Re: Marking items done in the past
  2014-08-18  0:52 Marking items done in the past Noah Slater
@ 2014-08-21 22:40 ` Noah Slater
  2014-09-02 20:42   ` Fletcher Charest
  2014-09-13 15:24 ` Karl Voit
  1 sibling, 1 reply; 8+ messages in thread
From: Noah Slater @ 2014-08-21 22:40 UTC (permalink / raw)
  To: Noah Slater; +Cc: emacs-orgmode

I have posted this to StackOverflow, if someone wants to grab the karma:

http://stackoverflow.com/questions/25437069/

On 18 August 2014 02:52, Noah Slater <nslater@apache.org> wrote:
> Hello,
>
> I have a number of habits set up that I regularly fill in the day
> after the activity was done. Is there a way to mark an item as done
> (in a way that hooks into the habits stuff) but for a day in the past?
>
> So instead of doing C-c C-t d (I have "d" set up as "DONE") I could
> get a prompt which asked me for a date.
>
> Something like that anyway.
>
> Thanks,
>
> --
> Noah Slater
> https://twitter.com/nslater



-- 
Noah Slater
https://twitter.com/nslater

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

* Re: Marking items done in the past
  2014-08-21 22:40 ` Noah Slater
@ 2014-09-02 20:42   ` Fletcher Charest
  2014-09-02 23:11     ` Jorge A. Alfaro-Murillo
  0 siblings, 1 reply; 8+ messages in thread
From: Fletcher Charest @ 2014-09-02 20:42 UTC (permalink / raw)
  To: Noah Slater; +Cc: emacs-orgmode

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

Hi,

Have you made any progress? I am also interested.

FC


On Fri, Aug 22, 2014 at 12:40 AM, Noah Slater <nslater@apache.org> wrote:

> I have posted this to StackOverflow, if someone wants to grab the karma:
>
> http://stackoverflow.com/questions/25437069/
>
> On 18 August 2014 02:52, Noah Slater <nslater@apache.org> wrote:
> > Hello,
> >
> > I have a number of habits set up that I regularly fill in the day
> > after the activity was done. Is there a way to mark an item as done
> > (in a way that hooks into the habits stuff) but for a day in the past?
> >
> > So instead of doing C-c C-t d (I have "d" set up as "DONE") I could
> > get a prompt which asked me for a date.
> >
> > Something like that anyway.
> >
> > Thanks,
> >
> > --
> > Noah Slater
> > https://twitter.com/nslater
>
>
>
> --
> Noah Slater
> https://twitter.com/nslater
>
>

[-- Attachment #2: Type: text/html, Size: 1617 bytes --]

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

* Re: Marking items done in the past
  2014-09-02 20:42   ` Fletcher Charest
@ 2014-09-02 23:11     ` Jorge A. Alfaro-Murillo
  0 siblings, 0 replies; 8+ messages in thread
From: Jorge A. Alfaro-Murillo @ 2014-09-02 23:11 UTC (permalink / raw)
  To: emacs-orgmode

Fletcher Charest writes: 

> Have you made any progress? I am also interested. 

Me too.
 
> On 18 August 2014 02:52, Noah Slater <nslater@apache.org> wrote: 
>> I have a number of habits set up that I regularly fill in the 
>> day after the activity was done. Is there a way to mark an item 
>> as done (in a way that hooks into the habits stuff) but for a 
>> day in the past? 
>> 
>> So instead of doing C-c C-t d (I have "d" set up as "DONE") I 
>> could get a prompt which asked me for a date. 
>> 

Changing the LOGBOOK, and LAST_REPEAT would not be that difficult, 
since you could use something like:

#+BEGIN_SRC emacs-lisp
  (org-entry-put nil "LAST_REPEAT" (concat "[" (org-read-date) 
  "]")) 
#+END_SRC

But changing the SCHEDULED and the 'State "DONE" from "TODO"' part 
would be more complicated. For example I think one would need to 
modify the function org-auto-repeat-maybe to be able to ask for a 
time. Checking at the code of this function the SCHEDULED part 
doesn't look that complicated, but I couldn't understand what 
produces the 'State "DONE" from "TODO"'

Does any of the org-gurus have an idea?

Best,

-- 
Jorge.

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

* Re: Marking items done in the past
  2014-08-18  0:52 Marking items done in the past Noah Slater
  2014-08-21 22:40 ` Noah Slater
@ 2014-09-13 15:24 ` Karl Voit
  2014-12-07 23:13   ` Org-todo-yesterday broken? Nikolay Kudryavtsev
  1 sibling, 1 reply; 8+ messages in thread
From: Karl Voit @ 2014-09-13 15:24 UTC (permalink / raw)
  To: emacs-orgmode

* Noah Slater <nslater@apache.org> wrote:
> Hello,
>
> I have a number of habits set up that I regularly fill in the day
> after the activity was done. Is there a way to mark an item as done
> (in a way that hooks into the habits stuff) but for a day in the past?

How about org-(agenda-)todo-yesterday ?

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

* Org-todo-yesterday broken?
  2014-09-13 15:24 ` Karl Voit
@ 2014-12-07 23:13   ` Nikolay Kudryavtsev
  2014-12-08  0:49     ` Kyle Meyer
  0 siblings, 1 reply; 8+ messages in thread
From: Nikolay Kudryavtsev @ 2014-12-07 23:13 UTC (permalink / raw)
  To: emacs-orgmode

Hello.

org-todo-yesterday and org-agenda-todo-yesterday do not seem to work in 
all recent versions of org that I've tried.

Also is there a version of them that allows to input a custom date?

-- 
Best Regards,
Nikolay Kudryavtsev

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

* Re: Org-todo-yesterday broken?
  2014-12-07 23:13   ` Org-todo-yesterday broken? Nikolay Kudryavtsev
@ 2014-12-08  0:49     ` Kyle Meyer
  2014-12-09  9:27       ` Nicolas Goaziou
  0 siblings, 1 reply; 8+ messages in thread
From: Kyle Meyer @ 2014-12-08  0:49 UTC (permalink / raw)
  To: Nikolay Kudryavtsev; +Cc: emacs-orgmode

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

Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com> wrote:
> org-todo-yesterday and org-agenda-todo-yesterday do not seem to work
> in all recent versions of org that I've tried.

I'd guess this is because org-use-effective-time is set to nil (based on
this previous issue [1]).  Setting it to non-nil should work, but I
think org-todo-yesterday and org-agenda-todo-yesterday should override
this, as in the attached patch.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-todo-yesterday-Ignore-org-use-effective-time.patch --]
[-- Type: text/x-diff, Size: 1839 bytes --]

From 10e5dfb5854473fa97b8299a0f059c233c349ef1 Mon Sep 17 00:00:00 2001
From: Kyle Meyer <kyle@kyleam.com>
Date: Sun, 7 Dec 2014 19:21:42 -0500
Subject: [PATCH 1/1] org-todo-yesterday: Ignore org-use-effective-time

* lisp/org.el (org-todo-yesterday): Ignore global org-use-effective-time
value.

* lisp/org-agenda.el (org-agenda-todo-yesterday): Ignore global
org-use-effective-time value.

Otherwise, if org-use-effective-time being nil, org-extend-today-until
will not be considered, resulting in the current time being used instead
of 23:59 yesterday.

Reported-by: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/93224>
---
 lisp/org-agenda.el | 3 ++-
 lisp/org.el        | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index b2e54e6..5990bbb 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -10143,7 +10143,8 @@ (defun org-agenda-todayp (date)
 (defun org-agenda-todo-yesterday (&optional arg)
   "Like `org-agenda-todo' but the time of change will be 23:59 of yesterday."
   (interactive "P")
-  (let* ((hour (third (decode-time
+  (let* ((org-use-effective-time t)
+	 (hour (third (decode-time
                        (org-current-time))))
          (org-extend-today-until (1+ hour)))
     (org-agenda-todo arg)))
diff --git a/lisp/org.el b/lisp/org.el
index 142407c..22a0c17 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12469,7 +12469,8 @@ (defun org-todo-yesterday (&optional arg)
   (interactive "P")
   (if (eq major-mode 'org-agenda-mode)
       (apply 'org-agenda-todo-yesterday arg)
-    (let* ((hour (third (decode-time
+    (let* ((org-use-effective-time t)
+	   (hour (third (decode-time
 			 (org-current-time))))
 	   (org-extend-today-until (1+ hour)))
       (org-todo arg))))
-- 
2.1.3


[-- Attachment #3: Type: text/plain, Size: 86 bytes --]


[1] https://lists.gnu.org/archive/html/emacs-orgmode/2011-11/msg00320.html

-- 
Kyle

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

* Re: Org-todo-yesterday broken?
  2014-12-08  0:49     ` Kyle Meyer
@ 2014-12-09  9:27       ` Nicolas Goaziou
  0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Goaziou @ 2014-12-09  9:27 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: emacs-orgmode, Nikolay Kudryavtsev

Hello,

Kyle Meyer <kyle@kyleam.com> writes:

> I'd guess this is because org-use-effective-time is set to nil (based on
> this previous issue [1]).  Setting it to non-nil should work, but I
> think org-todo-yesterday and org-agenda-todo-yesterday should override
> this, as in the attached patch.

Applied. Thank you.


Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2014-12-09  9:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-18  0:52 Marking items done in the past Noah Slater
2014-08-21 22:40 ` Noah Slater
2014-09-02 20:42   ` Fletcher Charest
2014-09-02 23:11     ` Jorge A. Alfaro-Murillo
2014-09-13 15:24 ` Karl Voit
2014-12-07 23:13   ` Org-todo-yesterday broken? Nikolay Kudryavtsev
2014-12-08  0:49     ` Kyle Meyer
2014-12-09  9:27       ` Nicolas Goaziou

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.