all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Rustom Mody <rustompmody@gmail.com>
Cc: emacs-orgmode@gnu.org, Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: continuing about orgalist org-element interaction
Date: Wed, 19 Jun 2024 16:43:51 +0000	[thread overview]
Message-ID: <87zfrg992w.fsf@localhost> (raw)
In-Reply-To: <CAJ+TeocAL29TGp07pkQjAMn9MsJ-NOyYUJzKohdY+aTNGo-nFA@mail.gmail.com>

Rustom Mody <rustompmody@gmail.com> writes:

> I figured its these 5 lines at the start of org-element-at-point
>
> (unless (derived-mode-p 'org-mode)
>          (display-warning
>           '(org-element org-element-parser)
>           (format-message
>            "`org-element-at-point' cannot be used in non-Org buffer %S (%s)"
>          (current-buffer) major-mode)))
>
> Now the current buffer (in my case) is text-mode, obviously not org
> mode so why that check??

That warning says that you should not call `org-element-at-point' (Org
parser) in non-Org buffers. That may lead to unpredictable results.

Something in your Emacs is doing that.
You may find out what by doing something like
M-x debug-on-entry RET org-element-at-point

> Commenting out those lines the error message has gone. (And of course
> its still working)

So, you are lucky. May even disable that warning.

> Now obviously I dont understand enough about the innards of org to
> make any suggestion to remove as Ive currently tried.
> But still there is the question (really for Nicolas)
> What is the meaning of ensuring that its org mode and warning
> otherwise when orgalist (like orgtbl) are meant specifically for non
> org buffers?

`org-element-at-point' has nothing to do with orgalist.
It is a function defined in Org mode.

-- 
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	other threads:[~2024-06-19 16:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19 16:07 continuing about orgalist org-element interaction Rustom Mody
2024-06-19 16:43 ` Ihor Radchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zfrg992w.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    --cc=rustompmody@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.