* Problem with hourly repeater
@ 2012-10-08 14:37 Memnon Anon
2012-10-10 14:14 ` Nicolas Goaziou
2012-10-10 14:44 ` Martin Pohlack
0 siblings, 2 replies; 6+ messages in thread
From: Memnon Anon @ 2012-10-08 14:37 UTC (permalink / raw)
To: emacs-orgmode
Hi,
I am trying the hourly repeaters and see a problem.
Steps to reproduce:
* "emacs -Q"
* load minimal setup:
--8<---------------cut here---------------start------------->8---
;;; adjust path as needed!
(setq load-path (cons "~/org-mode/lisp" load-path))
(setq load-path (cons "~/org-mode/contrib/lisp" load-path))
(setq load-path (cons "~/org-mode/contrib/babel/lisp" load-path))
(require 'org)
(setq org-clock-persist t)
(org-clock-persistence-insinuate)
(setq org-clock-history-length 50
org-clock-in-switch-to-state "STRT"
org-clock-idle-time 5
org-log-done 'time
org-log-reschedule 'time
org-log-into-drawer "LOGBOOK")
(setq org-agenda-files (quote ("~/agenda.org")))
(setq debug-on-error t)
--8<---------------cut here---------------end--------------->8---
* Minimal agenda file ~/agenda.org:
--8<---------------cut here---------------start------------->8---
#+SEQ_TODO: TODO STRT | DONE DEFD CNCL
* TODO Test
Scheduled: <2012-10-08 Mo 18:00 +6h>
--8<---------------cut here---------------end--------------->8---
* "M-x org-agenda" a ->
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p
nil)
[...]
This is with
Org-mode version 7.9.2 (release_7.9.2-424-g0ccf65 @
and
GNU Emacs 24.2.50.1 (i486-pc-linux-gnu, GTK+ Version 3.4.2) of
2012-10-04 on dex, modified by Debian
Anyone else see this?
Memnon
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem with hourly repeater
2012-10-08 14:37 Problem with hourly repeater Memnon Anon
@ 2012-10-10 14:14 ` Nicolas Goaziou
2012-10-19 10:19 ` Memnon Anon
2012-10-10 14:44 ` Martin Pohlack
1 sibling, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2012-10-10 14:14 UTC (permalink / raw)
To: Memnon Anon; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 337 bytes --]
Hello,
Memnon Anon <gegendosenfleisch@googlemail.com> writes:
> I am trying the hourly repeaters and see a problem.
[...]
> Anyone else see this?
Yes, I confirm the bug.
Would you mind testing the following patch and tell me if it fixes the
problem without adding unwanted side-effects?
Thank you.
Regards,
--
Nicolas Goaziou
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fix hour repeaters --]
[-- Type: text/x-patch, Size: 1575 bytes --]
From 3576891ba04992328576c1ea84a8958e4c0fa16c Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Wed, 10 Oct 2012 16:11:41 +0200
Subject: [PATCH] Fix bug related to agenda bulding with hour repeaters
* lisp/org.el: Make `org-closest-date' aware of hours repeaters.
---
lisp/org.el | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/lisp/org.el b/lisp/org.el
index 59683bc..c69f0f3 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -16157,7 +16157,12 @@ When PREFER is `future', return a date that is either CURRENT or future.
When SHOW-ALL is nil, only return the current occurrence of a time stamp."
;; Make the proper lists from the dates
(catch 'exit
- (let ((a1 '(("d" . day) ("w" . week) ("m" . month) ("y" . year)))
+ (let ((a1 '(("h" . hour)
+ ("d" . day)
+ ("w" . week)
+ ("m" . month)
+ ("y" . year)))
+ (shour (nth 2 (org-parse-time-string start)))
dn dw sday cday n1 n2 n0
d m y y1 y2 date1 date2 nmonths nm ny m2)
@@ -16177,6 +16182,11 @@ When SHOW-ALL is nil, only return the current occurrence of a time stamp."
(error "Invalid change specifier: %s" change))
(if (eq dw 'week) (setq dw 'day dn (* 7 dn)))
(cond
+ ((eq dw 'hour)
+ (let ((missing-hours (mod (- (* 24 (- cday sday)) shour) dn)))
+ (setq n1 (if (zerop missing-hours) cday
+ (- cday (1+ (floor (/ missing-hours 24)))))
+ n2 (+ cday (floor (/ (- dn missing-hours) 24))))))
((eq dw 'day)
(setq n1 (+ sday (* dn (floor (/ (- cday sday) dn))))
n2 (+ n1 dn)))
--
1.7.12.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: Problem with hourly repeater
2012-10-10 14:14 ` Nicolas Goaziou
@ 2012-10-19 10:19 ` Memnon Anon
0 siblings, 0 replies; 6+ messages in thread
From: Memnon Anon @ 2012-10-19 10:19 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
Hi Nicolas,
Nicolas Goaziou <n.goaziou@gmail.com> writes:
> Yes, I confirm the bug.
>
> Would you mind testing the following patch and tell me if it fixes the
> problem without adding unwanted side-effects?
I've been testing the patch for a couple of days now.
No unwanted side-effects as far as I can tell. The error is gone, too.
There are some other small issues with hourly repeaters, I will try to
sum them up soon.
Memnon
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem with hourly repeater
2012-10-08 14:37 Problem with hourly repeater Memnon Anon
2012-10-10 14:14 ` Nicolas Goaziou
@ 2012-10-10 14:44 ` Martin Pohlack
2012-10-10 15:00 ` Nicolas Goaziou
2012-10-10 15:04 ` Memnon Anon
1 sibling, 2 replies; 6+ messages in thread
From: Martin Pohlack @ 2012-10-10 14:44 UTC (permalink / raw)
To: Memnon Anon; +Cc: emacs-orgmode
Hi,
This has been discussed several times before and the conclusion was that
hourly repeaters are not supported:
http://www.mail-archive.com/emacs-orgmode@gnu.org/msg20032.html
http://www.mail-archive.com/emacs-orgmode@gnu.org/msg15142.html
On 08.10.2012 16:37, Memnon Anon wrote:
> Hi,
>
> I am trying the hourly repeaters and see a problem.
>
> Steps to reproduce:
> * "emacs -Q"
> * load minimal setup:
>
> --8<---------------cut here---------------start------------->8---
> ;;; adjust path as needed!
> (setq load-path (cons "~/org-mode/lisp" load-path))
> (setq load-path (cons "~/org-mode/contrib/lisp" load-path))
> (setq load-path (cons "~/org-mode/contrib/babel/lisp" load-path))
> (require 'org)
> (setq org-clock-persist t)
> (org-clock-persistence-insinuate)
> (setq org-clock-history-length 50
> org-clock-in-switch-to-state "STRT"
> org-clock-idle-time 5
> org-log-done 'time
> org-log-reschedule 'time
> org-log-into-drawer "LOGBOOK")
>
> (setq org-agenda-files (quote ("~/agenda.org")))
> (setq debug-on-error t)
> --8<---------------cut here---------------end--------------->8---
>
> * Minimal agenda file ~/agenda.org:
>
> --8<---------------cut here---------------start------------->8---
> #+SEQ_TODO: TODO STRT | DONE DEFD CNCL
>
> * TODO Test
> Scheduled: <2012-10-08 Mo 18:00 +6h>
> --8<---------------cut here---------------end--------------->8---
>
> * "M-x org-agenda" a ->
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p
> nil)
> [...]
>
> This is with
> Org-mode version 7.9.2 (release_7.9.2-424-g0ccf65 @
> and
> GNU Emacs 24.2.50.1 (i486-pc-linux-gnu, GTK+ Version 3.4.2) of
> 2012-10-04 on dex, modified by Debian
>
> Anyone else see this?
>
> Memnon
>
>
--
Martin Pohlack, AMD Operating System Research Center
martin.pohlack@amd.com, Tel. +49 351 448356721, www.amd64.org
Advanced Micro Devices GmbH, Einsteinring 24,
85609 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632, WEEE-Reg-Nr. DE 12919551
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem with hourly repeater
2012-10-10 14:44 ` Martin Pohlack
@ 2012-10-10 15:00 ` Nicolas Goaziou
2012-10-10 15:04 ` Memnon Anon
1 sibling, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2012-10-10 15:00 UTC (permalink / raw)
To: Martin Pohlack; +Cc: Memnon Anon, emacs-orgmode
Hello,
Martin Pohlack <mp26@os.inf.tu-dresden.de> writes:
> This has been discussed several times before and the conclusion was that
> hourly repeaters are not supported:
That's not true anymore since:
--8<---------------cut here---------------start------------->8---
commit ec921a2a68ccef8e2ae65195de4636c77c0b8a93
Author: Bastien Guerry <bzg@altern.org>
Date: Fri Apr 20 16:55:48 2012 +0200
Support hourly repeat cookies.
--8<---------------cut here---------------end--------------->8---
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem with hourly repeater
2012-10-10 14:44 ` Martin Pohlack
2012-10-10 15:00 ` Nicolas Goaziou
@ 2012-10-10 15:04 ` Memnon Anon
1 sibling, 0 replies; 6+ messages in thread
From: Memnon Anon @ 2012-10-10 15:04 UTC (permalink / raw)
To: emacs-orgmode
Martin Pohlack <mp26@os.inf.tu-dresden.de> writes:
> This has been discussed several times before and the conclusion was that
> hourly repeaters are not supported:
True, back in 2009.
Not true anymore:
,----[ ORG-NEWS Version 7.9.2 ]
| **** Support for hourly repeat cookies
|
| You can now use
|
| : SCHEDULED: <2012-08-20 lun. 08:00 +1h>
|
| if you want to add an hourly repeater to an entry.
`----
It even made it into the manual by now:
,----[ (info "(org)Repeated tasks") ]
| You can use yearly, monthly, weekly, daily
| and hourly repeat cookies by using the `y/w/m/d/h' letters.
`----
Memnon
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-10-19 10:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-08 14:37 Problem with hourly repeater Memnon Anon
2012-10-10 14:14 ` Nicolas Goaziou
2012-10-19 10:19 ` Memnon Anon
2012-10-10 14:44 ` Martin Pohlack
2012-10-10 15:00 ` Nicolas Goaziou
2012-10-10 15:04 ` Memnon Anon
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).