From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 0MfwJg6ghGcS/AAAqHPOHw:P1 (envelope-from ) for ; Mon, 13 Jan 2025 05:09:34 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 0MfwJg6ghGcS/AAAqHPOHw (envelope-from ) for ; Mon, 13 Jan 2025 06:09:34 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=UzHjxUDu; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1736744974; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=K0hH8j087QQH7WxIyZdnOqUXSLCxWXrYxMZ2xztqInM=; b=X+jP0V0Wb0AhP6jFZSpr9T6Wq5qzQSNC5qqOU7nMn4lsllGiEEZOrUPlE6f4zsGGABXfNE 7G/VF8N9vDf5UMN6H6Z0/R35Ap2dxweXerxYSLCPbzF4moUN7Ynqb+MH/p9H7M5nzAC592 ZfNUPTgfoBFJ9xM97LCMy0lXIg7AOr2d2A5NQr/zVjwUGm5jo6L7IgfFRuQc55LVL9Wa2R OGJfG5M3KQOuJ13W1gzYJql6ELX8+hHEQ848Ul1UX3dL5BAHyw96NFiL9nqmGqYkGj3e+S wF2WQ9/wEAyaBShAoSiOjWG9XB3hlZRc5B75VNaB19KOw98ZCRWfOREgi/orfg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=UzHjxUDu; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1736744974; a=rsa-sha256; cv=none; b=MgLVVjy5USTwgaKGPgu3IEKU1c9izlYXbpeI4+4FVtIMhM7VZgqb3goISAgnyeZGxePHSf /c/IszlI3hUqREy27PTayYtq78GHq2rDYHccfnpSZKNODeOXMS2NFtU68Jhn1Tni89+hHU lS4N9ati1lkS13OOR8fpzyMl3/2HEyRyA0jud0Nw6RT9cb8wF9MgLbqhFUc8x4dBQm1SuK nHSI97enqOwuRY6q98y06lXAP34xHu8kPXV99EWD6rmGvxPeip5bXa4LphliKe/TMSkf7/ kLXkJBIOsg91GyNpLNJ1+qBJutb3uO5u4moMVFE+Ig9Lz88A9MizSb73ZI2Q+g== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 121FF96C70 for ; Mon, 13 Jan 2025 06:09:34 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tXCgg-0005Mi-GS; Mon, 13 Jan 2025 00:08:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tXCd2-0004kJ-R2 for emacs-orgmode@gnu.org; Mon, 13 Jan 2025 00:08:20 -0500 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tXCcx-0007g1-Tb for emacs-orgmode@gnu.org; Mon, 13 Jan 2025 00:04:44 -0500 Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-3061f1e534bso3957191fa.1 for ; Sun, 12 Jan 2025 21:04:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736744676; x=1737349476; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=K0hH8j087QQH7WxIyZdnOqUXSLCxWXrYxMZ2xztqInM=; b=UzHjxUDuIB6sVoYzogWYAXtdkfNUaLKHICTZ393b3mX6kpw5BR/Sv1m+MlAb3Aaloo eqjVnY8Jmxg7TIFCVHT5tSYIZAf5UdA42DymP6xiInObuTMmLVVqZsr49fax+iUc9eFA SYhmKSmM6wRgll3ptJeYXcaZ1ZHWsR44u4+izzC2CkbCfcyVsBYKBTKp3oPiWX8dJ6aD S5bayOS1QknrURnEIDlJePQByF4aY43YYBmJ61bdg3+JMvqvS9I8XcRRezibVissu7sh Q9BIzOTMPxlDxyV8MnZXzZu+qNic09JCfi3+MqlPsTmQ+hXFWtvVCp4MQnQmVCztJczh DW3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736744676; x=1737349476; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=K0hH8j087QQH7WxIyZdnOqUXSLCxWXrYxMZ2xztqInM=; b=B2mYGPAg73BupHPE+c6FQI5Z2hDzabWnnudz1lFQ06rQq95hJVAWUvcLYpiUnFfyDE W7RbBOd8UGGSU5j4wK516xQ/G5UoxaG4Df4t5f9tfpi5R27pKJtpUe7MKI8kCHW2oTod PB7XMEbMOaXns4+sroUe18tImIUmnq0jqs896PgWCLq4u2jqmBpMcwxbOWlTbRJCiVNP +JTGuNq0egwPiT79ybbOdBnDrdAnslG1RXYItt5WuqCx/k4g+E7XD445NG7v+hRevlBi I/QeGS1HQHz5b0JZ3oY7JVZ9iIKuy/M9+L4cfKejrQNMeDpz9eumUVvygcrbd9XJAxen DeUA== X-Gm-Message-State: AOJu0Yx+o7i7VnOyvGjRLBCPZtCjB599TltwpWW7DK7I3bfNgpZj8rin vEt+dEebl8kOebbwHEkvwFwHg4AUA/KQD8bBfDUEmw+xdXBQk658I6xbrLzINFNCYHdKB4GZTle mU5i2kZ1fd4FRhSD4ndEwu6nHnqXlM/tdpg== X-Gm-Gg: ASbGncuV1nVPY1rjCW2fvf00y0L7hHIMQEjsFy0x3/vEDZHrAPrLro3Op+KIdzoQHKb YyJgUTcLoYDLE5HdvB46nySrpUmIpPIDu4Qgo X-Google-Smtp-Source: AGHT+IEYlxnKFgXSPxgbk+BZrVhMqMZ07N7vF/c5IDlqhsOXiWIucpPTWmQMWjrZvXm18S+jnqq02x5RYpm9aQahY0Q= X-Received: by 2002:a05:6512:3c83:b0:540:206b:c355 with SMTP id 2adb3069b0e04-542845ba143mr6350035e87.19.1736744675137; Sun, 12 Jan 2025 21:04:35 -0800 (PST) MIME-Version: 1.0 From: stardiviner Date: Mon, 13 Jan 2025 13:04:08 +0800 X-Gm-Features: AbW1kvbW_DBcejt-Dj0hBORTrderhVj3wM2a9L2fT-h9MgsZu00_cNBmUlAhx4U Message-ID: Subject: [ERROR] org-todo [C-c C-t] change task todo state raised error To: Org mode mailing list Content-Type: multipart/alternative; boundary="0000000000006d630f062b8f6181" Received-SPF: pass client-ip=2a00:1450:4864:20::22a; envelope-from=numbchild@gmail.com; helo=mail-lj1-x22a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -9.52 X-Spam-Score: -9.52 X-Migadu-Queue-Id: 121FF96C70 X-Migadu-Scanner: mx10.migadu.com X-TUID: sjyZNtkuvMcI --0000000000006d630f062b8f6181 Content-Type: text/plain; charset="UTF-8" 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 # 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] 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/ --0000000000006d630f062b8f6181 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
When I change a task from "TODO" to "D= ONE", or "DONE" to "TODO", or
other todo keywor= ds with [C-c C-t]. Org mode will raise bellowing error
"*randomly*&= quot;. (I can't reproduce it in stable.)

#+begin_example
Debu= gger entered--Lisp error: (args-out-of-range #<buffer Beauty.org> 0 3= 092985)
=C2=A0 replace-match("")
=C2=A0 (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 'outli= ne)))
=C2=A0 (unwind-protect (progn (goto-char (match-beginning 0)) (rep= lace-match "")
(insert-before-markers-and-inherit next) (if (o= rg-invisible-p (line-beginning-position)) nil
(org-fold-region (line-beg= inning-position) (line-end-position) nil 'outline))) (setq
org-fold-= core--last-buffer-chars-modified-tick (buffer-chars-modified-tick)))
=C2= =A0 (let ((org-fold-core--ignore-modifications t)) (unwind-protect (progn (= goto-char (match-beginning
0)) (replace-match "") (insert-befo= re-markers-and-inherit next) (if (org-invisible-p
(line-beginning-positi= on)) nil (org-fold-region (line-beginning-position) (line-end-position) nil=
'outline))) (setq org-fold-core--last-buffer-chars-modified-tick (b= uffer-chars-modified-tick))))
=C2=A0 (let* ((match-data (match-data)) (s= tartpos (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-lo= g-states org-todo-log-states) (org-inhibit-logging (if
(equal arg 0) (pr= ogn (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 &quo= t;")) (completion-ignore-case t) (member (member this org-todo-keyword= s-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-fa= st-todo-selection this)) ((null member) (or head ...)) ((equal this final-d= one-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 (i= f (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-block= er-hook (progn (let (org-blocked-by-checkboxes block-reason) (setq
org-l= ast-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-c= har (match-beginning 0)) (replace-match "")
(insert-before-mar= kers-and-inherit next) (if (org-invisible-p ...) nil (org-fold-region ... .= .. nil
...))) (setq org-fold-core--last-buffer-chars-modified-tick (buff= er-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&q= uot; (org-trim next)))) (if head
nil (progn (setq head (org-get-todo-seq= uence-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
or= g-todo-sets) " ")))) (setq org-last-todo-state-is-todo (not (memb= er org-state org-done-keywords)))
(setq now-done-p (and (member org-stat= e org-done-keywords) (not (member this org-done-keywords))))
(and loggin= g (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-plannin= g-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-ch= anges org-state) (if org-auto-align-tags (progn (org-align-tags))) (if
o= rg-provide-todo-statistics (progn (org-update-parent-todo-statistics))) (if= (and (boundp
'org-clock-out-when-done) org-clock-out-when-done) (pr= ogn (org-clock-out-if-current))) (run-hooks
'org-after-todo-state-ch= ange-hook) (if (and arg (not (member org-state org-done-keywords))) (progn<= br>(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-befor= e-repeat) (progn (let ... ...))) (org-auto-repeat-maybe
org-state))) (if= (and (outline-on-heading-p) (not (bolp)) (save-excursion (forward-line 0)<= br>(looking-at org-todo-line-regexp)) (< (point) (+ 2 (or ... ...)))) (p= rogn (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-h= ook change-plist)))) (if
commentp (progn (org-toggle-comment))))
=C2= =A0 (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 (a= nd (equal arg '...) (prog1 t (setq arg nil)))) (logging
(let ((saved= -match-data ...)) (unwind-protect (progn ...) (set-match-data saved-match-d= ata t))))
(org-log-done org-log-done) (org-log-repeat org-log-repeat) (o= rg-todo-log-states
org-todo-log-states) (org-inhibit-logging (if (equal = arg 0) (progn (setq arg nil) 'note)
org-inhibit-logging)) (this (mat= ch-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 ...) (i= f this ... ...)) ((eq arg ...) (if ... nil ...)) (arg (cond ... ... ... ...=
... ... ... ...)) ((and org-todo-key-trigger org-use-fast-todo-selectio= n) (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-suc= cess
'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-ch= ange :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
matc= h-data) (let ((org-fold-core--ignore-modifications t)) (unwind-protect (pro= gn (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-modifi= ed-tick (buffer-chars-modified-tick)))) (cond ((and org-state
(equal thi= s org-state)) (message "TODO state was already %s" (org-trim next= ))) ((not
(pos-visible-in-window-p hl-pos)) (message "TODO state ch= anged 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-a= list)) (setq interpret (nth 1 ass)) (setq done-word (nth 3 ass)) (setq fina= l-done-word
(nth 4 ass)))) (if (memq arg '(nextset previousset)) (pr= ogn (message "Keyword-Set %d/%d: %s" (-
(length org-todo-sets)= -1 (length ...)) (length org-todo-sets) (mapconcat 'identity (assoc or= g-state
org-todo-sets) " ")))) (setq org-last-todo-state-is-to= do (not (member org-state org-done-keywords)))
(setq now-done-p (and (me= mber org-state org-done-keywords) (not (member this org-done-keywords))))(and logging (org-local-logging logging)) (if (or (and (or org-todo-log-s= tates 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 (set= q
dolog ...))) (if (or (and ... ...) (and org-state ... ...)) (progn (or= g-add-planning-info nil nil
...))) (if (and now-done-p org-log-done) (pr= ogn (org-add-planning-info ... ...) (if ... ...))) (if
(and org-state do= log) (progn (org-add-log-setup ... org-state this dolog)))))
(org-todo-t= rigger-tag-changes org-state) (if org-auto-align-tags (progn (org-align-tag= s))) (if
org-provide-todo-statistics (progn (org-update-parent-todo-stat= istics))) (if (and (boundp
'org-clock-out-when-done) org-clock-out-w= hen-done) (progn (org-clock-out-if-current))) (run-hooks
'org-after-= todo-state-change-hook) (if (and arg (not (member org-state org-done-keywor= ds))) (progn
(setq head (org-get-todo-sequence-head org-state)))) (put-t= ext-property (line-beginning-position)
(line-end-position) 'org-todo= -head head) (if now-done-p (progn (if (boundp
'org-agenda-headline-s= napshot-before-repeat) (progn (let ... ...))) (org-auto-repeat-maybe
org= -state))) (if (and (outline-on-heading-p) (not (bolp)) (save-excursion (for= ward-line 0)
(looking-at org-todo-line-regexp)) (< (point) (+ 2 (or .= .. ...)))) (progn (goto-char (or (match-end
2) (match-end 1))) (and (loo= king-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-commen= t)))))
=C2=A0 (save-excursion (catch 'exit (org-back-to-heading t) (= if (org-in-commented-heading-p t) (progn
(org-toggle-comment) (setq comm= entp t))) (if (looking-at org-outline-regexp) (progn (goto-char (1-
(mat= ch-end 0))))) (or (looking-at (concat " +" org-todo-regexp "= \\( +\\|[ \11]*$\\)")) (looking-at
"\\(?: *\\|[ \11]*$\\)"= ;)) (let* ((match-data (match-data)) (startpos (copy-marker
(line-beginn= ing-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) (or= g-inhibit-logging (if (equal arg 0) (progn (setq arg nil) 'note)
org= -inhibit-logging)) (this (match-string 1)) (hl-pos (match-beginning 0)) (he= ad
(org-get-todo-sequence-head this)) (ass (assoc head org-todo-kwd-alis= t)) (interpret (nth 1 ass))
(done-word (nth 3 ass)) (final-done-word (nt= h 4 ass)) (org-last-state (or this ""))
(completion-ignore-cas= e t) (member (member this org-todo-keywords-1)) (tail (cdr member)) (org-st= ate
(cond ((eq arg ...) (if this ... ...)) ((eq arg ...) (if ... nil ...= )) (arg (cond ... ... ... ...
... ... ... ...)) ((and org-todo-key-trigg= er org-use-fast-todo-selection) (org-fast-todo-selection
this)) ((null m= ember) (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-sta= te org-last-state) org-state)) (next (if (org-string-nw-p
org-state) (co= ncat " " org-state " ") " ")) (change-plist (= list :type 'todo-state-change :from this
:to org-state :position sta= rtpos)) dolog now-done-p) (if org-blocker-hook (progn (let
(org-blocked-= by-checkboxes block-reason) (setq org-last-todo-state-is-todo (not ...)) (i= f
(save-excursion ...) nil (setq block-reason ...) (if ... ... ... ...))= ))) (store-match-data
match-data) (let ((org-fold-core--ignore-modificat= ions t)) (unwind-protect (progn (goto-char
(match-beginning 0)) (replace= -match "") (insert-before-markers-and-inherit next) (if
(org-i= nvisible-p ...) nil (org-fold-region ... ... nil ...))) (setq
org-fold-c= ore--last-buffer-chars-modified-tick (buffer-chars-modified-tick)))) (cond = ((and org-state
(equal this org-state)) (message "TODO state was al= ready %s" (org-trim next))) ((not
(pos-visible-in-window-p hl-pos))= (message "TODO state changed to %s" (org-trim next)))) (if head<= br>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 &#= 39;(nextset previousset)) (progn (message "Keyword-Set %d/%d: %s"= (-
(length org-todo-sets) -1 (length ...)) (length org-todo-sets) (mapc= oncat 'identity (assoc org-state
org-todo-sets) " ")))) (s= etq 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)) (i= f (or (and (or org-todo-log-states org-log-done) (not
(eq org-inhibit-lo= gging t)) (not (memq arg ...))) force-log) (progn (setq dolog (or (if force= -log
...) (nth 1 ...) (nth 2 ...))) (if (and (eq dolog ...) (eq org-inhi= bit-logging ...)) (progn (setq
dolog ...))) (if (or (and ... ...) (and o= rg-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 t= his dolog)))))
(org-todo-trigger-tag-changes org-state) (if org-auto-ali= gn-tags (progn (org-align-tags))) (if
org-provide-todo-statistics (progn= (org-update-parent-todo-statistics))) (if (and (boundp
'org-clock-o= ut-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 (mem= ber org-state org-done-keywords))) (progn
(setq head (org-get-todo-seque= nce-head org-state)))) (put-text-property (line-beginning-position)
(lin= e-end-position) 'org-todo-head head) (if now-done-p (progn (if (boundp<= br>'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-rege= xp)) (< (point) (+ 2 (or ... ...)))) (progn (goto-char (or (match-end2) (match-end 1))) (and (looking-at " ") (not (looking-at "= *:")) (just-one-space)))) (if
org-trigger-hook (progn (save-excurs= ion (run-hook-with-args 'org-trigger-hook change-plist)))) (if
comme= ntp (progn (org-toggle-comment))))))
=C2=A0 (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 'exi= t (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) (p= rogn (goto-char (1-
(match-end 0))))) (or (looking-at (concat " +&q= uot; 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-k= wd-alist)) (interpret (nth 1 ass))
(done-word (nth 3 ass)) (final-done-w= ord (nth 4 ass)) (org-last-state (or this ""))
(completion-ign= ore-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-un= til-success ... org-state org-last-state) org-state)) (next (if
(org-str= ing-nw-p org-state) (concat " " org-state " ") " &= quot;)) (change-plist (list :type
'todo-state-change :from this :to = org-state :position startpos)) dolog now-done-p) (if
org-blocker-hook (p= rogn (let (org-blocked-by-checkboxes block-reason) (setq
org-last-todo-s= tate-is-todo ...) (if ... nil ... ...)))) (store-match-data match-data) (le= t
((org-fold-core--ignore-modifications t)) (unwind-protect (progn (goto= -char ...) (replace-match "")
(insert-before-markers-and-inher= it next) (if ... nil ...)) (setq
org-fold-core--last-buffer-chars-modifi= ed-tick (buffer-chars-modified-tick)))) (cond ((and org-state
(equal thi= s org-state)) (message "TODO state was already %s" (org-trim next= ))) ((not
(pos-visible-in-window-p hl-pos)) (message "TODO state ch= anged 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-a= list)) (setq interpret (nth 1 ass)) (setq done-word (nth 3 ass)) (setq fina= l-done-word
(nth 4 ass)))) (if (memq arg '(nextset previousset)) (pr= ogn (message "Keyword-Set %d/%d: %s" (- ...
-1 ...) (length or= g-todo-sets) (mapconcat ... ... " ")))) (setq org-last-todo-state= -is-todo (not
(member org-state org-done-keywords))) (setq now-done-p (a= nd (member org-state org-done-keywords)
(not (member this org-done-keywo= rds)))) (and logging (org-local-logging logging)) (if (or (and (or
org-t= odo-log-states org-log-done) (not ...) (not ...)) force-log) (progn (setq d= olog (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-sta= tistics (progn
(org-update-parent-todo-statistics))) (if (and (boundp &#= 39;org-clock-out-when-done)
org-clock-out-when-done) (progn (org-clock-o= ut-if-current))) (run-hooks
'org-after-todo-state-change-hook) (if (= and arg (not (member org-state org-done-keywords))) (progn
(setq head (o= rg-get-todo-sequence-head org-state)))) (put-text-property (line-beginning-= position)
(line-end-position) 'org-todo-head head) (if now-done-p (p= rogn (if (boundp ...) (progn ...))
(org-auto-repeat-maybe org-state))) (= if (and (outline-on-heading-p) (not (bolp)) (save-excursion
(forward-lin= e 0) (looking-at org-todo-line-regexp)) (< (point) (+ 2 ...))) (progn (g= oto-char (or ...
...)) (and (looking-at " ") (not ...) (just-o= ne-space)))) (if org-trigger-hook (progn
(save-excursion (run-hook-with-= args ... change-plist)))) (if commentp (progn
(org-toggle-comment)))))))=
=C2=A0 (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-headli= nes-in-active-region) (org-map-entries #'(lambda nil (org-todo arg)) ni= l cl (if
(org-invisible-p) (progn (org-end-of-subtree nil t))))) (if (eq= ual arg '(16)) (progn (setq arg
'nextset))) (if (equal (prefix-n= umeric-value arg) -1) (progn (org-cancel-repeaters) (setq arg nil)))
(if= (< (prefix-numeric-value arg) -1) (progn (user-error "Prefix argum= ent %d not supported" arg)))
(let ((org-blocker-hook org-blocker-ho= ok) commentp case-fold-search) (if (equal arg '(64)) (progn
(progn (= setq arg nil) (setq org-blocker-hook nil)))) (if (and org-blocker-hook (or<= br>org-inhibit-blocking (org-entry-get nil "NOBLOCKING"))) (progn= (setq org-blocker-hook nil)))
(save-excursion (catch 'exit (org-bac= k-to-heading t) (if (org-in-commented-heading-p t) (progn
(org-toggle-co= mment) (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 ...)) (f= orce-log (and ...
...)) (logging (let ... ...)) (org-log-done org-log-do= ne) (org-log-repeat org-log-repeat)
(org-todo-log-states org-todo-log-st= ates) (org-inhibit-logging (if ... ... org-inhibit-logging))
(this (matc= h-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)) (d= one-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 :posit= ion startpos)) dolog now-done-p) (if org-blocker-hook (progn (let ... ... .= ..)))
(store-match-data match-data) (let ((org-fold-core--ignore-modific= ations t)) (unwind-protect (progn
... ... ... ...) (setq org-fold-core--= last-buffer-chars-modified-tick ...))) (cond ((and org-state
...) (messa= ge "TODO state was already %s" ...)) ((not ...) (message "TO= DO state changed to %s"
...))) (if head nil (progn (setq head ...) = (setq ass ...) (setq interpret ...) (setq done-word ...)
(setq final-don= e-word ...))) (if (memq arg '...) (progn (message "Keyword-Set %d/= %d: %s" ... ...
...))) (setq org-last-todo-state-is-todo (not (memb= er org-state org-done-keywords))) (setq
now-done-p (and (member org-stat= e 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-pr= ovide-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-positio= n) (line-end-position) 'org-todo-head head) (if now-done-p
(progn (i= f ... ...) (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))))))))
=C2=A0 org-todo(nil= )
=C2=A0 funcall-interactively(org-todo nil)
=C2=A0 call-interactivel= y(org-todo nil nil)
=C2=A0 command-execute(org-todo)
#+end_example
My environment:
Emacs version: GNU Emacs 31.0.50 (commit nil)
Or= g mode version: 9.8-pre (using git branch "main" on latest commit= "c2d57df0e")

[stardiviner]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 <Hack this world!>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 G= PG key ID: 47C32433
IRC(freeenode): stardiviner =C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 Twitter:=C2=A0 @numbchild
Key fingerprint =3D 9BAA 92BC = CDDD B9EF 3B36=C2=A0 CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/
--0000000000006d630f062b8f6181--