emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] warn when use org-capture [9.6 (release_9.6-3-ga4d38e @ /home/feng/emacs/emacs29/lisp/org/)]
@ 2022-12-01  7:52 Feng Shu
  2022-12-04 11:09 ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Feng Shu @ 2022-12-01  7:52 UTC (permalink / raw)
  To: emacs-orgmode


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------


 ■  Warning (org-element-cache): org-element--cache: (eh-org-capture-schedule) Cached element is incorrect in CAPTURE-projects.org. (Cache tic up to date: "no") Resetting.
If this warning appears regularly, please report the warning text to Org mode mailing list (M-x org-submit-bug-report).
The element is: "(headline (:raw-value \"工具程序\" :begin 726 :end 943 :pre-blank 0 :contents-begin 800 :contents-end 942 :robust-begin 802 :robust-end 940 :level 1 :priority nil :tags (#(\"proj\" 0 4 (fontified nil))) :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 726 :title \"工具程序\" :mode nil :granularity element :org-element--cache-sync-key (5 . 886) :cached t :parent (org-data (:begin 1 :contents-begin 1 :contents-end 143599 :end 143599 :robust-begin 3 :robust-end 143597 :post-blank 0 :post-affiliated 1 :path \"/home/feng/org/projects.org\" :mode org-data :CATEGORY \"projects\" :cached t :org-element--cache-sync-key nil))))"
 The real element is: "(headline (:raw-value \"%?\" :begin 726 :end 825 :pre-blank 0 :contents-begin 737 :contents-end 825 :robust-begin nil :robust-end nil :level 2 :priority nil :tags nil :todo-keyword \"TODO\" :todo-type todo :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 726 :scheduled (timestamp (:type active :raw-value \"<2022-12-01 Thu>\" :year-start 2022 :month-start 12 :day-start 1 :hour-start nil :minute-start nil :year-end 2022 :month-end 12 :day-end 1 :hour-end nil :minute-end nil :begin 750 :end 766 :post-blank 0)) :CREATED \"[2022-12-01 Thu 15:46]\" :title \"%?\" :mode section :granularity element :parent (headline (:raw-value \"待整理\" :begin 654 :end 825 :pre-blank 0 :contents-begin 726 :contents-end 825 :robust-begin 728 :robust-end 823 :level 1 :priority nil :tags (#(\"stage\" 0 5 ...) #(\"待整理\" 0 3 ...)) :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 654 :title \"待整理\"))))"
 Cache around :begin:
(headline (:raw-value "待整理" :begin 654 :end 726 :pre-blank 0 :contents-begin nil :contents-end nil :robust-begin nil :robust-end nil :level 1 :priority nil :tags (#("stage" 0 5 (fontified nil)) #("待整理" 0 3 (fontified nil))) :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 654 :title (#("待整理" 0 3 (:parent (headline #1)))) :parent (org-data (:begin 1 :contents-begin 1 :contents-end 143599 :end 143599 :robust-begin 3 :robust-end 143597 :post-blank 0 :post-affiliated 1 :path "/home/feng/org/projects.org" :mode org-data :CATEGORY "projects" :cached t :org-element--cache-sync-key nil)) :cached t :org-element--cache-sync-key (5 . 654)))
(headline (:raw-value "工具程序" :begin 726 :end 943 :pre-blank 0 :contents-begin 800 :contents-end 942 :robust-begin 802 :robust-end 940 :level 1 :priority nil :tags (#("proj" 0 4 (fontified nil))) :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 726 :title "工具程序" :mode nil :granularity element :org-element--cache-sync-key (5 . 886) :cached t :parent (org-data (:begin 1 :contents-begin 1 :contents-end 143599 :end 143599 :robust-begin 3 :robust-end 143597 :post-blank 0 :post-affiliated 1 :path "/home/feng/org/projects.org" :mode org-data :CATEGORY "projects" :cached t :org-element--cache-sync-key nil))))
(headline (:raw-value "战略规划" :begin 943 :end 6970 :pre-blank 0 :contents-begin 1013 :contents-end 6970 :robust-begin 1015 :robust-end 6968 :level 1 :priority nil :tags (#("战略规划" 0 4 (fontified nil))) :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 943 :title "战略规划" :mode nil :granularity element :org-element--cache-sync-key (5 . 1002) :cached t :parent (org-data (:begin 1 :contents-begin 1 :contents-end 143599 :end 143599 :robust-begin 3 :robust-end 143597 :post-blank 0 :post-affiliated 1 :path "/home/feng/org/projects.org" :mode org-data :CATEGORY "projects" :cached t :org-element--cache-sync-key nil))))
 ■  Warning (org-element-cache): org-element--cache: Unregistered buffer modifications detected (143649 != 143748). Resetting.
If this warning appears regularly, please report the warning text to Org mode mailing list (M-x org-submit-bug-report).
The buffer is: projects.org
 Current command: eh-org-capture-schedule
 Backtrace:
"  backtrace-to-string(nil)
  org-element--cache-sync(#<buffer CAPTURE-projects.org> 767)
  org-element-at-point()
  org-indent-region(767 824)
  org-fixup-indentation(1)
  org-demote()
  org-map-region(org-demote 726 824)
  #f(compiled-function () #<bytecode -0x118a4bfdda4ea969>)()
  funcall(#f(compiled-function () #<bytecode -0x118a4bfdda4ea969>))
  (setq result (funcall body))
  (progn (set (make-local-variable 'before-change-functions) (if (memq #'syntax-ppss-flush-cache bcf) '(syntax-ppss-flush-cache))) (set (make-local-variable 'after-change-functions) nil) (setq result (funcall body)))
  (unwind-protect (progn (set (make-local-variable 'before-change-functions) (if (memq #'syntax-ppss-flush-cache bcf) '(syntax-ppss-flush-cache))) (set (make-local-variable 'after-change-functions) nil) (setq result (funcall body))) (if local-bcf (setq before-change-functions bcf) (kill-local-variable 'before-change-functions)) (if local-acf (setq after-change-functions acf) (kill-local-variable 'after-change-functions)))
  (let ((bcf before-change-functions) (acf after-change-functions) (local-bcf (local-variable-p 'before-change-functions)) (local-acf (local-variable-p 'after-change-functions))) (unwind-protect (progn (set (make-local-variable 'before-change-functions) (if (memq #'syntax-ppss-flush-cache bcf) '(syntax-ppss-flush-cache))) (set (make-local-variable 'after-change-functions) nil) (setq result (funcall body))) (if local-bcf (setq before-change-functions bcf) (kill-local-variable 'before-change-functions)) (if local-acf (setq after-change-functions acf) (kill-local-variable 'after-change-functions))))
  (let ((undo--combining-change-calls t)) (if (not inhibit-modification-hooks) (run-hook-with-args 'before-change-functions beg end)) (let ((bcf before-change-functions) (acf after-change-functions) (local-bcf (local-variable-p 'before-change-functions)) (local-acf (local-variable-p 'after-change-functions))) (unwind-protect (progn (set (make-local-variable 'before-change-functions) (if (memq #'syntax-ppss-flush-cache bcf) '(syntax-ppss-flush-cache))) (set (make-local-variable 'after-change-functions) nil) (setq result (funcall body))) (if local-bcf (setq before-change-functions bcf) (kill-local-variable 'before-change-functions)) (if local-acf (setq after-change-functions acf) (kill-local-variable 'after-change-functions)))) (if (not (eq buffer-undo-list t)) (progn (let ((ap-elt (list 'apply (- end end-marker) beg (marker-position end-marker) #'undo--wrap-and-run-primitive-undo beg (marker-position end-marker) buffer-undo-list)) (ptr buffer-undo-list)) (if (not (eq buffer-undo-list old-bul)) (progn (while (and ... ... ...) (setq ptr ...)) (if (cdr ptr) nil (message \"combine-change-calls: buffer-undo-list broken\")) (setcdr ptr nil) (setq buffer-undo-list (cons ap-elt buffer-undo-list)) (setcdr buffer-undo-list old-bul)))))) (if (not inhibit-modification-hooks) (run-hook-with-args 'after-change-functions beg (marker-position end-marker) (- end beg))))
  (if undo--combining-change-calls (setq result (funcall body)) (let ((undo--combining-change-calls t)) (if (not inhibit-modification-hooks) (run-hook-with-args 'before-change-functions beg end)) (let ((bcf before-change-functions) (acf after-change-functions) (local-bcf (local-variable-p 'before-change-functions)) (local-acf (local-variable-p 'after-change-functions))) (unwind-protect (progn (set (make-local-variable 'before-change-functions) (if (memq ... bcf) '...)) (set (make-local-variable 'after-change-functions) nil) (setq result (funcall body))) (if local-bcf (setq before-change-functions bcf) (kill-local-variable 'before-change-functions)) (if local-acf (setq after-change-functions acf) (kill-local-variable 'after-change-functions)))) (if (not (eq buffer-undo-list t)) (progn (let ((ap-elt (list ... ... beg ... ... beg ... buffer-undo-list)) (ptr buffer-undo-list)) (if (not (eq buffer-undo-list old-bul)) (progn (while ... ...) (if ... nil ...) (setcdr ptr nil) (setq buffer-undo-list ...) (setcdr buffer-undo-list old-bul)))))) (if (not inhibit-modification-hooks) (run-hook-with-args 'after-change-functions beg (marker-position end-marker) (- end beg)))))
  (let ((old-bul buffer-undo-list) (end-marker (copy-marker end t)) result) (if undo--combining-change-calls (setq result (funcall body)) (let ((undo--combining-change-calls t)) (if (not inhibit-modification-hooks) (run-hook-with-args 'before-change-functions beg end)) (let ((bcf before-change-functions) (acf after-change-functions) (local-bcf (local-variable-p 'before-change-functions)) (local-acf (local-variable-p 'after-change-functions))) (unwind-protect (progn (set (make-local-variable ...) (if ... ...)) (set (make-local-variable ...) nil) (setq result (funcall body))) (if local-bcf (setq before-change-functions bcf) (kill-local-variable 'before-change-functions)) (if local-acf (setq after-change-functions acf) (kill-local-variable 'after-change-functions)))) (if (not (eq buffer-undo-list t)) (progn (let ((ap-elt ...) (ptr buffer-undo-list)) (if (not ...) (progn ... ... ... ... ...))))) (if (not inhibit-modification-hooks) (run-hook-with-args 'after-change-functions beg (marker-position end-marker) (- end beg))))) (set-marker end-marker nil) result)
  combine-change-calls-1(726 726 #f(compiled-function () #<bytecode -0x118a4bfdda4ea969>))
  org-paste-subtree(2 \"* TODO %?\\n  SCHEDULED: <2022-12-01 Thu>\\n  :PROPERT...\" for-yank)
  org-capture-place-entry()
  org-capture-place-template(nil)
  org-capture(nil \"s\")
  eh-org-capture-schedule()
  funcall-interactively(eh-org-capture-schedule)
  call-interactively(eh-org-capture-schedule nil nil)
  command-execute(eh-org-capture-schedule)
"


------------------------------------

(setq org-capture-templates
      (let ((file (concat (file-name-as-directory eh-org-directory) "projects.org")))
        `(("n" "Note" entry (file ,file)
           "* %?
  :PROPERTIES:
  :created: %U
  :END:

%i")
          ("s" "Schedule" entry (file+headline ,file "待整理")
           "* TODO %?
  SCHEDULED: %t
  :PROPERTIES:
  :created: %U
  :END:

%i"))))


(defun eh-org-capture-note ()
  (interactive)
  (org-capture nil "n"))

(defun eh-org-capture-schedule ()
  (interactive)
  (org-capture nil "s"))

------------------------------------



Emacs  : GNU Emacs 29.0.60 (build 5, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars)
 of 2022-12-01
Package: Org mode version 9.6 (release_9.6-3-ga4d38e @ /home/feng/emacs/emacs29/lisp/org/)

current state:
==============
(setq
 org-agenda-prefix-format '((agenda . " %i %-14:c%?-12t% s") (todo . " %i %-14:c") (tags . " %i %-14:c") (search . " %i %-14:c"))
 org-link-elisp-confirm-function 'yes-or-no-p
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn ENTRY)"]
 org-export-with-sub-superscripts '{}
 org-log-done t
 org-agenda-custom-commands '(("a" "[org-super-agenda] Agenda for current week or day." agenda ""
                               ((org-agenda-remove-tags t) (org-super-agenda-header-separator "\n")
                                (org-super-agenda-final-group-separator "\n"))
                               )
                              ("n" "Agenda and all TODOs" ((agenda "") (alltodo ""))))
 org-log-into-drawer t
 org-use-fast-tag-selection t
 org-babel-after-execute-hook '(eh-org-show-babel-image)
 org-agenda-files '("~/org/" "~/org/orgzly")
 org-capture-templates '(("n" "Note" entry (file "~/org/projects.org") "* %?\n  :PROPERTIES:\n  :created: %U\n  :END:\n\n%i")
                         ("s" "Schedule" entry (file+headline "~/org/projects.org" "待整理")
                          "* TODO %?\n  SCHEDULED: %t\n  :PROPERTIES:\n  :created: %U\n  :END:\n\n%i")
                         )
 org-persist-after-read-hook '(org-element--cache-persist-after-read)
 org-refile-targets '((nil :maxlevel . 1) (eh-org-refile-agenda-files :maxlevel . 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-refile-use-outline-path 'file
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
 org-edit-src-content-indentation 0
 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-export-default-language "zh-CN"
 org-mode-hook '(#[0 "\301\211\207" [imenu-create-index-function org-imenu-get-tree] 2] turn-on-auto-revert-mode
                 eh-org-smart-truncate-lines eh-org-visual-line-mode
                 #[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 org-eldoc-load)
 org-agenda-span 'day
 org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
 org-read-date-popup-calendar nil
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-confirm-shell-link-function 'yes-or-no-p
 org-agenda-breadcrumbs-separator " ~> "
 org-adapt-indentation 'headline-data
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 outline-isearch-open-invisible-function 'outline-isearch-open-invisible
 org-use-sub-superscripts '{}
 org-super-agenda-mode t
 org-stuck-projects '("+proj/-DONE-CANCELED" ("TODO") nil "")
 org-html-validation-link nil
 org-agenda-format-date 'eh-org-agenda-format-date-aligned
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-capture-prepare-finalize-hook '(eh-org-update-headline)
 org-complete-tags-always-offer-all-agenda-tags t
 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-agenda-window-setup 'current-window
 org-tags-exclude-from-inheritance '("proj")
 org-agenda-search-view-always-boolean t
 org-todo-keywords '((type "TODO(t)" "|" "DONE(d!)" "CANCELED(c!)"))
 org-agenda-inhibit-startup t
 org-id-link-to-org-use-id t
 org-tag-persistent-alist '(("proj") ("ref") ("ATTACH"))
 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-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-super-agenda-groups '((:name "Today" :time-grid t) (:name "待整理" :tag "待整理")
                           (:name "(ROOT)" :pred
                            (lambda (item)
                             (org-super-agenda--when-with-marker-buffer (org-super-agenda--get-marker item)
                              (equal (org-current-level) 1))
                             )
                            )
                           (:auto-parent t))
 org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-refile-active-region-within-subtree t
 org-attach-sync-delete-empty-dir t
 org-confirm-babel-evaluate nil
 org-fold-core-isearch-open-function 'org-fold-core--isearch-reveal
 org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function
 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-agenda-todo-ignore-scheduled t
 org-link-shell-confirm-function 'yes-or-no-p
 org-agenda-finalize-hook '(eh-org-agenda-jump-to-first-item)
 org-babel-pre-tangle-hook '(save-buffer)
 org-agenda-loop-over-headlines-in-active-region nil
 org-attach-id-dir "~/org/data/"
 org-archive-default-command 'org-archive-set-tag
 org-occur-hook '(org-first-headline-recenter)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-link-parameters '(("eww" :follow org-eww-open :store org-eww-store-link)
                       ("rmail" :follow org-rmail-open :store org-rmail-store-link)
                       ("mhe" :follow org-mhe-open :store org-mhe-store-link)
                       ("irc" :follow org-irc-visit :store org-irc-store-link :export org-irc-export)
                       ("info" :follow org-info-open :export org-info-export :store org-info-store-link :insert-description
                        org-info-description-as-command)
                       ("gnus" :follow org-gnus-open :store org-gnus-store-link)
                       ("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link)
                       ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link)
                       ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store
                        org-bbdb-store-link)
                       ("w3m" :store org-w3m-store-link) ("doi" :follow org-link-doi-open :export org-link-doi-export)
                       ("attachment" :follow org-attach-follow :complete org-attach-complete-link) ("id" :follow org-id-open)
                       ("file+sys") ("file+emacs") ("shell" :follow org-link--open-shell)
                       ("news" :follow #[514 "\301\300\302Q\"\207" ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"])
                       ("mailto" :follow #[514 "\301\300\302Q\"\207" ["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"])
                       ("https" :follow #[514 "\301\300\302Q\"\207" ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"])
                       ("http" :follow #[514 "\301\300\302Q\"\207" ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"])
                       ("ftp" :follow #[514 "\301\300\302Q\"\207" ["ftp" browse-url ":"] 6 "\n\n(fn URL ARG)"])
                       ("help" :follow org-link--open-help :store org-link--store-help) ("file" :complete org-link-complete-file)
                       ("elisp" :follow org-link--open-elisp))
 org-html-format-headline-function 'org-html-format-headline-default-function
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-refile-allow-creating-parent-nodes 'confirm
 org-html-head-include-scripts t
 org-outline-path-complete-in-steps nil
 org-super-agenda-unmatched-name "未分组"
 org-attach-store-link-p 'attached
 org-agenda-todo-ignore-deadlines t
 )



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG] warn when use org-capture [9.6 (release_9.6-3-ga4d38e @ /home/feng/emacs/emacs29/lisp/org/)]
  2022-12-01  7:52 [BUG] warn when use org-capture [9.6 (release_9.6-3-ga4d38e @ /home/feng/emacs/emacs29/lisp/org/)] Feng Shu
@ 2022-12-04 11:09 ` Ihor Radchenko
  2022-12-04 11:44   ` Feng Shu
  0 siblings, 1 reply; 4+ messages in thread
From: Ihor Radchenko @ 2022-12-04 11:09 UTC (permalink / raw)
  To: Feng Shu; +Cc: emacs-orgmode

Feng Shu <tumashu@163.com> writes:

>  ■  Warning (org-element-cache): org-element--cache: Unregistered buffer modifications detected (143649 != 143748). Resetting.
> If this warning appears regularly, please report the warning text to Org mode mailing list (M-x org-submit-bug-report).
> The buffer is: projects.org
>  Current command: eh-org-capture-schedule

Thanks for reporting!
It looks like some of the packages you are using is bypassing
before/after-change-functions.

Do you see the warning frequently? If so, would you be able to bisect
your config and find out which part is causing the issue?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG] warn when use org-capture [9.6 (release_9.6-3-ga4d38e @ /home/feng/emacs/emacs29/lisp/org/)]
  2022-12-04 11:09 ` Ihor Radchenko
@ 2022-12-04 11:44   ` Feng Shu
  2022-12-04 13:22     ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Feng Shu @ 2022-12-04 11:44 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

Ihor Radchenko <yantar92@posteo.net> writes:

> Feng Shu <tumashu@163.com> writes:
>
>>  ■  Warning (org-element-cache): org-element--cache: Unregistered buffer modifications detected (143649 != 143748). Resetting.
>> If this warning appears regularly, please report the warning text to Org mode mailing list (M-x org-submit-bug-report).
>> The buffer is: projects.org
>>  Current command: eh-org-capture-schedule
>
> Thanks for reporting!
> It looks like some of the packages you are using is bypassing
> before/after-change-functions.
>
> Do you see the warning frequently? If so, would you be able to bisect
> your config and find out which part is causing the issue?

emacs -Q

----------------------
(global-set-key (kbd "C-c c") 'org-capture)
(setq org-adapt-indentation 'headline-data)

(setq org-capture-templates
      (let ((file (concat "~/1.org")))
        `(("s" "Schedule" entry (file+headline ,file "待整理")
           "* TODO %?
  SCHEDULED: %t
  :PROPERTIES:
  :created: %U
  :END:

%i"))))


-----------------------
 ■  Warning (org-element-cache): org-element--cache: (org-capture) Cached element is incorrect in CAPTURE-1.org. (Cache tic up to date: "no") Resetting.
If this warning appears regularly, please report the warning text to Org mode mailing list (M-x org-submit-bug-report).
The element is: "(node-property (:key \"created\" :value \"[2022-12-04 日 19:43]\" :begin 63 :end 95 :post-blank 0 :post-affiliated 63 :mode node-property :granularity element :cached t :parent (property-drawer (:begin 47 :end 103 :contents-begin 62 :contents-end 95 :post-blank 0 :post-affiliated 47 :mode property-drawer :granularity element :cached t :parent (section ...)))))"
 The real element is: "(node-property (:key \"created\" :value \"[2022-12-04 日 19:43]\" :begin 63 :end 97 :post-blank 0 :post-affiliated 63 :mode node-property :granularity element :parent (property-drawer (:begin 47 :end 105 :contents-begin 63 :contents-end 97 :post-blank 0 :post-affiliated 47 :mode property-drawer :granularity element :parent (section ...)))))"
 Cache around :begin:
(node-property (:key nil :value nil :begin 62 :end 63 :post-blank 0 :post-affiliated 62 :mode node-property :granularity element :cached t :parent (property-drawer (:begin 47 :end 103 :contents-begin 62 :contents-end 95 :post-blank 0 :post-affiliated 47 :mode property-drawer :granularity element :cached t :parent (section (:begin 18 :end 103 :contents-begin 18 :contents-end 103 :robust-begin 18 :robust-end 101 :post-blank 0 :post-affiliated 18 :mode section :granularity element :cached t :parent (headline (:raw-value "%?" :begin 7 :end 102 :pre-blank 0 :contents-begin 18 :contents-end 102 :robust-begin nil :robust-end nil :level 2 :priority nil :tags nil :todo-keyword "TODO" :todo-type todo :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 7 :scheduled (timestamp (:type active :raw-value "<2022-12-04 日>" :year-start 2022 :month-start 12 :day-start 4 :hour-start nil :minute-start nil :year-end 2022 :month-end 12 :day-end 4 :hour-end nil :minute-end nil :begin 31 :end 45 :post-blank 0)) :CREATED "[2022-12-04 日 19:43]" :title "%?" :mode section :granularity element :cached t :parent (headline (:raw-value "待整理" :begin 1 :end 102 :pre-blank 0 :contents-begin 7 :contents-end 102 :robust-begin 9 :robust-end 100 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 1 :title "待整理" :mode first-section :granularity element :cached t :parent (org-data (:begin 1 :contents-begin 1 :contents-end 102 :end 102 :robust-begin 3 :robust-end 100 :post-blank 0 :post-affiliated 1 :path "/home/feng/1.org" :mode org-data :CATEGORY "1" :cached t))))))))))))
(node-property (:key "created" :value "[2022-12-04 日 19:43]" :begin 63 :end 95 :post-blank 0 :post-affiliated 63 :mode node-property :granularity element :cached t :parent (property-drawer (:begin 47 :end 103 :contents-begin 62 :contents-end 95 :post-blank 0 :post-affiliated 47 :mode property-drawer :granularity element :cached t :parent (section (:begin 18 :end 103 :contents-begin 18 :contents-end 103 :robust-begin 18 :robust-end 101 :post-blank 0 :post-affiliated 18 :mode section :granularity element :cached t :parent (headline (:raw-value "%?" :begin 7 :end 102 :pre-blank 0 :contents-begin 18 :contents-end 102 :robust-begin nil :robust-end nil :level 2 :priority nil :tags nil :todo-keyword "TODO" :todo-type todo :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 7 :scheduled (timestamp (:type active :raw-value "<2022-12-04 日>" :year-start 2022 :month-start 12 :day-start 4 :hour-start nil :minute-start nil :year-end 2022 :month-end 12 :day-end 4 :hour-end nil :minute-end nil :begin 31 :end 45 :post-blank 0)) :CREATED "[2022-12-04 日 19:43]" :title "%?" :mode section :granularity element :cached t :parent (headline (:raw-value "待整理" :begin 1 :end 102 :pre-blank 0 :contents-begin 7 :contents-end 102 :robust-begin 9 :robust-end 100 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 1 :title "待整理" :mode first-section :granularity element :cached t :parent (org-data (:begin 1 :contents-begin 1 :contents-end 102 :end 102 :robust-begin 3 :robust-end 100 :post-blank 0 :post-affiliated 1 :path "/home/feng/1.org" :mode org-data :CATEGORY "1" :cached t))))))))))))
nil


----------------------

-- 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG] warn when use org-capture [9.6 (release_9.6-3-ga4d38e @ /home/feng/emacs/emacs29/lisp/org/)]
  2022-12-04 11:44   ` Feng Shu
@ 2022-12-04 13:22     ` Ihor Radchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2022-12-04 13:22 UTC (permalink / raw)
  To: Feng Shu; +Cc: emacs-orgmode

Feng Shu <tumashu@163.com> writes:

>> Do you see the warning frequently? If so, would you be able to bisect
>> your config and find out which part is causing the issue?
>
> emacs -Q
>
> ----------------------
> (global-set-key (kbd "C-c c") 'org-capture)
> (setq org-adapt-indentation 'headline-data)
>
> (setq org-capture-templates
>       (let ((file (concat "~/1.org")))
>         `(("s" "Schedule" entry (file+headline ,file "待整理")
>            "* TODO %?
>   SCHEDULED: %t
>   :PROPERTIES:
>   :created: %U
>   :END:
>
> %i"))))

Thanks! I can reproduce now. (got thrown off by the second warning)
Fixed on bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=7e6b55b8f

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-12-04 13:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-01  7:52 [BUG] warn when use org-capture [9.6 (release_9.6-3-ga4d38e @ /home/feng/emacs/emacs29/lisp/org/)] Feng Shu
2022-12-04 11:09 ` Ihor Radchenko
2022-12-04 11:44   ` Feng Shu
2022-12-04 13:22     ` Ihor Radchenko

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