From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Loop when updating SCHEDULED date from agenda view Date: Thu, 25 Apr 2013 13:17:16 +0200 Message-ID: <86y5c67tc3.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hello, As I rarely meet my goals, I _very often_ move SCHEDULED entries in the future, by S-right arrow'ing the agenda entry. Since 1 month or so, I _sometimes_ experience a loop (seems infinite, but hopefully it is breakable) when updating the date of SCHEDULED items. This did not occur at all before some cut-off date. This is not easily reproducible, hence very difficult to bisect the Org code to find the bad commit. However, I wanted to poll for similar experiences y= ou would have gotten. In clear, am I the only one seeing this? For info, when the loop gets broken, here's the backtrace: --8<---------------cut here---------------start------------->8--- Debugger entered--Lisp error: (quit) (progn (org-move-to-column (- (window-width) (length stamp)) t) (org-agen= da-fix-tags-filter-overlays-at (point)) (if nil (let ((ex (make-extent nil = nil)) (gl (make-glyph stamp))) (set-glyph-face gl (quote secondary-selectio= n)) (set-extent-properties ex (list (quote invisible) t (quote end-glyph) g= l (quote duplicable) t)) (insert-extent ex (1- (point)) (point-at-eol))) (a= dd-text-properties (1- (point)) (point-at-eol) (list (quote display) (org-a= dd-props stamp nil (quote face) (quote secondary-selection))))) (beginning-= of-line 1)) (if (equal marker (org-get-at-bol (quote org-marker))) (progn (org-move-t= o-column (- (window-width) (length stamp)) t) (org-agenda-fix-tags-filter-o= verlays-at (point)) (if nil (let ((ex (make-extent nil nil)) (gl (make-glyp= h stamp))) (set-glyph-face gl (quote secondary-selection)) (set-extent-prop= erties ex (list (quote invisible) t (quote end-glyph) gl (quote duplicable)= t)) (insert-extent ex (1- (point)) (point-at-eol))) (add-text-properties (= 1- (point)) (point-at-eol) (list (quote display) (org-add-props stamp nil (= quote face) (quote secondary-selection))))) (beginning-of-line 1))) (while (not (bobp)) (if (equal marker (org-get-at-bol (quote org-marker))= ) (progn (org-move-to-column (- (window-width) (length stamp)) t) (org-agen= da-fix-tags-filter-overlays-at (point)) (if nil (let ((ex (make-extent nil = nil)) (gl (make-glyph stamp))) (set-glyph-face gl (quote secondary-selectio= n)) (set-extent-properties ex (list (quote invisible) t (quote end-glyph) g= l (quote duplicable) t)) (insert-extent ex (1- (point)) (point-at-eol))) (a= dd-text-properties (1- (point)) (point-at-eol) (list (quote display) (org-a= dd-props stamp nil (quote face) (quote secondary-selection))))) (beginning-= of-line 1))) (beginning-of-line 0)) (save-excursion (goto-char (point-max)) (while (not (bobp)) (if (equal ma= rker (org-get-at-bol (quote org-marker))) (progn (org-move-to-column (- (wi= ndow-width) (length stamp)) t) (org-agenda-fix-tags-filter-overlays-at (poi= nt)) (if nil (let ((ex ...) (gl ...)) (set-glyph-face gl (quote secondary-s= election)) (set-extent-properties ex (list ... t ... gl ... t)) (insert-ext= ent ex (1- ...) (point-at-eol))) (add-text-properties (1- (point)) (point-a= t-eol) (list (quote display) (org-add-props stamp nil ... ...)))) (beginnin= g-of-line 1))) (beginning-of-line 0))) (let ((inhibit-read-only t)) (setq stamp (concat prefix " =3D> " stamp " = ")) (save-excursion (goto-char (point-max)) (while (not (bobp)) (if (equal = marker (org-get-at-bol (quote org-marker))) (progn (org-move-to-column (- (= window-width) (length stamp)) t) (org-agenda-fix-tags-filter-overlays-at (p= oint)) (if nil (let (... ...) (set-glyph-face gl ...) (set-extent-propertie= s ex ...) (insert-extent ex ... ...)) (add-text-properties (1- ...) (point-= at-eol) (list ... ...))) (beginning-of-line 1))) (beginning-of-line 0)))) org-agenda-show-new-time(# "<2013-03-= 31 Sun>") (let ((--cline (org-current-line)) (--cmd this-command) (--buf1 (current-= buffer)) (--buf2 buffer) (--undo1 buffer-undo-list) (--undo2 (save-current-= buffer (set-buffer buffer) buffer-undo-list)) --c1 --c2) (save-current-buff= er (set-buffer buffer) (widen) (goto-char pos) (if (not (org-at-timestamp-p= )) (error "Cannot find time stamp")) (if (and org-agenda-move-date-from-pas= t-immediately-to-today (equal arg 1) (or (not what) (eq what (quote day))) = (not (let ((save-match-data-internal ...)) (unwind-protect (progn ...) (set= -match-data save-match-data-internal ...))))) (progn (setq cdate (org-parse= -time-string (match-string 0) (quote nodefault)) cdate (calendar-absolute-f= rom-gregorian (list (nth 4 cdate) (nth 3 cdate) (nth 5 cdate))) today (org-= today)) (if (> today cdate) (setq arg (- today cdate))))) (org-timestamp-ch= ange arg (or what (quote day))) (if (and (org-at-date-range-p) (re-search-b= ackward org-tr-regexp-both (point-at-bol))) (progn (let ((end org-last-chan= ged-timestamp)) (org-timestamp-change arg (or what (quote day))) (setq org-= last-changed-timestamp (concat org-last-changed-timestamp "--" end)))))) (o= rg-agenda-show-new-time marker org-last-changed-timestamp) (if org-agenda-a= llow-remote-undo (progn (setq --c1 (org-verify-change-for-undo --undo1 (sav= e-current-buffer (set-buffer --buf1) buffer-undo-list)) --c2 (org-verify-ch= ange-for-undo --undo2 (save-current-buffer (set-buffer --buf2) buffer-undo-= list))) (if (or --c1 --c2) (progn (and --c1 (save-current-buffer (set-buffe= r --buf1) (undo-boundary))) (and --c2 (save-current-buffer (set-buffer --bu= f2) (undo-boundary))) (setq org-agenda-undo-list (cons (list --cmd --cline = --buf1 --c1 --buf2 --c2) org-agenda-undo-list))))))) (let* ((marker (or (org-get-at-bol (quote org-marker)) (org-agenda-error)= )) (buffer (marker-buffer marker)) (pos (marker-position marker)) cdate tod= ay) (let ((--cline (org-current-line)) (--cmd this-command) (--buf1 (curren= t-buffer)) (--buf2 buffer) (--undo1 buffer-undo-list) (--undo2 (save-curren= t-buffer (set-buffer buffer) buffer-undo-list)) --c1 --c2) (save-current-bu= ffer (set-buffer buffer) (widen) (goto-char pos) (if (not (org-at-timestamp= -p)) (error "Cannot find time stamp")) (if (and org-agenda-move-date-from-p= ast-immediately-to-today (equal arg 1) (or (not what) (eq what (quote day))= ) (not (let (...) (unwind-protect ... ...)))) (progn (setq cdate (org-parse= -time-string (match-string 0) (quote nodefault)) cdate (calendar-absolute-f= rom-gregorian (list ... ... ...)) today (org-today)) (if (> today cdate) (s= etq arg (- today cdate))))) (org-timestamp-change arg (or what (quote day))= ) (if (and (org-at-date-range-p) (re-search-backward org-tr-regexp-both (po= int-at-bol))) (progn (let ((end org-last-changed-timestamp)) (org-timestamp= -change arg (or what ...)) (setq org-last-changed-timestamp (concat org-las= t-changed-timestamp "--" end)))))) (org-agenda-show-new-time marker org-las= t-changed-timestamp) (if org-agenda-allow-remote-undo (progn (setq --c1 (or= g-verify-change-for-undo --undo1 (save-current-buffer (set-buffer --buf1) b= uffer-undo-list)) --c2 (org-verify-change-for-undo --undo2 (save-current-bu= ffer (set-buffer --buf2) buffer-undo-list))) (if (or --c1 --c2) (progn (and= --c1 (save-current-buffer ... ...)) (and --c2 (save-current-buffer ... ...= )) (setq org-agenda-undo-list (cons ... org-agenda-undo-list))))))) (messag= e "Time stamp changed to %s" org-last-changed-timestamp)) org-agenda-date-later(1) (cond ((or (equal arg (quote (16))) (memq last-command (quote (org-agenda= -date-later-minutes org-agenda-date-earlier-minutes)))) (setq this-command = (quote org-agenda-date-later-minutes)) (org-agenda-date-later-minutes 1)) (= (or (equal arg (quote (4))) (memq last-command (quote (org-agenda-date-late= r-hours org-agenda-date-earlier-hours)))) (setq this-command (quote org-age= nda-date-later-hours)) (org-agenda-date-later-hours 1)) (t (org-agenda-date= -later (prefix-numeric-value arg)))) org-agenda-do-date-later(nil) call-interactively(org-agenda-do-date-later nil nil) --8<---------------cut here---------------end--------------->8--- Best regards, Seb --=20 Sebastien Vauban