emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: "Andrew J. Korty" <ajk@iu.edu>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Update all ++ repeaters in an entry (loop variables weren't getting reset)
Date: Fri, 22 Oct 2010 09:59:20 +0200	[thread overview]
Message-ID: <5C48C342-47C1-4A09-A854-E93905056EA8@gmail.com> (raw)
In-Reply-To: <14027.1287664132@iu.edu>

Applied, thanks.

- Carsten

On Oct 21, 2010, at 2:28 PM, Andrew J. Korty wrote:

> See http://www.mail-archive.com/emacs-orgmode@gnu.org/msg30284.html.  
> This patch is against release_7.01h.
>
> ajk
>
> ---
> lisp/org.el |   20 ++++++++++----------
> 1 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/lisp/org.el b/lisp/org.el
> index d33bf4e..52e501e 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -11369,7 +11369,6 @@ This function is run automatically after  
> each state change to a DONE state."
>        (msg "Entry repeats: ")
>        (org-log-done nil)
>        (org-todo-log-states nil)
> -        (nshiftmax 10) (nshift 0)
>        re type n what ts time to-state)
>    (when repeat
>      (if (eq org-log-repeat t) (setq org-log-repeat 'state))
> @@ -11416,15 +11415,16 @@ This function is run automatically after  
> each state change to a DONE state."
>              (- (time-to-days (current-time)) (time-to-days time))
>              'day))
>            ((equal (match-string 1 ts) "+")
> -             (while (or (= nshift 0)
> -                        (<= (time-to-days time) (time-to-days  
> (current-time))))
> -               (when (= (incf nshift) nshiftmax)
> -                 (or (y-or-n-p (message "%d repeater intervals were  
> not enough to shift date past today.  Continue? " nshift))
> -                     (error "Abort")))
> -               (org-timestamp-change n (cdr (assoc what whata)))
> -               (org-at-timestamp-p t)
> -               (setq ts (match-string 1))
> -               (setq time (save-match-data (org-time-string-to-time  
> ts))))
> +             (let ((nshiftmax 10) (nshift 0))
> +               (while (or (= nshift 0)
> +                          (<= (time-to-days time) (time-to-days  
> (current-time))))
> +                 (when (= (incf nshift) nshiftmax)
> +                   (or (y-or-n-p (message "%d repeater intervals  
> were not enough to shift date past today.  Continue? " nshift))
> +                       (error "Abort")))
> +                 (org-timestamp-change n (cdr (assoc what whata)))
> +                 (org-at-timestamp-p t)
> +                 (setq ts (match-string 1))
> +                 (setq time (save-match-data (org-time-string-to- 
> time ts)))))
>             (org-timestamp-change (- n) (cdr (assoc what whata)))
>             ;; rematch, so that we have everything in place for the  
> real shift
>             (org-at-timestamp-p t)
> -- 
> 1.7.3.1
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

      reply	other threads:[~2010-10-22  8:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-21 12:28 [PATCH] Update all ++ repeaters in an entry (loop variables weren't getting reset) Andrew J. Korty
2010-10-22  7:59 ` Carsten Dominik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5C48C342-47C1-4A09-A854-E93905056EA8@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=ajk@iu.edu \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).