emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Loop when updating SCHEDULED date from agenda view
@ 2013-04-25 11:17 Sebastien Vauban
  2013-04-25 17:08 ` Bastien
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastien Vauban @ 2013-04-25 11:17 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Loop when updating SCHEDULED date from agenda view
  2013-04-25 11:17 Loop when updating SCHEDULED date from agenda view Sebastien Vauban
@ 2013-04-25 17:08 ` Bastien
  2013-04-26 13:24   ` Sebastien Vauban
  0 siblings, 1 reply; 3+ messages in thread
From: Bastien @ 2013-04-25 17:08 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ



Hi Sébastien,

thanks -- let's hope we can narrow down the issue.

The problem seems to be that Org is confused when adding
the overlay for displaying the new date in the agenda.

This generally happens with headings that have special
text properties or overlays already, like links.  Try to
remember the actual content of the heading next time you
stumble upon this bug, it may help finding the problem
(e.g. does the heading ends with a link?)

Thanks!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Loop when updating SCHEDULED date from agenda view
  2013-04-25 17:08 ` Bastien
@ 2013-04-26 13:24   ` Sebastien Vauban
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastien Vauban @ 2013-04-26 13:24 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Bastien,

Bastien wrote:
> thanks -- let's hope we can narrow down the issue.

Cross our fingers...

> The problem seems to be that Org is confused when adding
> the overlay for displaying the new date in the agenda.
>
> This generally happens with headings that have special
> text properties or overlays already, like links.  Try to
> remember the actual content of the heading next time you
> stumble upon this bug, it may help finding the problem
> (e.g. does the heading ends with a link?)

I don't have that impression, but I cannot guarantee it either.

Anyway, looking at the contents of the entry is clearly a good hint you give
me, for hoping to find how to reproduce it. What you see is that it could be
entry-related, ie the next time I'll move some specific tasks in the future,
it should happen again.

Stay tuned... Thx for the hint.

Best regards,
  Seb

-- 
Sebastien Vauban

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-26 13:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-25 11:17 Loop when updating SCHEDULED date from agenda view Sebastien Vauban
2013-04-25 17:08 ` Bastien
2013-04-26 13:24   ` Sebastien Vauban

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).