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
[-- 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
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
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
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
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