emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [BUG] repeated warnings about org-element-at-point "cannot be used i


From: Daniel Clemente
Subject: 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/)]
Date: Tue, 6 Feb 2024 16:14:32 +0000

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>


reply via email to

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