Re: Bug: Occasional error with recurring tasks in agenda [9.4 (release_9.4-3-ge6021b @ /home/james/.config/emacs/straight/build/org-plus-contrib/)]

2020-09-25 Thread Ihor Radchenko
> This doesn't happen with emacs -Q, so presumably there's something in my
> config that's making this happen, but I have no idea what I should be
> looking for. Any suggestions?

I sometimes observe similar behaviour if I delete/refile task in file.
Then, if agenda view is not refreshed, tasks nearby might be messed up.
Presumably, it happens because markers saved in the agenda view (see
'org-hd-marker or 'org-marker text properties in agenda) are outdated
and point to wrong place.

So, you may need to check your config for any code affecting markers or
changing text in buffer. 

Best,
Ihor

James N. V. Cash  writes:

 It seems to always work properly from the org buffer itself, so I assume
 it's something happening in the agenda, but I'm not sure where to look.
 I've tried debugging `org-agenda-todo`, but I can't see anything in
 askance there. Any advice as to what I should be looking for?
>
> Trying to do more work to track this down and I'm perhaps more confused than 
> I was before.
>
> I can consistently make this happen by opening my todo.org file which
> contains two recurring tasks, call them A and B.
>
> I start by putting the cursor on task A, then running org-agenda and
> using that to complete task B. This then results in task A showing twice
> in the agenda list and refreshing the agenda/checking the file shows
> task A completed & rescheduled to the next day and task B marked DONE
> and not repeated.
>
> Trying to track this down, I see in `org-todo`, the point moves from
> where org-agenda-todo positioned it in task B to inside where I had the
> cursor originally in the todo.org buffer, in task A. Strangely, I see
> the point changing when the `next` variable is printed out via
> `message` (I can also see the point changing after logging out org-state).
>
> If I print out either of those variables with the "%S" format string
> instead of "%s", the point doesn't move.
>
> This doesn't happen with emacs -Q, so presumably there's something in my
> config that's making this happen, but I have no idea what I should be
> looking for. Any suggestions?
>
> James



Re: Bug: Occasional error with recurring tasks in agenda [9.4 (release_9.4-3-ge6021b @ /home/james/.config/emacs/straight/build/org-plus-contrib/)]

2020-09-25 Thread James N . V . Cash


>>> It seems to always work properly from the org buffer itself, so I assume
>>> it's something happening in the agenda, but I'm not sure where to look.
>>> I've tried debugging `org-agenda-todo`, but I can't see anything in
>>> askance there. Any advice as to what I should be looking for?

Trying to do more work to track this down and I'm perhaps more confused than I 
was before.

I can consistently make this happen by opening my todo.org file which
contains two recurring tasks, call them A and B.

I start by putting the cursor on task A, then running org-agenda and
using that to complete task B. This then results in task A showing twice
in the agenda list and refreshing the agenda/checking the file shows
task A completed & rescheduled to the next day and task B marked DONE
and not repeated.

Trying to track this down, I see in `org-todo`, the point moves from
where org-agenda-todo positioned it in task B to inside where I had the
cursor originally in the todo.org buffer, in task A. Strangely, I see
the point changing when the `next` variable is printed out via
`message` (I can also see the point changing after logging out org-state).

If I print out either of those variables with the "%S" format string
instead of "%s", the point doesn't move.

This doesn't happen with emacs -Q, so presumably there's something in my
config that's making this happen, but I have no idea what I should be
looking for. Any suggestions?

James



Re: Bug: Occasional error with recurring tasks in agenda [9.4 (release_9.4-3-ge6021b @ /home/james/.config/emacs/straight/build/org-plus-contrib/)]

2020-09-23 Thread James N . V . Cash
Ihor Radchenko  writes:

>> It seems to always work properly from the org buffer itself, so I assume
>> it's something happening in the agenda, but I'm not sure where to look.
>> I've tried debugging `org-agenda-todo`, but I can't see anything in
>> askance there. Any advice as to what I should be looking for?
>
> I had similar issue. As I recall, the problem was with some custom
> function in org-trigger-hook that threw an error because it did not
> expect to be ran with point in agenda buffer. Do you have any
> customisation related to todo triggers?

Hm, it looks like org-trigger-hook and the various other
org-trigger-*-hook variables are nil in org-agenda buffers, but that
seems like a good place to look. I'll try to see if I have any other org
hooks that might be interferring with this.



Re: Bug: Occasional error with recurring tasks in agenda [9.4 (release_9.4-3-ge6021b @ /home/james/.config/emacs/straight/build/org-plus-contrib/)]

2020-09-22 Thread Ihor Radchenko
> It seems to always work properly from the org buffer itself, so I assume
> it's something happening in the agenda, but I'm not sure where to look.
> I've tried debugging `org-agenda-todo`, but I can't see anything in
> askance there. Any advice as to what I should be looking for?

I had similar issue. As I recall, the problem was with some custom
function in org-trigger-hook that threw an error because it did not
expect to be ran with point in agenda buffer. Do you have any
customisation related to todo triggers?

Best,
Ihor

James N V Cash  writes:

> I've started seeing an issues as of a couple of days ago, after upgrading to 
> org 9.4.
>
> When I mark a task with a recurring deadline done from the agenda view,
> sometimes it doesn't recur, but instead marks the task as done.
>
> I haven't yet been able to isolate why -- just now I marked a task as
> done from the agenda, it didn't recur; I went to the org file, undid
> from there, then tried marking it complete from the agenda again and
> that time it worked.
>
> It seems to always work properly from the org buffer itself, so I assume
> it's something happening in the agenda, but I'm not sure where to look.
> I've tried debugging `org-agenda-todo`, but I can't see anything in
> askance there. Any advice as to what I should be looking for?
>
> James Cash
>
> 
>
>
>
> Emacs  : GNU Emacs 28.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 
> 3.24.20, cairo version 1.16.0)
>  of 2020-08-14
> Package: Org mode version 9.4 (release_9.4-3-ge6021b @ 
> /home/james/.config/emacs/straight/build/org-plus-contrib/)
>
> current state:
> ==
> (setq
>  org-duration-format 'h:mm
>  org-src-mode-hook '(org-src-babel-configure-edit-buffer 
> org-src-mode-configure-edit-buffer)
>  org-link-shell-confirm-function 'yes-or-no-p
>  org-pdftools-get-desc-function 'org-pdftools-get-desc-default
>  org-metadown-hook '(org-babel-pop-to-session-maybe)
>  org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
>  org-pdftools-markup-pointer-function 
> 'pdf-annot-add-underline-markup-annotation
>  org-refile-targets '((nil :maxlevel . 9) (org-agenda-files :maxlevel . 9))
>  org-html-format-inlinetask-function 
> 'org-html-format-inlinetask-default-function
>  org-odt-format-headline-function 'org-odt-format-headline-default-function
>  org-notmuch-open-function 'org-notmuch-follow-link
>  org-agenda-files "~/org/dir"
>  org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
>  org-modules '(ol-info ol-eshell org-notify ol-notmuch)
>  org-mode-hook '(evil-org-mode
>  (closure (t) nil
>   (let ((default-pred electric-pair-inhibit-predicate))
>(set (make-local-variable 
> 'electric-pair-inhibit-predicate) #'(lambda (c) (if (char-equal c 60) t 
> default-pred
>   (visual-line-mode 1))
>  (closure (t) nil (set (make-local-variable 
> 'company-dabbrev-downcase) nil)) cogent/fix-org-yasnippet-hook
>  #[0 "\301\211.\207" [imenu-create-index-function 
> org-imenu-get-tree] 2]
>  #[0 "\300\301\302\303\304$\207" [add-hook 
> change-major-mode-hook org-show-all append local] 5]
>  #[0 "\300\301\302\303\304$\207" [add-hook 
> change-major-mode-hook org-babel-show-result-all append local] 5]
>  org-babel-result-hide-spec org-babel-hide-all-hashes 
> org-eldoc-load)
>  org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
>  org-outline-path-complete-in-steps nil
>  org-archive-hook '(org-attach-archive-delete-maybe)
>  org-agenda-restore-windows-after-quit t
>  org-confirm-elisp-link-function 'yes-or-no-p
>  org-mime-src-mode-hook '(org-mime-src-mode-configure-edit-buffer)
>  org-agenda-before-write-hook '(org-agenda-add-entry-text)
>  org-metaup-hook '(org-babel-load-in-session-maybe)
>  org-adapt-indentation 'headline-data
>  org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
>  org-mime-html-hook '((closure (t) nil (org-mime-change-element-style 
> "blockquote" "border-left: 2px solid gray; padding-left: 4px;"))
>   (closure (t) nil
>(org-mime-change-element-style "pre"
> (format "color: %s; background-color: %s; padding: 
> 0.5em;" (face-attribute 'default :foreground)
>  (face-attribute 'default :background))
> )
>)
>   )
>  org-notmuch-search-open-function 'org-notmuch-search-follow-link
>  org-babel-pre-tangle-hook '(save-buffer)
>  org-file-apps '((auto-mode . emacs) (directory . emacs) ("\\.mm\\'" . 
> default) ("\\.x?html?\\'" . default) ("\\.pdf\\'" . emacs))
>  org-tab-first-hook '(yas/org-very-safe-expand 
> org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
>  org-hide-leading-stars t
>  org-babel-load-languages 

Bug: Occasional error with recurring tasks in agenda [9.4 (release_9.4-3-ge6021b @ /home/james/.config/emacs/straight/build/org-plus-contrib/)]

2020-09-22 Thread James N V Cash



I've started seeing an issues as of a couple of days ago, after upgrading to 
org 9.4.

When I mark a task with a recurring deadline done from the agenda view,
sometimes it doesn't recur, but instead marks the task as done.

I haven't yet been able to isolate why -- just now I marked a task as
done from the agenda, it didn't recur; I went to the org file, undid
from there, then tried marking it complete from the agenda again and
that time it worked.

It seems to always work properly from the org buffer itself, so I assume
it's something happening in the agenda, but I'm not sure where to look.
I've tried debugging `org-agenda-todo`, but I can't see anything in
askance there. Any advice as to what I should be looking for?

James Cash





Emacs  : GNU Emacs 28.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, 
cairo version 1.16.0)
 of 2020-08-14
Package: Org mode version 9.4 (release_9.4-3-ge6021b @ 
/home/james/.config/emacs/straight/build/org-plus-contrib/)

current state:
==
(setq
 org-duration-format 'h:mm
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-link-shell-confirm-function 'yes-or-no-p
 org-pdftools-get-desc-function 'org-pdftools-get-desc-default
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-pdftools-markup-pointer-function 'pdf-annot-add-underline-markup-annotation
 org-refile-targets '((nil :maxlevel . 9) (org-agenda-files :maxlevel . 9))
 org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-notmuch-open-function 'org-notmuch-follow-link
 org-agenda-files "~/org/dir"
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-modules '(ol-info ol-eshell org-notify ol-notmuch)
 org-mode-hook '(evil-org-mode
 (closure (t) nil
  (let ((default-pred electric-pair-inhibit-predicate))
   (set (make-local-variable 'electric-pair-inhibit-predicate) 
#'(lambda (c) (if (char-equal c 60) t default-pred
  (visual-line-mode 1))
 (closure (t) nil (set (make-local-variable 
'company-dabbrev-downcase) nil)) cogent/fix-org-yasnippet-hook
 #[0 "\301\211.\207" [imenu-create-index-function 
org-imenu-get-tree] 2]
 #[0 "\300\301\302\303\304$\207" [add-hook 
change-major-mode-hook org-show-all append local] 5]
 #[0 "\300\301\302\303\304$\207" [add-hook 
change-major-mode-hook org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes 
org-eldoc-load)
 org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-outline-path-complete-in-steps nil
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-agenda-restore-windows-after-quit t
 org-confirm-elisp-link-function 'yes-or-no-p
 org-mime-src-mode-hook '(org-mime-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-adapt-indentation 'headline-data
 org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
 org-mime-html-hook '((closure (t) nil (org-mime-change-element-style 
"blockquote" "border-left: 2px solid gray; padding-left: 4px;"))
  (closure (t) nil
   (org-mime-change-element-style "pre"
(format "color: %s; background-color: %s; padding: 
0.5em;" (face-attribute 'default :foreground)
 (face-attribute 'default :background))
)
   )
  )
 org-notmuch-search-open-function 'org-notmuch-search-follow-link
 org-babel-pre-tangle-hook '(save-buffer)
 org-file-apps '((auto-mode . emacs) (directory . emacs) ("\\.mm\\'" . default) 
("\\.x?html?\\'" . default) ("\\.pdf\\'" . emacs))
 org-tab-first-hook '(yas/org-very-safe-expand 
org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
 org-hide-leading-stars t
 org-babel-load-languages '((sql . t) (ruby . t) (js . t))
 org-load-hook '(org-pdftools-setup-link)
 org-hide-emphasis-markers t
 org-agenda-ignore-properties '(effort appt category)
 org-ascii-format-drawer-function #[771 ".\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
 org-use-fast-todo-selection t
 org-agenda-loop-over-headlines-in-active-region nil
 org-src-lang-modes '(("arduino" . arduino) ("redis" . redis) ("php" . php) 
("C" . c) ("C++" . c++) ("asymptote" . asy) ("bash" . sh)
  ("beamer" . latex) ("calc" . fundamental) ("cpp" . c++) 
("ditaa" . artist) ("dot" . fundamental) ("elisp" . emacs-lisp)
  ("ocaml" . tuareg) ("screen" . shell-script) ("shell" . 
sh) ("sqlite" . sql))
 org-catch-invisible-edits