Good to know it works be default, so it's not org-mode itself but some interference with something else. I'll try narrowing down the problem. I've got a large set of packages and my config is split up into numerous files so it might take a while. I can try from both directions too. Strip out suspect things (bisecting) from my existing config or start from plain vanilla emacs, add org-mode and then start adding packages back until it breaks.
Rob ? Rob Davenport Consulting R&D Engineer -----Original Message----- From: Ihor Radchenko <yanta...@posteo.net> Sent: Tuesday, April 15, 2025 12:01 PM To: Rob Davenport <rob.davenp...@us.abb.com> Cc: Mark Barton <mbarto...@gmail.com>; Org Mode List <emacs-orgmode@gnu.org> Subject: RE: [BUG] Warning (org-element): ‘org-element-at-point’ cannot be used in non-Org buffer #<buffer *Org Agenda*> (org-agenda-mode) [9.7.11 (release_9.7.11 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)] BeSecure! This email comes from outside of ABB. Make sure you verify the sender before clicking any links or downloading/opening attachments. If this email looks suspicious, report it by clicking 'Report Phishing' button in Outlook or raising a ticket on MyIS. Rob Davenport <rob.davenp...@us.abb.com> writes: > FYI - so far, I've narrowed down when I get the "cannot be used in non-Org > buffer" error in my setup to the use of org-agenda-include-diary. > > With this set to t: > > (use-package org > ... > :config > (setq org-agenda-include-diary t) > ... Thanks! That's a good hint to start investigation. I tried to create a small diary file 04/15/2025 * Meeting with team @ 10:00 * Dentist appointment @ 14:30 * Pay electricity bill Then, I opened a clean emacs, evaluated M-: (setq org-agenda-include-diary t) RET and opened agenda M-x org-agenda RET a I saw no warnings. So, there is something extra going on. I recommend putting (setq org-agenda-include-diary t) on top of your config and trying to bisect again. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://urldefense.com/v3/__https://orgmode.org/__;!!NLW3fF9v!OsFeq9iMQK7iqekf9w7YWY6_wPCCC7YPVWRPajqFjT3ywAcV525icEN7VwnjRsKWDu7g6PwUlBNWUfbvAMTYGg$ >. Support Org development at <https://urldefense.com/v3/__https://liberapay.com/org-mode__;!!NLW3fF9v!OsFeq9iMQK7iqekf9w7YWY6_wPCCC7YPVWRPajqFjT3ywAcV525icEN7VwnjRsKWDu7g6PwUlBNWUfa9_Qxc5Q$ >, or support my work at <https://urldefense.com/v3/__https://liberapay.com/yantar92__;!!NLW3fF9v!OsFeq9iMQK7iqekf9w7YWY6_wPCCC7YPVWRPajqFjT3ywAcV525icEN7VwnjRsKWDu7g6PwUlBNWUfYow_Gdyg$ >