emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: org-habit treats all repeat tasks as ".+" type [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]
@ 2015-03-03  8:27 何利勇
  2015-03-06 11:05 ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: 何利勇 @ 2015-03-03  8:27 UTC (permalink / raw)
  To: emacs-orgmode

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

It looks like org-habit only handle the ".+" repeater correctly, though
the document says it supports ".+", "++" and "+".

For example, when create agenda for the following org content.

* TODO Test_+
SCHEDULED: <2015-03-02 Mon +1w>
- State "DONE"       from "TODO"  [2015-02-23 Mon 10:56]
- State "DONE"       from "TODO"  [2015-02-16 Mon 10:56]
- State "DONE"       from "TODO"  [2015-02-10 Tue 10:56]
- State "DONE"       from "READY" [2015-02-02 Mon 10:56]
:PROPERTIES:
:STYLE:    habit
:LAST_REPEAT: [2015-02-23 Mon 10:56]
:ID:       e960c39e-4f92-4ef0-a5ee-a4d3fcfd26bf
:END:

* TODO Test_++
SCHEDULED: <2015-03-02 Mon ++1w>
- State "DONE"       from "TODO"  [2015-02-23 Mon 10:56]
- State "DONE"       from "TODO"  [2015-02-15 Sun 10:56]
- State "DONE"       from "READY" [2015-02-02 Mon 10:56]
:PROPERTIES:
:STYLE:    habit
:LAST_REPEAT: [2015-02-23 Mon 10:56]
:END:

The Test_+ was marked as DONE one day after 02-09 (did not finish on time)
and Test_++ missed the 02-09 schedule. But the subsequent schedules are
DONE on time.

So, I expect there should be one red for each bar.

But in fact, it mark the DONE on 02-16 of Test_+ as blue and the DONE
on 02-23 of Test_++ as red, which should only happen when using ".+" --
the subsequent schedule will be shifted n day/week/month after the last
repeat.

http://imgur.com/Cvh0Xxb

------------------------------------------------------------------------



Emacs  : GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7)
 of 2014-03-08 on lamiak, modified by Debian
Package: Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef @
/usr/share/emacs/24.3/lisp/org/)

current state:
==============
(setq
 org-export-preprocess-before-selecting-backend-code-hook
'(org-beamer-select-beamer-code)
 org-tab-first-hook '(org-hide-block-toggle-maybe
              org-src-native-tab-command-maybe
              org-babel-hide-result-toggle-maybe
              org-babel-header-arg-expand)
 org-habit-preceding-days 30
 org-speed-command-hook '(org-speed-command-default-hook
              org-babel-speed-command-hook)
 org-edit-timestamp-down-means-later t
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-agenda-start-on-weekday nil
 org-export-preprocess-before-normalizing-links-hook
'(org-remove-file-link-modifiers)
 org-log-done t
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
                   org-beamer-auto-fragile-frames
                   org-beamer-place-default-actions-for-lists)
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-habit-following-days 3
 org-agenda-include-diary t
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
             org-src-mode-configure-edit-buffer)
 org-tags-column 80
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207"
           [org-add-hook change-major-mode-hook org-show-block-all
            append local]
           5]
         #[nil "\300\301\302\303\304$\207"
           [org-add-hook change-major-mode-hook
            org-babel-show-result-all append local]
           5]
         org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
              org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
          org-cycle-show-empty-lines
          org-optimize-window-after-visibility-change)
 org-habit-show-habits-only-for-today nil
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-export-blocks '((src org-babel-exp-src-block nil)
             (export-comment org-export-blocks-format-comment t)
             (ditaa org-export-blocks-format-ditaa nil)
             (dot org-export-blocks-format-dot nil))
 org-agenda-tags-column -30
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-export-interblocks '((src org-babel-exp-non-block-elements))
 org-modules '("org-habit" org-bbdb org-bibtex org-docview org-gnus org-info
           org-jsinfo org-irc org-mew org-mhe org-rmail org-vm org-w3m
           org-wl)
 org-fast-tag-selection-single-key 'expert
 org-agenda-window-setup 'current-window
 org-agenda-span 14
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-completion-use-ido t
 org-export-kill-product-buffer-when-displayed t
 org-habit-graph-column 30
 org-agenda-files '("~/Dropbox/notes/TODOList.org")
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )

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

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

* Re: Bug: org-habit treats all repeat tasks as ".+" type [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]
  2015-03-03  8:27 Bug: org-habit treats all repeat tasks as ".+" type [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)] 何利勇
@ 2015-03-06 11:05 ` Nicolas Goaziou
  2015-03-07  6:29   ` Leo He
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2015-03-06 11:05 UTC (permalink / raw)
  To: 何利勇; +Cc: emacs-orgmode

Hello,

何利勇 <leodream2008@gmail.com> writes:

> It looks like org-habit only handle the ".+" repeater correctly, though
> the document says it supports ".+", "++" and "+".
>
> For example, when create agenda for the following org content.
>
> * TODO Test_+
> SCHEDULED: <2015-03-02 Mon +1w>
> - State "DONE"       from "TODO"  [2015-02-23 Mon 10:56]
> - State "DONE"       from "TODO"  [2015-02-16 Mon 10:56]
> - State "DONE"       from "TODO"  [2015-02-10 Tue 10:56]
> - State "DONE"       from "READY" [2015-02-02 Mon 10:56]
> :PROPERTIES:
> :STYLE:    habit
> :LAST_REPEAT: [2015-02-23 Mon 10:56]
> :ID:       e960c39e-4f92-4ef0-a5ee-a4d3fcfd26bf
> :END:
>
> * TODO Test_++
> SCHEDULED: <2015-03-02 Mon ++1w>
> - State "DONE"       from "TODO"  [2015-02-23 Mon 10:56]
> - State "DONE"       from "TODO"  [2015-02-15 Sun 10:56]
> - State "DONE"       from "READY" [2015-02-02 Mon 10:56]
> :PROPERTIES:
> :STYLE:    habit
> :LAST_REPEAT: [2015-02-23 Mon 10:56]
> :END:

I don't think this bug still exists in a recent Org. Could you update
Org (preferably to development version) and test it again?

Note that in development version, entries above are somewhat invalid
because properties drawer must be located just after "SCHEDULED" line.

Thank you.


Regards,

-- 
Nicolas Goaziou

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

* Re: Bug: org-habit treats all repeat tasks as ".+" type [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]
  2015-03-06 11:05 ` Nicolas Goaziou
@ 2015-03-07  6:29   ` Leo He
  2015-03-07 19:34     ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Leo He @ 2015-03-07  6:29 UTC (permalink / raw)
  To: emacs-orgmode, kuangdash

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

Thanks for your help, Nicolas and kungdash.
I've tried both 8.2.10 (installing via elpa) and the git repository
(8.3-beta and master branches), but still the same.

I also tried with putting those DONE logs after the properties, but nothing
change.

On 6 March 2015 at 19:05, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:

> Hello,
>
> 何利勇 <leodream2008@gmail.com> writes:
>
> > It looks like org-habit only handle the ".+" repeater correctly, though
> > the document says it supports ".+", "++" and "+".
> >
> > For example, when create agenda for the following org content.
> >
> > * TODO Test_+
> > SCHEDULED: <2015-03-02 Mon +1w>
> > - State "DONE"       from "TODO"  [2015-02-23 Mon 10:56]
> > - State "DONE"       from "TODO"  [2015-02-16 Mon 10:56]
> > - State "DONE"       from "TODO"  [2015-02-10 Tue 10:56]
> > - State "DONE"       from "READY" [2015-02-02 Mon 10:56]
> > :PROPERTIES:
> > :STYLE:    habit
> > :LAST_REPEAT: [2015-02-23 Mon 10:56]
> > :ID:       e960c39e-4f92-4ef0-a5ee-a4d3fcfd26bf
> > :END:
> >
> > * TODO Test_++
> > SCHEDULED: <2015-03-02 Mon ++1w>
> > - State "DONE"       from "TODO"  [2015-02-23 Mon 10:56]
> > - State "DONE"       from "TODO"  [2015-02-15 Sun 10:56]
> > - State "DONE"       from "READY" [2015-02-02 Mon 10:56]
> > :PROPERTIES:
> > :STYLE:    habit
> > :LAST_REPEAT: [2015-02-23 Mon 10:56]
> > :END:
>
> I don't think this bug still exists in a recent Org. Could you update
> Org (preferably to development version) and test it again?
>
> Note that in development version, entries above are somewhat invalid
> because properties drawer must be located just after "SCHEDULED" line.
>
> Thank you.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>

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

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

* Re: Bug: org-habit treats all repeat tasks as ".+" type [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]
  2015-03-07  6:29   ` Leo He
@ 2015-03-07 19:34     ` Nicolas Goaziou
  2015-03-08  5:52       ` Leo He
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2015-03-07 19:34 UTC (permalink / raw)
  To: Leo He; +Cc: kuangdash, emacs-orgmode

Leo He <leodream2008@gmail.com> writes:

> Thanks for your help, Nicolas and kungdash.
> I've tried both 8.2.10 (installing via elpa) and the git repository
> (8.3-beta and master branches), but still the same.

I misunderstood the initial problem. This should be fixed in master.
Thank you.

> * TODO Test_++
> SCHEDULED: <2015-03-02 Mon ++1w>
> - State "DONE"       from "TODO"  [2015-02-23 Mon 10:56]
> - State "DONE"       from "TODO"  [2015-02-15 Sun 10:56]
> - State "DONE"       from "READY" [2015-02-02 Mon 10:56]
> :PROPERTIES:
> :STYLE:    habit
> :LAST_REPEAT: [2015-02-23 Mon 10:56]
> :END:
> 
> The Test_+ was marked as DONE one day after 02-09 (did not finish on time)
> and Test_++ missed the 02-09 schedule. But the subsequent schedules are
> DONE on time.

This is not quite true. In the case above, second done stamp bumped
scheduled to 2015-02-16 so last done came one week late.


Regards,

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

* Re: Bug: org-habit treats all repeat tasks as ".+" type [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]
  2015-03-07 19:34     ` Nicolas Goaziou
@ 2015-03-08  5:52       ` Leo He
  2015-03-08 16:58         ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Leo He @ 2015-03-08  5:52 UTC (permalink / raw)
  To: Leo He, emacs-orgmode, kuangdash

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

Thank you, Nicolas. I checked out the latest commits on master. It works.

On the other hand, I am writing a shell script to move each entry's
PROPERTIES drawer to its beginning. Though I think elisp can handle this
more easily, I am not familiar with it (still learning :-) ). I wonder if
there is an existing function or script to do this.

Thanks,

On 8 March 2015 at 03:34, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:

> Leo He <leodream2008@gmail.com> writes:
>
> > Thanks for your help, Nicolas and kungdash.
> > I've tried both 8.2.10 (installing via elpa) and the git repository
> > (8.3-beta and master branches), but still the same.
>
> I misunderstood the initial problem. This should be fixed in master.
> Thank you.
>
> > * TODO Test_++
> > SCHEDULED: <2015-03-02 Mon ++1w>
> > - State "DONE"       from "TODO"  [2015-02-23 Mon 10:56]
> > - State "DONE"       from "TODO"  [2015-02-15 Sun 10:56]
> > - State "DONE"       from "READY" [2015-02-02 Mon 10:56]
> > :PROPERTIES:
> > :STYLE:    habit
> > :LAST_REPEAT: [2015-02-23 Mon 10:56]
> > :END:
> >
> > The Test_+ was marked as DONE one day after 02-09 (did not finish on
> time)
> > and Test_++ missed the 02-09 schedule. But the subsequent schedules are
> > DONE on time.
>
> This is not quite true. In the case above, second done stamp bumped
> scheduled to 2015-02-16 so last done came one week late.
>
>
> Regards,
>

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

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

* Re: Bug: org-habit treats all repeat tasks as ".+" type [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]
  2015-03-08  5:52       ` Leo He
@ 2015-03-08 16:58         ` Nicolas Goaziou
  0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2015-03-08 16:58 UTC (permalink / raw)
  To: Leo He; +Cc: kuangdash, emacs-orgmode

Leo He <leodream2008@gmail.com> writes:

> On the other hand, I am writing a shell script to move each entry's
> PROPERTIES drawer to its beginning. Though I think elisp can handle this
> more easily, I am not familiar with it (still learning :-) ). I wonder if
> there is an existing function or script to do this.

See ORG-NEWS document in the development version. There's a function
called `org-repair-property-drawers'.

Regards,

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

end of thread, other threads:[~2015-03-08 16:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-03  8:27 Bug: org-habit treats all repeat tasks as ".+" type [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)] 何利勇
2015-03-06 11:05 ` Nicolas Goaziou
2015-03-07  6:29   ` Leo He
2015-03-07 19:34     ` Nicolas Goaziou
2015-03-08  5:52       ` Leo He
2015-03-08 16:58         ` Nicolas Goaziou

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