emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Loop when updating SCHEDULED date from agenda view


From: Sebastien Vauban
Subject: [O] Loop when updating SCHEDULED date from agenda view
Date: Thu, 25 Apr 2013 13:17:16 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3 (windows-nt)

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 you
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-agenda-fix-tags-filter-overlays-at (point)) (if nil (let ((ex (make-extent 
nil nil)) (gl (make-glyph stamp))) (set-glyph-face gl (quote 
secondary-selection)) (set-extent-properties 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))
  (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 (point)) (if nil (let ((ex (make-extent 
nil nil)) (gl (make-glyph stamp))) (set-glyph-face gl (quote 
secondary-selection)) (set-extent-properties 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-agenda-fix-tags-filter-overlays-at (point)) (if nil (let ((ex (make-extent 
nil nil)) (gl (make-glyph stamp))) (set-glyph-face gl (quote 
secondary-selection)) (set-extent-properties 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))) (beginning-of-line 0))
  (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 
(point)) (if nil (let ((ex ...) (gl ...)) (set-glyph-face gl (quote 
secondary-selection)) (set-extent-properties ex (list ... t ... gl ... t)) 
(insert-extent ex (1- ...) (point-at-eol))) (add-text-properties (1- (point)) 
(point-at-eol) (list (quote display) (org-add-props stamp nil ... ...)))) 
(beginning-of-line 1))) (beginning-of-line 0)))
  (let ((inhibit-read-only t)) (setq stamp (concat prefix " => " 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 
(point)) (if nil (let (... ...) (set-glyph-face gl ...) (set-extent-properties 
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(#<marker at 80425 in Gras-Savoye.org> "<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-buffer (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-past-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-from-gregorian (list (nth 4 cdate) (nth 3 cdate) (nth 
5 cdate))) today (org-today)) (if (> today cdate) (setq 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 (point-at-bol))) (progn (let ((end 
org-last-changed-timestamp)) (org-timestamp-change arg (or what (quote day))) 
(setq org-last-changed-timestamp (concat org-last-changed-timestamp "--" 
end)))))) (org-agenda-show-new-time marker org-last-changed-timestamp) (if 
org-agenda-allow-remote-undo (progn (setq --c1 (org-verify-change-for-undo 
--undo1 (save-current-buffer (set-buffer --buf1) buffer-undo-list)) --c2 
(org-verify-change-for-undo --undo2 (save-current-buffer (set-buffer --buf2) 
buffer-undo-list))) (if (or --c1 --c2) (progn (and --c1 (save-current-buffer 
(set-buffer --buf1) (undo-boundary))) (and --c2 (save-current-buffer 
(set-buffer --buf2) (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 today) 
(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-buffer (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-past-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-from-gregorian (list ... ... ...)) today (org-today)) (if (> 
today cdate) (setq 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 (point-at-bol))) (progn (let ((end 
org-last-changed-timestamp)) (org-timestamp-change arg (or what ...)) (setq 
org-last-changed-timestamp (concat org-last-changed-timestamp "--" end)))))) 
(org-agenda-show-new-time marker org-last-changed-timestamp) (if 
org-agenda-allow-remote-undo (progn (setq --c1 (org-verify-change-for-undo 
--undo1 (save-current-buffer (set-buffer --buf1) buffer-undo-list)) --c2 
(org-verify-change-for-undo --undo2 (save-current-buffer (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))))))) (message "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-later-hours 
org-agenda-date-earlier-hours)))) (setq this-command (quote 
org-agenda-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

-- 
Sebastien Vauban




reply via email to

[Prev in Thread] Current Thread [Next in Thread]