emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[BUG] warn when use org-capture [9.6 (release_9.6-3-ga4d38e @ /home/feng


From: Feng Shu
Subject: [BUG] warn when use org-capture [9.6 (release_9.6-3-ga4d38e @ /home/feng/emacs/emacs29/lisp/org/)]
Date: Thu, 01 Dec 2022 15:52:36 +0800

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
 )




reply via email to

[Prev in Thread] Current Thread [Next in Thread]