emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Dinnyés Dániel" <dinnyesd@gmail.com>
To: emacs-orgmode@gnu.org
Cc: Ihor Radchenko <yantar92@gmail.com>
Subject: Re: Bug: org-agenda-todo applied to wrong line item [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]
Date: Sun, 16 Aug 2020 16:01:58 +0100	[thread overview]
Message-ID: <CAFfHKJ5K0vX_8B-YUSdDkXEbB0pEntV8YP-+xbJgBxeXEw9UGw@mail.gmail.com> (raw)
In-Reply-To: <87v9hihldf.fsf@localhost>

[-- Attachment #1: Type: text/plain, Size: 6979 bytes --]

I have tried reproducing it with a minimal example, and this seems to work
for me:

** TODO baz1
SCHEDULED: <2020-08-16 Sun>

some text

** TODO baz2
SCHEDULED: <2020-08-16 Sun>
*** DONE baz3
SCHEDULED: <2020-08-16 Sun>
*** TODO baz4
SCHEDULED: <2020-08-16 Sun>

When in the agenda, on the front line of item baz, setting it to DONE state
works fine.
OTOH, when going to the end of the line on the item baz, trying to set it
to DONE results in the error message:
TODO state change from TODO to DONE blocked (by "TODO baz4")

Also, I have (org-enforce-todo-dependencies t), which causes the blocking,
and (org-agenda-dim-blocked-tasks (quote invisible)), which hides baz2 from
the agenda... because of this baz1 is followed directly by baz4 in my
agenda window.

Just for completeness, this my lengthy org configuration:

(use-package org
  (defun org-archive-done-tasks ()
    "Archive all DONE and CANCELED tasks in the subtree of the current
     (lambda ()
       (setq org-map-continue-from (outline-previous-heading)))
     "//DONE|CANCELED" 'agenda))
  (("C-c a" . org-agenda)
   ("C-c k" . org-capture)
   :map org-mode-map
   ("C-c H" . org-archive-done-tasks)
   ("C-c e" . org-babel-execute-src-block))
  (text-mode . visual-line-mode)
   '(org-agenda-span 'day)
   '(org-startup-indented t)
   '(org-startup-folded nil)
   '(org-directory "~/Workspace/org/")
   '(org-agenda-files (list org-directory))
   '(org-archive-location "archives.org::datetree/* %s")
   '(org-agenda-diary-file (concat org-directory "diary.org"))
   '(org-agenda-include-diary t)
   '(org-deadline-warning-days 7)
   '(org-agenda-skip-deadline-prewarning-if-scheduled 'pre-scheduled)
   '(org-agenda-skip-scheduled-if-deadline-is-shown t)
   '(org-agenda-skip-scheduled-if-done t)
   '(org-agenda-todo-ignore-scheduled 'future)
   '(org-agenda-tags-todo-honor-ignore-options t)
   ;; set SCHEDULED and DEADLINE leaders in agenda view
   '(org-agenda-deadline-leaders (quote ("Deadline!  " "In %d days: " "Late
%d days: ")))
   '(org-agenda-scheduled-leaders (quote ("Scheduled! " "For %d days: ")))
   '(org-agenda-window-setup 'only-window)
     (quote ((sequence "TODO(t!)" "ONGOING(o!)" "WAITING(w@)" "|" "DONE(d@)"
     (quote (("WAITING" . "purple")
    ("ONGOING" . "orange")
    ("CANCELED" . "firebrick"))))
   ;; set ARCHIVE tag when todo state is set to CANCELED, and remove when
reset to TODO
      ((todo . ((,org-archive-tag . nil)))
       ("CANCELED" . ((,org-archive-tag . t))))))
     '(("TARGET" . ?t)))
   '(org-tags-exclude-from-inheritance (quote ("TARGET")))
     '((nil . (:level . 1))
       (nil . (:tag . "TARGET"))))
   '(org-refile-use-outline-path t)
   '(org-goto-interface 'outline-path-completion)
   '(org-outline-path-complete-in-steps t)
   ;; prefer in-steps that ido for refile completion
   ;; '(org-completion-use-ido t)
   '(org-reverse-note-order t)

   ;; todo state changes should be logged into drawer
   '(org-log-into-drawer t)
   ;; log when schedule or deadline changes
   '(org-log-redeadline (quote time))
   '(org-log-reschedule (quote time))
   ;;'(org-log-refile (quote time)) ; logs even when refiled during capture

   '(org-priority-start-cycle-with-default t)
   '(org-default-priority 70)
   '(org-lowest-priority 70)
   '(org-highest-priority 65)
     '((agenda time-up todo-state-down priority-down)
       (todo category-up priority-down)
       (tags category-up priority-down)
       (search category-up)))

   '(org-enforce-todo-dependencies t)
   '(org-enforce-todo-checkbox-dependencies t)
   '(org-agenda-dim-blocked-tasks (quote invisible))

     '(("c" . "Custom commands")
       ("cb" "Backlog (tasks not scheduled)" todo "TODO"
 '(org-agenda-skip-entry-if 'scheduled))))
       ("cc" . "Filter tasks by CATEGORY")
       ("cci" "INBOX tasks"
((alltodo ""))
((org-agenda-category-filter-preset '("+INBOX"))))
       ("ccf" "INFRA tasks"
((alltodo ""))
((org-agenda-category-filter-preset '("+INFRA"))))
       ("ccr" "ROLES tasks"
((alltodo ""))
((org-agenda-category-filter-preset '("+ROLES"))))))

      (("t" "Task")
       ("tt" "Task (Scheduled)" entry
(file+headline "tasks.org" "INBOX")
"* TODO %^{Title}\nSCHEDULED: %t\n%?")
       ("td" "Task (Scheduled, with Deadline)" entry
(file+headline "tasks.org" "INBOX")
"* TODO %^{Title}\nSCHEDULED: %^{Schedule}t DEADLINE: %^{Deadline}t\n%?")
       ("e" "Event")
       ("et" "Event (with single datetime)" entry
(file+headline "events.org" "INBOX")
"* %^{Title}\n%^T\n%?")
       ("er" "Event (with date range)" entry
(file+headline "events.org" "INBOX")
"* %^{Title}\n%^t--%^t\n%?")
       ("m" "Memo" entry
(file+headline "memo.org" "INBOX")
"* %?\n%T\n")
       ("x" "Example" entry
(file+headline "example.org" "INBOX")
"* %?\n%^t\n"))))))


On Sun, 16 Aug 2020 at 12:38, Ihor Radchenko <yantar92@gmail.com> wrote:

> > Using Emacs 26.3 with a vanilla configuration and the Org repo checked
> > out at 5e4542d69 (the commit reported in the subject line), I didn't see
> > the behavior you describe.  With point at the end of the agenda line for
> > A, the state was changed for A.
> I think that may happen when you have agenda filter active and an entry
> hidden by filter is between the current and next line.
> Best,
> Ihor
> Kyle Meyer <kyle@kyleam.com> writes:
> > Dinnyés Dániel writes:
> >
> >> While in the Org Agenda, and navigating to the end of line for a given
> item
> >> (assuming more than one todo items), and calling org-agenda-todo (with
> >> keybindings t, or C-c C-t)... this result in the call being applied to
> the
> >> next line item, instead of the one the cursor is on.
> >>
> >> This only happens when the cursor is at the end of the line.
> >>
> >> I would consider this to be a bug.
> >
> > I tried using the following content as the agenda file:
> >
> >     * TODO A
> >     * TODO B
> >
> > Using Emacs 26.3 with a vanilla configuration and the Org repo checked
> > out at 5e4542d69 (the commit reported in the subject line), I didn't see
> > the behavior you describe.  With point at the end of the agenda line for
> > A, the state was changed for A.
> >
> > I also can't trigger the behavior with the master branch checked out.

[-- Attachment #2: Type: text/html, Size: 10204 bytes --]

  reply	other threads:[~2020-08-16 15:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-15 16:07 Bug: org-agenda-todo applied to wrong line item [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)] Dinnyés Dániel
2020-08-15 16:45 ` Kyle Meyer
2020-08-16 11:37   ` Ihor Radchenko
2020-08-16 15:01     ` Dinnyés Dániel [this message]
2020-08-16 15:34       ` Dinnyés Dániel
2020-08-18  2:45       ` Kyle Meyer
2020-10-18  5:16         ` Daniel Dinnyes
2020-08-18  2:16     ` Kyle Meyer
2020-08-18  2:43       ` Ihor Radchenko

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:

  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=CAFfHKJ5K0vX_8B-YUSdDkXEbB0pEntV8YP-+xbJgBxeXEw9UGw@mail.gmail.com \
    --to=dinnyesd@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@gmail.com \


* 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


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