all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [BUG] repeated warnings about org-element-at-point "cannot be used  in non-Org buffer" [9.7 (9.7-??-57b94f3 @  /Users/cstevens/.emacs.d/.local/straight/build-29.2/org/)]
@ 2024-01-26 17:26 Christopher Stevenson
  2024-01-30 15:15 ` Ihor Radchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Stevenson @ 2024-01-26 17:26 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.
------------------------------------------------------------------------

I get these warnings about org-element when I am in non-org files; the
main ones that come to mind are JavaScript files and in magit when I am
doing a commit. They don't seem to break anything but it does get
annoying to have to constantly dismiss them.

Emacs  : GNU Emacs 29.2 (build 2, aarch64-apple-darwin23.2.0, NS appkit-2487.30 Version 14.2.1 (Build 23C71))
of 2024-01-23
Package: Org mode version 9.7 (9.7-??-57b94f3 @ /Users/cstevens/.emacs.d/.local/straight/build-29.2/org/)

current state:
==============
(setq
org-link-elisp-confirm-function nil
org-directory "~/SynologyDrive/OrgRoam"
org-agenda-skip-deadline-prewarning-if-scheduled t
org-cite-insert-processor 'citar
org-after-refile-insert-hook '(save-buffer)
org-indirect-buffer-display 'current-window
org-roam-db-gc-threshold 2305843009213693951
org-crypt-key nil
org-bibtex-headline-format-function 'org-bibtex-headline-format-default
org-download-file-format-function 'org-download-file-format-default
org-log-done t
org-roam-mode-hook '(+org-roam-detach-magit-section-mode-map-h turn-on-visual-line-mode)
org-load-hook '(+org-init-org-directory-h +org-init-appearance-h +org-init-agenda-h +org-init-attachments-h
                 +org-init-babel-h +org-init-babel-lazy-loader-h +org-init-capture-defaults-h +org-init-capture-frame-h
                 +org-init-custom-links-h +org-init-export-h +org-init-habit-h +org-init-hacks-h +org-init-keybinds-h
                 +org-init-popup-rules-h +org-init-smartparens-h +org-init-roam-h)
org-startup-folded 'show2levels
org-babel-after-execute-hook '(+org-redisplay-inline-images-in-babel-result-h)
org-link-abbrev-alist '(("doomdir" . "/Users/cstevens/.doom.d/%s") ("emacsdir" . "/Users/cstevens/.emacs.d/%s")
                         ("doom-repo" . "https://github.com/doomemacs/doomemacs/%s")
                         ("wolfram" . "https://wolframalpha.com/input/?i=%s")
                         ("wikipedia" . "https://en.wikipedia.org/wiki/%s") ("duckduckgo" . "https://duckduckgo.com/?q=%s")
                         ("gmap" . "https://maps.google.com/maps?q=%s") ("gimages" . "https://google.com/images?q=%s")
                         ("google" . "https://google.com/search?q=") ("youtube" . "https://youtube.com/watch?v=%s")
                         ("github" . "https://github.com/%s"))
org-agenda-skip-scheduled-if-done t
org-agenda-files '("~/SynologyDrive/OrgRoam")
org-capture-templates '(("t" "Quick Todo" entry (file +org-capture-todo-file) "* TODO %^{Task}\nSCHEDULED: %t\n"
                          :immediate-finish t)
                         ("T" "Todo" entry (file +org-capture-todo-file) "* TODO %?\n %i\n")
                         ("n" "Quick Note" entry (file +org-capture-notes-file) "* %^{Note}\n" :immediate-finish t)
                         ("N" "Note" entry (file +org-capture-notes-file) "* %?\n %i\n"))
org-roam-node-display-template "${title:*} ${tags:10}"
org-persist-after-read-hook '(org-element--cache-persist-after-read)
org-refile-targets '((nil :maxlevel . 5) (org-agenda-files :maxlevel . 5))
org-export-before-parsing-hook '(org-attach-expand-links)
org-cycle-tab-first-hook '(+org-yas-expand-maybe-h +org-indent-maybe-h org-babel-hide-result-toggle-maybe
                            org-babel-header-arg-expand +org-clear-babel-results-h +org-cycle-only-current-subtree-h)
org-tag-alist '(("grading" . 103) ("important" . 105) ("dept" . 100) ("cmte" . 99))
org-default-notes-file "~/SynologyDrive/OrgRoam/inbox.org"
org-roam-find-file-hook '(doom--setq-org-id-link-to-org-use-id-for-org-roam-find-file-h org-roam-buffer--setup-redisplay-h
                           org-roam--register-completion-functions-h org-roam--replace-roam-links-on-save-h
                           org-roam-db-autosync--setup-update-on-save-h +org-roam-enable-auto-backlinks-buffer-h)
org-refile-use-outline-path 'file
org-archive-hook '(org-attach-archive-delete-maybe)
org-cite-follow-processor 'citar
org-file-apps '((remote . emacs) ("\\.pdf\\'" . default) (directory . emacs) (auto-mode . emacs) ("\\.mm\\'" . default)
                 ("\\.x?html?\\'" . default) ("\\.xls\\'" . default) ("\\.xlsm\\'" . default) ("\\.xlsx\\'" . default)
                 ("\\.docx\\'" . default) ("\\.doc\\'" . default))
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-font-lock-set-keywords-hook '(doom-themes-enable-org-fontification)
org-modules '(ol-bibtex)
org-image-actual-width nil
org-attach-use-inheritance t
org-mode-local-vars-hook '(+org-init-gifs-h)
org-mode-hook '(#[0 "\301\211\207" [imenu-create-index-function org-imenu-get-tree] 2] er/add-org-mode-expansions
                 +lookup--init-org-mode-handlers-h
                 (closure (t) (&rest _) (add-hook 'before-save-hook 'org-encrypt-entries nil t))
                 #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-fold-show-all append local] 5]
                 doom-disable-show-paren-mode-h doom-disable-show-trailing-whitespace-h +org-make-last-point-visible-h
                 evil-org-mode toc-org-enable
                 #[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 embrace-org-mode-hook)
org-follow-link-hook '(+nav-flash-delayed-blink-cursor-h)
org-agenda-skip-deadline-if-done t
org-src-window-setup 'other-window
org-id-locations-file "/Users/cstevens/SynologyDrive/OrgRoam/.orgids"
org-agenda-todo-list-sublevels nil
org-roam-ref-annotation-function 'org-roam-ref-read--annotation
org-roam-directory "~/SynologyDrive/OrgRoam"
org-agenda-span 10
org-priority-faces '((65 :foreground "#E74C3C") (66 :foreground "#0415E8") (67 :foreground "#6DDC6D"))
org-ellipsis " [...] "
org-download-timestamp "_%Y%m%d_%H%M%S"
org-roam-db-node-include-function #[0 "\300\207" [t] 1]
org-roam-node-template-prefixes '(("doom-type" . "@") ("doom-tags" . "#") ("tags" . "#") ("todo" . "t:"))
org-download-abbreviate-filename-function '(closure (t) (path)
                                             (if (file-in-directory-p path org-download-image-dir)
                                              (file-relative-name path org-download-image-dir) path)
                                             )
org-confirm-shell-link-function 'yes-or-no-p
org-reveal-start-hook '(org-decrypt-entry)
org-agenda-skip-unavailable-files t
org-download-annotate-function '(closure (t) (_link) "")
org-download-screenshot-method "screencapture -i %s"
outline-isearch-open-invisible-function 'outline-isearch-open-invisible
org-startup-indented t
org-use-speed-commands t
org-download-image-org-width 600
org-agenda-mode-hook '(+org-habit-resize-graph-h evil-org-agenda-mode)
org-roam-capture-preface-hook '(org-roam-capture--try-capture-to-ref-h)
org-list-demote-modify-bullet '(("+" . "-") ("-" . "+") ("*" . "+"))
org-link-translation-function 'toc-org-unhrefify
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-capture-prepare-finalize-hook '(org-roam-capture--install-finalize-h)
org-src-preserve-indentation t
org-roam-preview-function 'org-roam-preview-default-function
org-entities-user '(("flat" "\\flat" nil "" "" "266D" "♭") ("sharp" "\\sharp" nil "" "" "266F" "♯"))
org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer)
org-roam-db-autosync-mode t
org-latex-default-packages-alist '(("AUTO" "inputenc" t ("pdflatex")) ("T1" "fontenc" t ("pdflatex")) ("" "graphicx" t)
                                    ("" "longtable" nil) ("" "wrapfig" nil) ("" "rotating" nil) ("normalem" "ulem" t)
                                    ("" "amsmath" t) ("" "textcomp" t) ("" "amssymb" t) ("margin=1.5in" "geometry" t nil)
                                    ("shortlabels" "enumitem" t nil) ("version=4,arrows=pgf" "mhchem" t nil)
                                    ("" "tikz" t nil) ("" "booktabs" t nil) ("per-mode=symbol,detect-all" "siunitx" t nil)
                                    ("" "capt-of" nil nil) ("" "kpfonts" t nil) ("" "hyperref" nil))
org-agenda-todo-ignore-with-date t
org-agenda-window-setup 'other-frame
org-tags-exclude-from-inheritance '("crypt")
org-clock-out-remove-zero-time-clocks t
org-log-buffer-setup-hook '(org-roam-log--setup)
org-cite-activate-processor 'citar
org-hide-leading-stars t
org-todo-keywords '((sequence "TODO(t)" "PROJECT(p)" "WAIT(w)" "SOMEDAY(s)" "|" "DONE(d)" "CNCLD(c)")
                     (sequence "[ ](T)" "[?](W)" "|" "[X](D)"))
org-agenda-inhibit-startup t
org-deadline-warning-days 7
org-roam-capture-new-node-hook '(org-roam-capture--insert-captured-ref-h)
org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
org-pretty-entities t
org-preview-latex-image-directory "/Users/cstevens/.emacs.d/.local/cache/org/latex/"
org-fontify-whole-heading-line t
org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate)
org-clock-persist-file "/Users/cstevens/.emacs.d/.local/etc/org-clock-save.el"
org-persist-directory "/Users/cstevens/.emacs.d/.local/cache/org/persist/"
org-export-backends '(md ascii html icalendar latex odt)
org-roam-list-files-commands '(fd fdfind rg find)
org-enforce-todo-dependencies t
org-confirm-babel-evaluate nil
org-fold-core-isearch-open-function 'org-fold-core--isearch-reveal
org-clock-in-resume t
org-cite-export-processors '((latex biblatex) (t csl))
org-M-RET-may-split-line t
org-clock-persist 'history
org-persist-before-write-hook '(org-element--cache-persist-before-write)
org-tab-first-hook '(+org-yas-expand-maybe-h +org-indent-maybe-h org-babel-hide-result-toggle-maybe
                      org-babel-header-arg-expand +org-clear-babel-results-h +org-cycle-only-current-subtree-h)
org-agenda-todo-ignore-scheduled t
org-link-shell-confirm-function 'yes-or-no-p
org-agenda-finalize-hook '(+org-exclude-agenda-buffers-from-workspace-h +org-defer-mode-in-agenda-buffers-h)
org-babel-pre-tangle-hook '(save-buffer)
org-agenda-loop-over-headlines-in-active-region nil
org-fontify-quote-and-verse-blocks t
org-agenda-start-on-weekday nil
org-attach-id-dir "/Users/cstevens/SynologyDrive/OrgRoam/.attach/"
org-todo-keyword-faces '(("[-]" . +org-todo-active) ("STRT" . +org-todo-active) ("[?]" . +org-todo-onhold)
                          ("WAIT" . +org-todo-onhold) ("HOLD" . +org-todo-onhold) ("PROJ" . +org-todo-project)
                          ("NO" . +org-todo-cancel) ("KILL" . +org-todo-cancel))
org-cite-global-bibliography '("~/SynologyDrive/CLSrefs.bib")
org-capture-mode-hook '(+org-show-target-in-capture-header-h evil-insert-state)
org-agenda-deadline-faces '((1.001 . error) (1.0 . org-warning) (0.5 . org-upcoming-deadline)
                             (0.0 . org-upcoming-distant-deadline))
org-fold-reveal-start-hook '(org-decrypt-entry)
org-occur-hook '(org-first-headline-recenter)
org-capture-after-finalize-hook '(+org-capture-cleanup-frame-h)
org-roam-log-setup-hook '(org-roam--register-completion-functions-h)
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-treat-S-cursor-todo-selection-as-state-change nil
org-roam-node-annotation-function 'org-roam-node-read--annotation
org-link-parameters '(("orgit-rev" :store orgit-rev-store :follow orgit-rev-open :export orgit-rev-export :complete
                        orgit-rev-complete-link)
                       ("orgit-log" :store orgit-log-store :follow orgit-log-open :export orgit-log-export :complete
                        orgit-log-complete-link)
                       ("orgit" :store orgit-status-store :follow orgit-status-open :export orgit-status-export :complete
                        orgit-status-complete-link)
                       ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link)
                       ("download" :complete
                        (closure
                         ((dir-fn closure (t) nil (or org-download-image-dir org-attach-id-dir "."))
                          (requires . org-download) (key . "download"))
                         nil (if requires (mapc #'require (ensure-list requires)))
                         (+org--relative-path (+org--read-link-path key (funcall dir-fn)) (funcall dir-fn)))
                        :follow
                        (closure ((dir-fn closure (t) nil (or org-download-image-dir org-attach-id-dir "."))) (link)
                         (org-link-open-as-file (expand-file-name link (funcall dir-fn)) nil))
                        :face
                        (closure ((dir-fn closure (t) nil (or org-download-image-dir org-attach-id-dir "."))) (link)
                         (let*
                          ((path (expand-file-name link (funcall dir-fn)))
                           (option-index (string-match-p "::\\(.*\\)\\'" path)) (file-name (substring path 0 option-index)))
                          (if (file-exists-p file-name) 'org-link 'error))
                         )
                        :image-data-fun +org-image-file-data-fn :requires nil)
                       ("roam" :follow org-roam-link-follow-link)
                       ("yt" :follow org-yt-follow :image-data-fun org-yt-image-data-fun :export org-yt-export)
                       ("id" :follow org-roam-id-open) ("img" :image-data-fun +org-inline-image-data-fn)
                       ("doom-changelog" :follow
                        (closure (t) (link) (find-file (doom-path doom-docs-dir "changelog.org"))
                         (org-match-sparse-tree nil link))
                        )
                       ("doom-user" :follow
                        (closure (t) (link)
                         (browse-url
                          (format "https://github.com/%s" (string-remove-prefix "@" (+org-link-read-desc-at-point link))))
                         )
                        :face (closure (t) (_) 'org-priority))
                       ("doom-ref" :follow
                        (closure (t) (link)
                         (let
                          ((link (+org-link-read-desc-at-point link)) (url "https://github.com")
                           (doom-repo "doomemacs/doomemacs"))
                          (let ((saved-match-data (match-data)))
                           (unwind-protect
                            (progn
                             (browse-url
                              (cond
                               ((string-match "^\\([^/]+\\(?:/[^/]+\\)?\\)?#\\([0-9]+\\(?:#.*\\)?\\)" link)
                                (format "%s/%s/issues/%s" url (or (match-string 1 link) doom-repo) (match-string 2 link)))
                               ((string-match "^\\([^/]+\\(?:/[^/]+\\)?@\\)?\\([a-z0-9]\\{7,\\}\\(?:#.*\\)?\\)" link)
                                (format "%s/%s/commit/%s" url (or (match-string 1 link) doom-repo) (match-string 2 link)))
                               ((user-error "Invalid doom-ref link: %S" link)))
                              )
                             )
                            (set-match-data saved-match-data t))
                           )
                          )
                         )
                        :face
                        (closure (t) (link)
                         (let ((link (+org-link-read-desc-at-point link)))
                          (if
                           (or (string-match "^\\([^/]+\\(?:/[^/]+\\)?\\)?#\\([0-9]+\\(?:#.*\\)?\\)" link)
                            (string-match "^\\([^/]+\\(?:/[^/]+\\)?@\\)?\\([a-z0-9]\\{7,\\}\\(?:#.*\\)?\\)" link))
                           'org-link 'error)
                          )
                         )
                        )
                       ("doom-executable" :activate-func +org-link--doom-executable-link-activate-fn :help-echo
                        +org-link-doom--help-echo-from-textprop :face org-verbatim)
                       ("doom-module" :follow +org-link--doom-module-link-follow-fn :activate-func
                        +org-link--doom-module-link-activate-fn :help-echo +org-link-doom--help-echo-from-textprop)
                       ("doom-package" :follow +org-link--doom-package-link-follow-fn :activate-func
                        +org-link--doom-package-link-activate-fn :help-echo +org-link-doom--help-echo-from-textprop)
                       ("cmd" :follow
                        (closure ((fn . describe-command)) (path _prefixarg)
                         (funcall fn (or (intern-soft path) (user-error "Can't find documentation for %S" path))))
                        :activate-func +org-link--command-link-activate-fn :face help-key-binding :help-echo
                        +org-link-doom--help-echo-from-textprop)
                       ("face" :follow
                        (closure ((fn . describe-face)) (path _prefixarg)
                         (funcall fn (or (intern-soft path) (user-error "Can't find documentation for %S" path))))
                        :activate-func +org-link--face-link-activate-fn :face (font-lock-type-face underline))
                       ("fn" :follow
                        (closure ((fn . helpful-callable)) (path _prefixarg)
                         (funcall fn (or (intern-soft path) (user-error "Can't find documentation for %S" path))))
                        :activate-func +org-link--fn-link-activate-fn :face (font-lock-function-name-face underline))
                       ("var" :follow
                        (closure ((fn . helpful-variable)) (path _prefixarg)
                         (funcall fn (or (intern-soft path) (user-error "Can't find documentation for %S" path))))
                        :activate-func +org-link--var-link-activate-fn :face (font-lock-variable-name-face underline))
                       ("kbd" :follow
                        (closure (t) (ev) (interactive "e")
                         (minibuffer-message "%s"
                          (+org-link-doom--help-echo-from-textprop nil (current-buffer) (posn-point (event-start ev))))
                         )
                        :help-echo +org-link-doom--help-echo-from-textprop :face help-key-binding)
                       ("doom-modules" :complete
                        (closure
                         ((dir-fn closure ((dir-var . doom-modules-dir)) nil (symbol-value dir-var)) (requires)
                          (key . "doom-modules"))
                         nil (if requires (mapc #'require (ensure-list requires)))
                         (+org--relative-path (+org--read-link-path key (funcall dir-fn)) (funcall dir-fn)))
                        :follow
                        (closure ((dir-fn closure ((dir-var . doom-modules-dir)) nil (symbol-value dir-var))) (link)
                         (org-link-open-as-file (expand-file-name link (funcall dir-fn)) nil))
                        :face
                        (closure ((dir-fn closure ((dir-var . doom-modules-dir)) nil (symbol-value dir-var))) (link)
                         (let*
                          ((path (expand-file-name link (funcall dir-fn)))
                           (option-index (string-match-p "::\\(.*\\)\\'" path)) (file-name (substring path 0 option-index)))
                          (if (file-exists-p file-name) 'org-link 'error))
                         )
                        :requires nil)
                       ("doom-docs" :complete
                        (closure
                         ((dir-fn closure ((dir-var . doom-docs-dir)) nil (symbol-value dir-var)) (requires)
                          (key . "doom-docs"))
                         nil (if requires (mapc #'require (ensure-list requires)))
                         (+org--relative-path (+org--read-link-path key (funcall dir-fn)) (funcall dir-fn)))
                        :follow
                        (closure ((dir-fn closure ((dir-var . doom-docs-dir)) nil (symbol-value dir-var))) (link)
                         (org-link-open-as-file (expand-file-name link (funcall dir-fn)) nil))
                        :face
                        (closure ((dir-fn closure ((dir-var . doom-docs-dir)) nil (symbol-value dir-var))) (link)
                         (let*
                          ((path (expand-file-name link (funcall dir-fn)))
                           (option-index (string-match-p "::\\(.*\\)\\'" path)) (file-name (substring path 0 option-index)))
                          (if (file-exists-p file-name) 'org-link 'error))
                         )
                        :requires nil)
                       ("doom" :complete
                        (closure
                         ((dir-fn closure ((dir-var . doom-emacs-dir)) nil (symbol-value dir-var)) (requires) (key . "doom"))
                         nil (if requires (mapc #'require (ensure-list requires)))
                         (+org--relative-path (+org--read-link-path key (funcall dir-fn)) (funcall dir-fn)))
                        :follow
                        (closure ((dir-fn closure ((dir-var . doom-emacs-dir)) nil (symbol-value dir-var))) (link)
                         (org-link-open-as-file (expand-file-name link (funcall dir-fn)) nil))
                        :face
                        (closure ((dir-fn closure ((dir-var . doom-emacs-dir)) nil (symbol-value dir-var))) (link)
                         (let*
                          ((path (expand-file-name link (funcall dir-fn)))
                           (option-index (string-match-p "::\\(.*\\)\\'" path)) (file-name (substring path 0 option-index)))
                          (if (file-exists-p file-name) 'org-link 'error))
                         )
                        :requires nil)
                       ("org" :complete
                        (closure
                         ((dir-fn closure ((dir-var . org-directory)) nil (symbol-value dir-var)) (requires) (key . "org"))
                         nil (if requires (mapc #'require (ensure-list requires)))
                         (+org--relative-path (+org--read-link-path key (funcall dir-fn)) (funcall dir-fn)))
                        :follow
                        (closure ((dir-fn closure ((dir-var . org-directory)) nil (symbol-value dir-var))) (link)
                         (org-link-open-as-file (expand-file-name link (funcall dir-fn)) nil))
                        :face
                        (closure ((dir-fn closure ((dir-var . org-directory)) nil (symbol-value dir-var))) (link)
                         (let*
                          ((path (expand-file-name link (funcall dir-fn)))
                           (option-index (string-match-p "::\\(.*\\)\\'" path)) (file-name (substring path 0 option-index)))
                          (if (file-exists-p file-name) 'org-link 'error))
                         )
                        :requires nil)
                       ("attachment" :image-data-fun +org-inline-image-data-fn :follow org-attach-follow :complete
                        org-attach-complete-link)
                       ("message" :follow (lambda (id) (shell-command (concat "open message:" id))) :export nil)
                       ("x-devonthink-item" :follow org-dtp-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)"]
                        :image-data-fun +org-http-image-data-fn)
                       ("http" :follow #[514 "\301\300\302Q\"\207" ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"]
                        :image-data-fun +org-http-image-data-fn)
                       ("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 :face
                        (closure (t) (path)
                         (if (or (file-remote-p path) (if IS-WINDOWS (string-prefix-p "\\\\" path)) (file-exists-p path))
                          'org-link '(warning org-link))
                         )
                        )
                       ("elisp" :follow org-link--open-elisp))
org-roam-capture-templates '(("d" "default note" plain "%?" :target (file+head "${slug}.org" "#+title: ${title}\n")
                               :empty-lines-before 1 :unnarrowed t)
                              ("c" "course" plain (file "~/SynologyDrive/OrgRoam/Templates/CourseTemplate.org") :target
                               (file+head "${slug}.org" "#+title: ${title}\n#+filetags: :course:\n") :empty-lines-before 1
                               :unnarrowed t)
                              ("l" "bibliography note" plain
                               (file "~/SynologyDrive/OrgRoam/Templates/ReferenceTemplate.org") :target
                               (file+head "${citekey}.org" "#+title: ${title}\n#+filetags: ${keywords}\n")
                               :empty-lines-before 1 :unnarrowed t)
                              ("m" "committee" plain (file "~/SynologyDrive/OrgRoam/Templates/CommitteeTemplate.org")
                               :target (file+head "${slug}.org" "#+title: ${title}\n#+created: %U\n#+filetags: :cmte:\n")
                               :empty-lines-before 1 :unnarrowed t)
                              ("M" "Dept Mtg Minutes" plain
                               (file "~/SynologyDrive/OrgRoam/Templates/DeptMinutesTemplate.org") :target
                               (file+head "${slug}.org"
                                "#+title: DeptMinutes %^{MtgDate}\n#+created: %U\n#+filetags: :dept:\n")
                               :unnarrowed t)
                              ("s" "student" plain (file "~/SynologyDrive/OrgRoam/Templates/StudentTemplate.org") :target
                               (file+head "${slug}.org" "#+title: ${title}\n#+created: %U\n#+filetags: :student:\n")
                               :empty-lines-before 1 :unnarrowed t)
                              )
org-metaup-hook '(org-babel-load-in-session-maybe)
org-refile-allow-creating-parent-nodes 'confirm
org-agenda-include-diary t
org-startup-with-inline-images t
org-imenu-depth 6
org-download-link-format-function '(closure (t) (filename)
                                     (if (eq org-download-method 'attach)
                                      (format "[[attachment:%s]]\n"
                                       (org-link-escape (file-relative-name filename (org-attach-dir))))
                                      (format
                                       (concat
                                        (if (image-type-from-file-name filename) nil
                                         (concat (+org-attach-icon-for filename) " "))
                                        org-download-link-format)
                                       (org-link-escape (funcall org-download-abbreviate-filename-function filename)))
                                      )
                                     )
org-display-remote-inline-images 'download
org-return-follows-link t
org-outline-path-complete-in-steps nil
org-special-ctrl-a/e t
org-tags-column 0
org-src-lang-modes '(("md" . markdown) ("C" . c) ("C++" . c++) ("asymptote" . asy) ("beamer" . latex)
                      ("calc" . fundamental) ("cpp" . c++) ("ditaa" . artist) ("desktop" . conf-desktop)
                      ("dot" . fundamental) ("elisp" . emacs-lisp) ("ocaml" . tuareg) ("screen" . shell-script)
                      ("sqlite" . sql) ("toml" . conf-toml) ("shell" . sh) ("ash" . sh) ("sh" . sh) ("bash" . sh)
                      ("jsh" . sh) ("bash2" . sh) ("dash" . sh) ("dtksh" . sh) ("ksh" . sh) ("es" . sh) ("rc" . sh)
                      ("itcsh" . sh) ("tcsh" . sh) ("jcsh" . sh) ("csh" . sh) ("ksh88" . sh) ("oash" . sh) ("pdksh" . sh)
                      ("mksh" . sh) ("posix" . sh) ("wksh" . sh) ("wsh" . sh) ("zsh" . sh) ("rpm" . sh))
org-clock-history-length 20
org-download-image-dir "~/SynologyDrive/OrgRoam/Figures"
org-attach-store-link-p 'attached
org-roam-indirect-buffer-hook '(org-roam--register-completion-functions-h)
org-id-locations-file-relative t
org-agenda-todo-ignore-timestamp t
org-agenda-todo-ignore-deadlines t
org-archive-subtree-save-file-p t
org-list-allow-alphabetical t
org-agenda-use-time-grid nil
)


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

* Re: [BUG] repeated warnings about org-element-at-point "cannot be used  in non-Org buffer" [9.7 (9.7-??-57b94f3 @ /Users/cstevens/.emacs.d/.local/straight/build-29.2/org/)]
  2024-01-26 17:26 [BUG] repeated warnings about org-element-at-point "cannot be used in non-Org buffer" [9.7 (9.7-??-57b94f3 @ /Users/cstevens/.emacs.d/.local/straight/build-29.2/org/)] Christopher Stevenson
@ 2024-01-30 15:15 ` Ihor Radchenko
  2024-02-06 16:14   ` Daniel Clemente
  0 siblings, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2024-01-30 15:15 UTC (permalink / raw)
  To: Christopher Stevenson; +Cc: emacs-orgmode

Christopher Stevenson <chrislstevenson@gmail.com> writes:

> I get these warnings about org-element when I am in non-org files; the
> main ones that come to mind are JavaScript files and in magit when I am
> doing a commit. They don't seem to break anything but it does get
> annoying to have to constantly dismiss them.

These warnings indicate that some of your packages or customization
causes `org-element-at-point' to be executed in non-Org buffer.
`org-element-at-point' does not have a defined behaviour in non-Org
buffers and may cause random errors.

If you can narrow down the caller of `org-element-at-point', I suggest
you to report the observed behaviour as a bug (if that is a third-party
package).

Otherwise, you may suppress the Org warning.

-- 
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] 5+ messages in thread

* Re: [BUG] repeated warnings about org-element-at-point "cannot be used in non-Org buffer" [9.7 (9.7-??-57b94f3 @ /Users/cstevens/.emacs.d/.local/straight/build-29.2/org/)]
  2024-01-30 15:15 ` Ihor Radchenko
@ 2024-02-06 16:14   ` Daniel Clemente
  2024-02-06 19:00     ` Ihor Radchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Clemente @ 2024-02-06 16:14 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Christopher Stevenson, Ihor Radchenko

[-- Attachment #1: Type: text/plain, Size: 1987 bytes --]

I also see the warnings. In my case it's because I'm using outline-minor
mode in an elisp file. I'm not sure it's supported, but it worked years
ago: I could fold and unfold sections with usual org-mode keys like C-tab.
I miss that feature. I never managed to learn the real outline-mode
keys/concepts (outline-show-branches, outline-hide-subtree etc.).

To reproduce it, I used test.el with:


;; -*- mode: emacs-lisp; mode:outline-minor; hs-minor-mode: nil;
outline-regexp:";;;;* [^ \n]" -*-

;; a
;;; a1
;; b


Then I went to ;; a     and pressed C-tab, expecting to open/close that
section (showing/hiding the a1). And I saw the warning, and an error:
rx--translate-bounded-repetition: rx ‘**’ range error [3 times]

Please excuse if my expectations or my test file are broken. I didn't use
this feature in years.





On Tue, 30 Jan 2024 at 16:17, Ihor Radchenko <yantar92@posteo.net> wrote:

> Christopher Stevenson <chrislstevenson@gmail.com> writes:
>
> > I get these warnings about org-element when I am in non-org files; the
> > main ones that come to mind are JavaScript files and in magit when I am
> > doing a commit. They don't seem to break anything but it does get
> > annoying to have to constantly dismiss them.
>
> These warnings indicate that some of your packages or customization
> causes `org-element-at-point' to be executed in non-Org buffer.
> `org-element-at-point' does not have a defined behaviour in non-Org
> buffers and may cause random errors.
>
> If you can narrow down the caller of `org-element-at-point', I suggest
> you to report the observed behaviour as a bug (if that is a third-party
> package).
>
> Otherwise, you may suppress the Org warning.
>
> --
> 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>
>
>

[-- Attachment #2: Type: text/html, Size: 2871 bytes --]

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

* Re: [BUG] repeated warnings about org-element-at-point "cannot be used in non-Org buffer" [9.7 (9.7-??-57b94f3 @ /Users/cstevens/.emacs.d/.local/straight/build-29.2/org/)]
  2024-02-06 16:14   ` Daniel Clemente
@ 2024-02-06 19:00     ` Ihor Radchenko
  2024-02-07 13:35       ` Daniel Clemente
  0 siblings, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2024-02-06 19:00 UTC (permalink / raw)
  To: Daniel Clemente; +Cc: emacs-orgmode, Christopher Stevenson

Daniel Clemente <n142857@gmail.com> writes:

> I also see the warnings. In my case it's because I'm using outline-minor
> mode in an elisp file. I'm not sure it's supported, but it worked years
> ago: ...

It is not supported by Org mode.
The modern outline mode has `outline-cycle'.

-- 
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] 5+ messages in thread

* Re: [BUG] repeated warnings about org-element-at-point "cannot be used in non-Org buffer" [9.7 (9.7-??-57b94f3 @ /Users/cstevens/.emacs.d/.local/straight/build-29.2/org/)]
  2024-02-06 19:00     ` Ihor Radchenko
@ 2024-02-07 13:35       ` Daniel Clemente
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Clemente @ 2024-02-07 13:35 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode, Christopher Stevenson

[-- Attachment #1: Type: text/plain, Size: 728 bytes --]

Thanks, I replaced org-cycle/org-global-cycle with
outline-cycle/outline-cycle-buffer, and then the outlining works.

On Tue, 6 Feb 2024 at 18:56, Ihor Radchenko <yantar92@posteo.net> wrote:

> Daniel Clemente <n142857@gmail.com> writes:
>
> > I also see the warnings. In my case it's because I'm using outline-minor
> > mode in an elisp file. I'm not sure it's supported, but it worked years
> > ago: ...
>
> It is not supported by Org mode.
> The modern outline mode has `outline-cycle'.
>
> --
> 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>
>

[-- Attachment #2: Type: text/html, Size: 1397 bytes --]

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

end of thread, other threads:[~2024-02-07 13:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-26 17:26 [BUG] repeated warnings about org-element-at-point "cannot be used in non-Org buffer" [9.7 (9.7-??-57b94f3 @ /Users/cstevens/.emacs.d/.local/straight/build-29.2/org/)] Christopher Stevenson
2024-01-30 15:15 ` Ihor Radchenko
2024-02-06 16:14   ` Daniel Clemente
2024-02-06 19:00     ` Ihor Radchenko
2024-02-07 13:35       ` Daniel Clemente

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.