--text follows this line-- Problem: Now org-insert-todo-heading-respect-content does not respect the TODO state of current heading. How to reproduce: Example: define a todo sequence as followed: "#+TODO: WAIT(w@/!) TODO(t) | DONE(d) CANCELED(c@)" With the cursor at a heading with todo state as "TODO", org-insert-todo-heading will insert a heading with todo state "TODO", the same as the current heading, as stated as in the doc. "Insert a new heading with the same level and TODO state as current heading." However, org-insert-todo-heading-respect-content will insert a heading with todo state "WAIT", not "TODO". Expected behavior: org-insert-todo-heading-respect-content shall act like org-insert-todo-heading, insert "TODO" for the new heading if the current heading is "TODO". Reason: org-insert-todo-heading-respect-content's doc says "Insert TODO heading with ‘org-insert-heading-respect-content’ set to t.", so it shall be expected that the result should be the same as calling org-insert-todo-heading. Another reason to justify this: like above, I defined the TODO sequence to be WAIT-TODO-DONE-CANCELED, so that I can easily switch between WAIT and TODO using S-left and S-right and a single S-right can change TODO to DONE. It is desirable that to manually write one TODO heading, then create all following TODO headings with org-insert-todo-heading-respect-content. However, with the current version of org-mode, org-insert-todo-heading-respect-content will insert WAIT instead of TODO. Old version of org-mode doesn't have the problem. git-blame shows the changes was made in the following commit: b4e41b98792f85a1c6d4c73141de49c78b0e5bf7 Author: Ihor Radchenko AuthorDate: Sat Aug 20 14:22:53 2022 +0800 Commit: Ihor Radchenko CommitDate: Sat Aug 20 14:24:47 2022 +0800 I removed a few variables from the variables lists below for privacy. ------------------------------------------------------------------------ Emacs : GNU Emacs 28.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2023-04-26 Package: Org mode version 9.6.1 ( @ /home/username/.chemacs/spacemacs/elpa/28.2/develop/org-9.6.1/) current state: ============== (setq org-link-elisp-confirm-function 'yes-or-no-p org-ref-cite-onclick-function #[257 "\300 \207" [org-ref-citation-hydra/body] 2 "\n\n(fn _)"] org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-ref-insert-cite-function 'org-ref-insert-cite-link org-download-file-format-function 'org-download-file-format-default org-log-done 'time org-fontify-done-headline nil org-babel-after-execute-hook '(spacemacs/ob-fix-inline-images) org-persist-after-read-hook '(org-element--cache-persist-after-read) org-format-latex-options '(:foreground default :background default :scale 1.5 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\[")) org-export-before-parsing-hook '(org-attach-expand-links) org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-default-notes-file "/home/username/org/notes.org" org-export-async-init-file "/home/username/.chemacs/spacemacs/layers/+emacs/org/local/org-async-init.el" org-download-method 'attach org-ref-bibtex-assoc-pdf-with-entry-move-function 'rename-file org-publish-timestamp-directory "~/.chemacs/spacemacs/.cache/.org-timestamps/" org-archive-hook '(org-attach-archive-delete-maybe) org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function org-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"] org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines org-cycle-optimize-window-after-visibility-change org-cycle-display-inline-images) org-persist-before-read-hook '(org-element--cache-persist-before-read) org-modules '(org-habit ol-doi ol-w3m ol-bbdb ol-bibtex ol-docview ol-gnus ol-info ol-irc ol-mhe ol-rmail ol-eww) org-image-actual-width nil org-mode-hook '(org-ref-org-menu org-indent-mode auto-fill-mode org-ai-mode org-tempo-setup #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-fold-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 #[0 "\301\211 \207" [imenu-create-index-function org-imenu-get-tree] 2] flyspell-mode spacemacs/org-setup-evil-surround spacemacs/load-yasnippet toc-org-enable org-superstar-mode (lambda nil (require 'org-ref)) org-download-enable dotspacemacs//prettify-spacemacs-docs spacemacs//org-babel-do-load-languages spacemacs//evil-org-mode org-eldoc-load spacemacs//init-company-org-mode company-mode) org-babel-load-languages '((shell . t) (js . t) (python . t) (emacs-lisp . t)) org-ref-insert-link-function 'org-ref-insert-link org-id-locations-file "~/.chemacs/spacemacs/.cache/.org-id-locations" org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"] org-download-timestamp "" org-download-abbreviate-filename-function 'file-relative-name org-latex-format-headline-function 'org-latex-format-headline-default-function org-confirm-shell-link-function 'yes-or-no-p org-present-mode-hook '(spacemacs//org-present-start) org-projectile-per-project-filepath "TODOs.org" org-present-mode-quit-hook '(spacemacs//org-present-end) org-download-annotate-function 'org-download-annotate-default org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] outline-isearch-open-invisible-function 'outline-isearch-open-invisible org-ai-on-project-mode-hook '(#[0 "\301\300!\210\302\211 \207" [show-trailing-whitespace make-local-variable nil] 2]) org-odt-format-headline-function 'org-odt-format-headline-default-function org-link-translation-function 'toc-org-unhrefify org-agenda-before-write-hook '(org-agenda-add-entry-text) org-babel-tangle-lang-exts '(("python" . "py") ("emacs-lisp" . "el") ("elisp" . "el")) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-confirm-elisp-link-function 'yes-or-no-p org-ref-clean-bibtex-entry-hook '(org-ref-bibtex-format-url-if-doi orcb-key-comma org-ref-replace-nonascii orcb-& orcb-% org-ref-title-case-article orcb-clean-year orcb-key orcb-clean-doi orcb-clean-pages orcb-check-journal org-ref-sort-bibtex-entry orcb-fix-spacing orcb-download-pdf) org-ref-insert-ref-function 'org-ref-insert-ref-link org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function org-clock-persist-file "~/.chemacs/spacemacs/.cache/org-clock-save.el" org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-latex-prefer-user-labels t org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] org-fold-core-isearch-open-function 'org-fold--isearch-reveal org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function org-ref-clean-bibtex-key-function '(lambda (key) (replace-regexp-in-string ":" "" key)) org-persist-before-write-hook '(org-element--cache-persist-before-write) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-link-shell-confirm-function 'yes-or-no-p org-babel-pre-tangle-hook '(save-buffer) org-agenda-loop-over-headlines-in-active-region nil org-capture-mode-hook '(spacemacs//org-capture-start) org-occur-hook '(org-first-headline-recenter) org-metadown-hook '(org-babel-pop-to-session-maybe) org-html-format-headline-function 'org-html-format-headline-default-function org-metaup-hook '(org-babel-load-in-session-maybe) org-agenda-restore-windows-after-quit t org-ref-insert-label-function 'org-ref-insert-label-link org-startup-with-inline-images t org-imenu-depth 8 org-download-link-format-function 'org-download-link-format-function-default org-tab-before-tab-emulation-hook '(org-tempo-complete-tag) org-reverse-note-order t org-attach-store-link-p t )