From: stardiviner <numbchild@gmail.com>
To: Org mode mailing list <emacs-orgmode@gnu.org>
Subject: [ERROR] org-todo [C-c C-t] change task todo state raised error
Date: Mon, 13 Jan 2025 13:04:08 +0800 [thread overview]
Message-ID: <CAL1eYu+eOa2hOANY+VKDfAoYtaoY-62b759iAzScADSaeEM+Hw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 23167 bytes --]
When I change a task from "TODO" to "DONE", or "DONE" to "TODO", or
other todo keywords with [C-c C-t]. Org mode will raise bellowing error
"*randomly*". (I can't reproduce it in stable.)
#+begin_example
Debugger entered--Lisp error: (args-out-of-range #<buffer Beauty.org> 0
3092985)
replace-match("")
(progn (goto-char (match-beginning 0)) (replace-match "")
(insert-before-markers-and-inherit next)
(if (org-invisible-p (line-beginning-position)) nil (org-fold-region
(line-beginning-position)
(line-end-position) nil 'outline)))
(unwind-protect (progn (goto-char (match-beginning 0)) (replace-match "")
(insert-before-markers-and-inherit next) (if (org-invisible-p
(line-beginning-position)) nil
(org-fold-region (line-beginning-position) (line-end-position) nil
'outline))) (setq
org-fold-core--last-buffer-chars-modified-tick
(buffer-chars-modified-tick)))
(let ((org-fold-core--ignore-modifications t)) (unwind-protect (progn
(goto-char (match-beginning
0)) (replace-match "") (insert-before-markers-and-inherit next) (if
(org-invisible-p
(line-beginning-position)) nil (org-fold-region (line-beginning-position)
(line-end-position) nil
'outline))) (setq org-fold-core--last-buffer-chars-modified-tick
(buffer-chars-modified-tick))))
(let* ((match-data (match-data)) (startpos (copy-marker
(line-beginning-position))) (force-log
(and (equal arg '...) (prog1 t (setq arg nil)))) (logging (let
((saved-match-data ...))
(unwind-protect (progn ...) (set-match-data saved-match-data t))))
(org-log-done org-log-done)
(org-log-repeat org-log-repeat) (org-todo-log-states org-todo-log-states)
(org-inhibit-logging (if
(equal arg 0) (progn (setq arg nil) 'note) org-inhibit-logging)) (this
(match-string 1)) (hl-pos
(match-beginning 0)) (head (org-get-todo-sequence-head this)) (ass (assoc
head org-todo-kwd-alist))
(interpret (nth 1 ass)) (done-word (nth 3 ass)) (final-done-word (nth 4
ass)) (org-last-state (or
this "")) (completion-ignore-case t) (member (member this
org-todo-keywords-1)) (tail (cdr member))
(org-state (cond ((eq arg ...) (if this ... ...)) ((eq arg ...) (if ... nil
...)) (arg (cond ... ...
... ... ... ... ... ...)) ((and org-todo-key-trigger
org-use-fast-todo-selection)
(org-fast-todo-selection this)) ((null member) (or head ...)) ((equal this
final-done-word) nil)
((null tail) nil) ((memq interpret ...) (if ... ... ...)) (t (car tail))))
(org-state (or
(run-hook-with-args-until-success 'org-todo-get-default-hook org-state
org-last-state) org-state))
(next (if (org-string-nw-p org-state) (concat " " org-state " ") " "))
(change-plist (list :type
'todo-state-change :from this :to org-state :position startpos)) dolog
now-done-p) (if
org-blocker-hook (progn (let (org-blocked-by-checkboxes block-reason) (setq
org-last-todo-state-is-todo (not ...)) (if (save-excursion ...) nil (setq
block-reason ...) (if ...
... ... ...))))) (store-match-data match-data) (let
((org-fold-core--ignore-modifications t))
(unwind-protect (progn (goto-char (match-beginning 0)) (replace-match "")
(insert-before-markers-and-inherit next) (if (org-invisible-p ...) nil
(org-fold-region ... ... nil
...))) (setq org-fold-core--last-buffer-chars-modified-tick
(buffer-chars-modified-tick)))) (cond
((and org-state (equal this org-state)) (message "TODO state was already
%s" (org-trim next))) ((not
(pos-visible-in-window-p hl-pos)) (message "TODO state changed to %s"
(org-trim next)))) (if head
nil (progn (setq head (org-get-todo-sequence-head org-state)) (setq ass
(assoc head
org-todo-kwd-alist)) (setq interpret (nth 1 ass)) (setq done-word (nth 3
ass)) (setq final-done-word
(nth 4 ass)))) (if (memq arg '(nextset previousset)) (progn (message
"Keyword-Set %d/%d: %s" (-
(length org-todo-sets) -1 (length ...)) (length org-todo-sets) (mapconcat
'identity (assoc org-state
org-todo-sets) " ")))) (setq org-last-todo-state-is-todo (not (member
org-state org-done-keywords)))
(setq now-done-p (and (member org-state org-done-keywords) (not (member
this org-done-keywords))))
(and logging (org-local-logging logging)) (if (or (and (or
org-todo-log-states org-log-done) (not
(eq org-inhibit-logging t)) (not (memq arg ...))) force-log) (progn (setq
dolog (or (if force-log
...) (nth 1 ...) (nth 2 ...))) (if (and (eq dolog ...) (eq
org-inhibit-logging ...)) (progn (setq
dolog ...))) (if (or (and ... ...) (and org-state ... ...)) (progn
(org-add-planning-info nil nil
...))) (if (and now-done-p org-log-done) (progn (org-add-planning-info ...
...) (if ... ...))) (if
(and org-state dolog) (progn (org-add-log-setup ... org-state this
dolog)))))
(org-todo-trigger-tag-changes org-state) (if org-auto-align-tags (progn
(org-align-tags))) (if
org-provide-todo-statistics (progn (org-update-parent-todo-statistics)))
(if (and (boundp
'org-clock-out-when-done) org-clock-out-when-done) (progn
(org-clock-out-if-current))) (run-hooks
'org-after-todo-state-change-hook) (if (and arg (not (member org-state
org-done-keywords))) (progn
(setq head (org-get-todo-sequence-head org-state)))) (put-text-property
(line-beginning-position)
(line-end-position) 'org-todo-head head) (if now-done-p (progn (if (boundp
'org-agenda-headline-snapshot-before-repeat) (progn (let ... ...)))
(org-auto-repeat-maybe
org-state))) (if (and (outline-on-heading-p) (not (bolp)) (save-excursion
(forward-line 0)
(looking-at org-todo-line-regexp)) (< (point) (+ 2 (or ... ...)))) (progn
(goto-char (or (match-end
2) (match-end 1))) (and (looking-at " ") (not (looking-at " *:"))
(just-one-space)))) (if
org-trigger-hook (progn (save-excursion (run-hook-with-args
'org-trigger-hook change-plist)))) (if
commentp (progn (org-toggle-comment))))
(catch 'exit (org-back-to-heading t) (if (org-in-commented-heading-p t)
(progn
(org-toggle-comment) (setq commentp t))) (if (looking-at
org-outline-regexp) (progn (goto-char (1-
(match-end 0))))) (or (looking-at (concat " +" org-todo-regexp "\\( +\\|[
\11]*$\\)")) (looking-at
"\\(?: *\\|[ \11]*$\\)")) (let* ((match-data (match-data)) (startpos
(copy-marker
(line-beginning-position))) (force-log (and (equal arg '...) (prog1 t (setq
arg nil)))) (logging
(let ((saved-match-data ...)) (unwind-protect (progn ...) (set-match-data
saved-match-data t))))
(org-log-done org-log-done) (org-log-repeat org-log-repeat)
(org-todo-log-states
org-todo-log-states) (org-inhibit-logging (if (equal arg 0) (progn (setq
arg nil) 'note)
org-inhibit-logging)) (this (match-string 1)) (hl-pos (match-beginning 0))
(head
(org-get-todo-sequence-head this)) (ass (assoc head org-todo-kwd-alist))
(interpret (nth 1 ass))
(done-word (nth 3 ass)) (final-done-word (nth 4 ass)) (org-last-state (or
this ""))
(completion-ignore-case t) (member (member this org-todo-keywords-1)) (tail
(cdr member)) (org-state
(cond ((eq arg ...) (if this ... ...)) ((eq arg ...) (if ... nil ...)) (arg
(cond ... ... ... ...
... ... ... ...)) ((and org-todo-key-trigger org-use-fast-todo-selection)
(org-fast-todo-selection
this)) ((null member) (or head ...)) ((equal this final-done-word) nil)
((null tail) nil) ((memq
interpret ...) (if ... ... ...)) (t (car tail)))) (org-state (or
(run-hook-with-args-until-success
'org-todo-get-default-hook org-state org-last-state) org-state)) (next (if
(org-string-nw-p
org-state) (concat " " org-state " ") " ")) (change-plist (list :type
'todo-state-change :from this
:to org-state :position startpos)) dolog now-done-p) (if org-blocker-hook
(progn (let
(org-blocked-by-checkboxes block-reason) (setq org-last-todo-state-is-todo
(not ...)) (if
(save-excursion ...) nil (setq block-reason ...) (if ... ... ... ...)))))
(store-match-data
match-data) (let ((org-fold-core--ignore-modifications t)) (unwind-protect
(progn (goto-char
(match-beginning 0)) (replace-match "") (insert-before-markers-and-inherit
next) (if
(org-invisible-p ...) nil (org-fold-region ... ... nil ...))) (setq
org-fold-core--last-buffer-chars-modified-tick
(buffer-chars-modified-tick)))) (cond ((and org-state
(equal this org-state)) (message "TODO state was already %s" (org-trim
next))) ((not
(pos-visible-in-window-p hl-pos)) (message "TODO state changed to %s"
(org-trim next)))) (if head
nil (progn (setq head (org-get-todo-sequence-head org-state)) (setq ass
(assoc head
org-todo-kwd-alist)) (setq interpret (nth 1 ass)) (setq done-word (nth 3
ass)) (setq final-done-word
(nth 4 ass)))) (if (memq arg '(nextset previousset)) (progn (message
"Keyword-Set %d/%d: %s" (-
(length org-todo-sets) -1 (length ...)) (length org-todo-sets) (mapconcat
'identity (assoc org-state
org-todo-sets) " ")))) (setq org-last-todo-state-is-todo (not (member
org-state org-done-keywords)))
(setq now-done-p (and (member org-state org-done-keywords) (not (member
this org-done-keywords))))
(and logging (org-local-logging logging)) (if (or (and (or
org-todo-log-states org-log-done) (not
(eq org-inhibit-logging t)) (not (memq arg ...))) force-log) (progn (setq
dolog (or (if force-log
...) (nth 1 ...) (nth 2 ...))) (if (and (eq dolog ...) (eq
org-inhibit-logging ...)) (progn (setq
dolog ...))) (if (or (and ... ...) (and org-state ... ...)) (progn
(org-add-planning-info nil nil
...))) (if (and now-done-p org-log-done) (progn (org-add-planning-info ...
...) (if ... ...))) (if
(and org-state dolog) (progn (org-add-log-setup ... org-state this
dolog)))))
(org-todo-trigger-tag-changes org-state) (if org-auto-align-tags (progn
(org-align-tags))) (if
org-provide-todo-statistics (progn (org-update-parent-todo-statistics)))
(if (and (boundp
'org-clock-out-when-done) org-clock-out-when-done) (progn
(org-clock-out-if-current))) (run-hooks
'org-after-todo-state-change-hook) (if (and arg (not (member org-state
org-done-keywords))) (progn
(setq head (org-get-todo-sequence-head org-state)))) (put-text-property
(line-beginning-position)
(line-end-position) 'org-todo-head head) (if now-done-p (progn (if (boundp
'org-agenda-headline-snapshot-before-repeat) (progn (let ... ...)))
(org-auto-repeat-maybe
org-state))) (if (and (outline-on-heading-p) (not (bolp)) (save-excursion
(forward-line 0)
(looking-at org-todo-line-regexp)) (< (point) (+ 2 (or ... ...)))) (progn
(goto-char (or (match-end
2) (match-end 1))) (and (looking-at " ") (not (looking-at " *:"))
(just-one-space)))) (if
org-trigger-hook (progn (save-excursion (run-hook-with-args
'org-trigger-hook change-plist)))) (if
commentp (progn (org-toggle-comment)))))
(save-excursion (catch 'exit (org-back-to-heading t) (if
(org-in-commented-heading-p t) (progn
(org-toggle-comment) (setq commentp t))) (if (looking-at
org-outline-regexp) (progn (goto-char (1-
(match-end 0))))) (or (looking-at (concat " +" org-todo-regexp "\\( +\\|[
\11]*$\\)")) (looking-at
"\\(?: *\\|[ \11]*$\\)")) (let* ((match-data (match-data)) (startpos
(copy-marker
(line-beginning-position))) (force-log (and (equal arg '...) (prog1 t (setq
arg nil)))) (logging
(let ((saved-match-data ...)) (unwind-protect (progn ...) (set-match-data
saved-match-data t))))
(org-log-done org-log-done) (org-log-repeat org-log-repeat)
(org-todo-log-states
org-todo-log-states) (org-inhibit-logging (if (equal arg 0) (progn (setq
arg nil) 'note)
org-inhibit-logging)) (this (match-string 1)) (hl-pos (match-beginning 0))
(head
(org-get-todo-sequence-head this)) (ass (assoc head org-todo-kwd-alist))
(interpret (nth 1 ass))
(done-word (nth 3 ass)) (final-done-word (nth 4 ass)) (org-last-state (or
this ""))
(completion-ignore-case t) (member (member this org-todo-keywords-1)) (tail
(cdr member)) (org-state
(cond ((eq arg ...) (if this ... ...)) ((eq arg ...) (if ... nil ...)) (arg
(cond ... ... ... ...
... ... ... ...)) ((and org-todo-key-trigger org-use-fast-todo-selection)
(org-fast-todo-selection
this)) ((null member) (or head ...)) ((equal this final-done-word) nil)
((null tail) nil) ((memq
interpret ...) (if ... ... ...)) (t (car tail)))) (org-state (or
(run-hook-with-args-until-success
'org-todo-get-default-hook org-state org-last-state) org-state)) (next (if
(org-string-nw-p
org-state) (concat " " org-state " ") " ")) (change-plist (list :type
'todo-state-change :from this
:to org-state :position startpos)) dolog now-done-p) (if org-blocker-hook
(progn (let
(org-blocked-by-checkboxes block-reason) (setq org-last-todo-state-is-todo
(not ...)) (if
(save-excursion ...) nil (setq block-reason ...) (if ... ... ... ...)))))
(store-match-data
match-data) (let ((org-fold-core--ignore-modifications t)) (unwind-protect
(progn (goto-char
(match-beginning 0)) (replace-match "") (insert-before-markers-and-inherit
next) (if
(org-invisible-p ...) nil (org-fold-region ... ... nil ...))) (setq
org-fold-core--last-buffer-chars-modified-tick
(buffer-chars-modified-tick)))) (cond ((and org-state
(equal this org-state)) (message "TODO state was already %s" (org-trim
next))) ((not
(pos-visible-in-window-p hl-pos)) (message "TODO state changed to %s"
(org-trim next)))) (if head
nil (progn (setq head (org-get-todo-sequence-head org-state)) (setq ass
(assoc head
org-todo-kwd-alist)) (setq interpret (nth 1 ass)) (setq done-word (nth 3
ass)) (setq final-done-word
(nth 4 ass)))) (if (memq arg '(nextset previousset)) (progn (message
"Keyword-Set %d/%d: %s" (-
(length org-todo-sets) -1 (length ...)) (length org-todo-sets) (mapconcat
'identity (assoc org-state
org-todo-sets) " ")))) (setq org-last-todo-state-is-todo (not (member
org-state org-done-keywords)))
(setq now-done-p (and (member org-state org-done-keywords) (not (member
this org-done-keywords))))
(and logging (org-local-logging logging)) (if (or (and (or
org-todo-log-states org-log-done) (not
(eq org-inhibit-logging t)) (not (memq arg ...))) force-log) (progn (setq
dolog (or (if force-log
...) (nth 1 ...) (nth 2 ...))) (if (and (eq dolog ...) (eq
org-inhibit-logging ...)) (progn (setq
dolog ...))) (if (or (and ... ...) (and org-state ... ...)) (progn
(org-add-planning-info nil nil
...))) (if (and now-done-p org-log-done) (progn (org-add-planning-info ...
...) (if ... ...))) (if
(and org-state dolog) (progn (org-add-log-setup ... org-state this
dolog)))))
(org-todo-trigger-tag-changes org-state) (if org-auto-align-tags (progn
(org-align-tags))) (if
org-provide-todo-statistics (progn (org-update-parent-todo-statistics)))
(if (and (boundp
'org-clock-out-when-done) org-clock-out-when-done) (progn
(org-clock-out-if-current))) (run-hooks
'org-after-todo-state-change-hook) (if (and arg (not (member org-state
org-done-keywords))) (progn
(setq head (org-get-todo-sequence-head org-state)))) (put-text-property
(line-beginning-position)
(line-end-position) 'org-todo-head head) (if now-done-p (progn (if (boundp
'org-agenda-headline-snapshot-before-repeat) (progn (let ... ...)))
(org-auto-repeat-maybe
org-state))) (if (and (outline-on-heading-p) (not (bolp)) (save-excursion
(forward-line 0)
(looking-at org-todo-line-regexp)) (< (point) (+ 2 (or ... ...)))) (progn
(goto-char (or (match-end
2) (match-end 1))) (and (looking-at " ") (not (looking-at " *:"))
(just-one-space)))) (if
org-trigger-hook (progn (save-excursion (run-hook-with-args
'org-trigger-hook change-plist)))) (if
commentp (progn (org-toggle-comment))))))
(let ((org-blocker-hook org-blocker-hook) commentp case-fold-search) (if
(equal arg '(64)) (progn
(progn (setq arg nil) (setq org-blocker-hook nil)))) (if (and
org-blocker-hook (or
org-inhibit-blocking (org-entry-get nil "NOBLOCKING"))) (progn (setq
org-blocker-hook nil)))
(save-excursion (catch 'exit (org-back-to-heading t) (if
(org-in-commented-heading-p t) (progn
(org-toggle-comment) (setq commentp t))) (if (looking-at
org-outline-regexp) (progn (goto-char (1-
(match-end 0))))) (or (looking-at (concat " +" org-todo-regexp "\\( +\\|[
\11]*$\\)")) (looking-at
"\\(?: *\\|[ \11]*$\\)")) (let* ((match-data (match-data)) (startpos
(copy-marker
(line-beginning-position))) (force-log (and (equal arg ...) (prog1 t ...)))
(logging (let (...)
(unwind-protect ... ...))) (org-log-done org-log-done) (org-log-repeat
org-log-repeat)
(org-todo-log-states org-todo-log-states) (org-inhibit-logging (if (equal
arg 0) (progn ... ...)
org-inhibit-logging)) (this (match-string 1)) (hl-pos (match-beginning 0))
(head
(org-get-todo-sequence-head this)) (ass (assoc head org-todo-kwd-alist))
(interpret (nth 1 ass))
(done-word (nth 3 ass)) (final-done-word (nth 4 ass)) (org-last-state (or
this ""))
(completion-ignore-case t) (member (member this org-todo-keywords-1)) (tail
(cdr member)) (org-state
(cond (... ...) (... ...) (arg ...) (... ...) (... ...) (... nil) (... nil)
(... ...) (t ...)))
(org-state (or (run-hook-with-args-until-success ... org-state
org-last-state) org-state)) (next (if
(org-string-nw-p org-state) (concat " " org-state " ") " ")) (change-plist
(list :type
'todo-state-change :from this :to org-state :position startpos)) dolog
now-done-p) (if
org-blocker-hook (progn (let (org-blocked-by-checkboxes block-reason) (setq
org-last-todo-state-is-todo ...) (if ... nil ... ...)))) (store-match-data
match-data) (let
((org-fold-core--ignore-modifications t)) (unwind-protect (progn (goto-char
...) (replace-match "")
(insert-before-markers-and-inherit next) (if ... nil ...)) (setq
org-fold-core--last-buffer-chars-modified-tick
(buffer-chars-modified-tick)))) (cond ((and org-state
(equal this org-state)) (message "TODO state was already %s" (org-trim
next))) ((not
(pos-visible-in-window-p hl-pos)) (message "TODO state changed to %s"
(org-trim next)))) (if head
nil (progn (setq head (org-get-todo-sequence-head org-state)) (setq ass
(assoc head
org-todo-kwd-alist)) (setq interpret (nth 1 ass)) (setq done-word (nth 3
ass)) (setq final-done-word
(nth 4 ass)))) (if (memq arg '(nextset previousset)) (progn (message
"Keyword-Set %d/%d: %s" (- ...
-1 ...) (length org-todo-sets) (mapconcat ... ... " ")))) (setq
org-last-todo-state-is-todo (not
(member org-state org-done-keywords))) (setq now-done-p (and (member
org-state org-done-keywords)
(not (member this org-done-keywords)))) (and logging (org-local-logging
logging)) (if (or (and (or
org-todo-log-states org-log-done) (not ...) (not ...)) force-log) (progn
(setq dolog (or ... ...
...)) (if (and ... ...) (progn ...)) (if (or ... ...) (progn ...)) (if (and
now-done-p org-log-done)
(progn ... ...)) (if (and org-state dolog) (progn ...))))
(org-todo-trigger-tag-changes org-state)
(if org-auto-align-tags (progn (org-align-tags))) (if
org-provide-todo-statistics (progn
(org-update-parent-todo-statistics))) (if (and (boundp
'org-clock-out-when-done)
org-clock-out-when-done) (progn (org-clock-out-if-current))) (run-hooks
'org-after-todo-state-change-hook) (if (and arg (not (member org-state
org-done-keywords))) (progn
(setq head (org-get-todo-sequence-head org-state)))) (put-text-property
(line-beginning-position)
(line-end-position) 'org-todo-head head) (if now-done-p (progn (if (boundp
...) (progn ...))
(org-auto-repeat-maybe org-state))) (if (and (outline-on-heading-p) (not
(bolp)) (save-excursion
(forward-line 0) (looking-at org-todo-line-regexp)) (< (point) (+ 2 ...)))
(progn (goto-char (or ...
...)) (and (looking-at " ") (not ...) (just-one-space)))) (if
org-trigger-hook (progn
(save-excursion (run-hook-with-args ... change-plist)))) (if commentp (progn
(org-toggle-comment)))))))
(if (and (org-region-active-p) org-loop-over-headlines-in-active-region)
(let ((cl (if (eq
org-loop-over-headlines-in-active-region 'start-level) 'region-start-level
'region))
org-loop-over-headlines-in-active-region) (org-map-entries #'(lambda nil
(org-todo arg)) nil cl (if
(org-invisible-p) (progn (org-end-of-subtree nil t))))) (if (equal arg
'(16)) (progn (setq arg
'nextset))) (if (equal (prefix-numeric-value arg) -1) (progn
(org-cancel-repeaters) (setq arg nil)))
(if (< (prefix-numeric-value arg) -1) (progn (user-error "Prefix argument
%d not supported" arg)))
(let ((org-blocker-hook org-blocker-hook) commentp case-fold-search) (if
(equal arg '(64)) (progn
(progn (setq arg nil) (setq org-blocker-hook nil)))) (if (and
org-blocker-hook (or
org-inhibit-blocking (org-entry-get nil "NOBLOCKING"))) (progn (setq
org-blocker-hook nil)))
(save-excursion (catch 'exit (org-back-to-heading t) (if
(org-in-commented-heading-p t) (progn
(org-toggle-comment) (setq commentp t))) (if (looking-at
org-outline-regexp) (progn (goto-char (1-
...)))) (or (looking-at (concat " +" org-todo-regexp "\\( +\\|[
\11]*$\\)")) (looking-at "\\(?:
*\\|[ \11]*$\\)")) (let* ((match-data (match-data)) (startpos (copy-marker
...)) (force-log (and ...
...)) (logging (let ... ...)) (org-log-done org-log-done) (org-log-repeat
org-log-repeat)
(org-todo-log-states org-todo-log-states) (org-inhibit-logging (if ... ...
org-inhibit-logging))
(this (match-string 1)) (hl-pos (match-beginning 0)) (head
(org-get-todo-sequence-head this)) (ass
(assoc head org-todo-kwd-alist)) (interpret (nth 1 ass)) (done-word (nth 3
ass)) (final-done-word
(nth 4 ass)) (org-last-state (or this "")) (completion-ignore-case t)
(member (member this
org-todo-keywords-1)) (tail (cdr member)) (org-state (cond ... ... ... ...
... ... ... ... ...))
(org-state (or ... org-state)) (next (if ... ... " ")) (change-plist (list
:type ... :from this :to
org-state :position startpos)) dolog now-done-p) (if org-blocker-hook
(progn (let ... ... ...)))
(store-match-data match-data) (let ((org-fold-core--ignore-modifications
t)) (unwind-protect (progn
... ... ... ...) (setq org-fold-core--last-buffer-chars-modified-tick
...))) (cond ((and org-state
...) (message "TODO state was already %s" ...)) ((not ...) (message "TODO
state changed to %s"
...))) (if head nil (progn (setq head ...) (setq ass ...) (setq interpret
...) (setq done-word ...)
(setq final-done-word ...))) (if (memq arg '...) (progn (message
"Keyword-Set %d/%d: %s" ... ...
...))) (setq org-last-todo-state-is-todo (not (member org-state
org-done-keywords))) (setq
now-done-p (and (member org-state org-done-keywords) (not ...))) (and
logging (org-local-logging
logging)) (if (or (and ... ... ...) force-log) (progn (setq dolog ...) (if
... ...) (if ... ...) (if
... ...) (if ... ...))) (org-todo-trigger-tag-changes org-state) (if
org-auto-align-tags (progn
(org-align-tags))) (if org-provide-todo-statistics (progn
(org-update-parent-todo-statistics))) (if
(and (boundp ...) org-clock-out-when-done) (progn
(org-clock-out-if-current))) (run-hooks
'org-after-todo-state-change-hook) (if (and arg (not ...)) (progn (setq
head ...)))
(put-text-property (line-beginning-position) (line-end-position)
'org-todo-head head) (if now-done-p
(progn (if ... ...) (org-auto-repeat-maybe org-state))) (if (and
(outline-on-heading-p) (not ...)
(save-excursion ... ...) (< ... ...)) (progn (goto-char ...) (and ... ...
...))) (if
org-trigger-hook (progn (save-excursion ...))) (if commentp (progn
(org-toggle-comment))))))))
org-todo(nil)
funcall-interactively(org-todo nil)
call-interactively(org-todo nil nil)
command-execute(org-todo)
#+end_example
My environment:
Emacs version: GNU Emacs 31.0.50 (commit nil)
Org mode version: 9.8-pre (using git branch "main" on latest commit
"c2d57df0e")
[stardiviner] <Hack this world!> GPG key ID: 47C32433
IRC(freeenode): stardiviner Twitter: @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/
[-- Attachment #2: Type: text/html, Size: 25250 bytes --]
reply other threads:[~2025-01-13 5:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
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=CAL1eYu+eOa2hOANY+VKDfAoYtaoY-62b759iAzScADSaeEM+Hw@mail.gmail.com \
--to=numbchild@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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
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).