It would seem I'm experiencing an issue reported against org-super-agenda: https://github.com/alphapapa/org-super-agenda/issues/247 and related to a known change in Org-9.7 org-element-at-point behavior which has affected a number of packages. (I'm not sure why you are seeing it, Mark.)
Since Org-9.7 (when I believe the error was added to org-element) it's revealed issues when building the agenda pops into buffers to do things like determine if it's a habit, check the time grid, etc., where the buffer for some reason doesn't have an org marker and org-element-at-point fails that check and displays the error/warning. Using :habit t, or having a time-grid, or other combinations of things seems to cause this. There are workarounds - see the issue above. Not great but I don't use habits that much yet, so I can just disable them for now. I see you, Ihor, changed it from an error to a warning (thank you!) on 5 Nov 2023 (https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=fac55324accbcab08dfebbde8295b2f1b4b9f45e) noting "Throwing an error (as was done previously) made an urgent call to fix this problem, even when `org-element-at-point' happened to work in a particular scenario. Now, we just display a warning to give package author more time to address or work around this." So, org-super-agenda (alphapapa) is still trying to track down the specific cause of hitting the issue in his package. I see if I can figure out an ECM that would help him. Regards, Rob ? Rob Davenport Consulting R&D Engineer ----Original Message----- From: emacs-orgmode-bounces+rob.davenport=us.abb....@gnu.org <emacs-orgmode-bounces+rob.davenport=us.abb....@gnu.org> On Behalf Of Rob Davenport Sent: Tuesday, April 15, 2025 3:34 PM To: Ihor Radchenko <yanta...@posteo.net> 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/)] Thanks, Ihor. It seems to be related to org-super-agenda. I started with emacs -q and loaded just enough settings to be able to load org-mode and build my agenda. I also did not see the non-Org buffer warning. So I started adding packages back in (well Org-related ones), and I got them all added back except one. When I added org-super-agenda back, then I started seeing the non-Org buffer warning. Now to go to minimal org-super-agenda settings and add mine back in to see if one of them causes it, or what. Rob ? Rob Davenport Consulting R&D Engineer -----Original Message----- From: Ihor Radchenko <yanta...@posteo.net> Sent: Tuesday, April 15, 2025 2:20 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: > Good to know it works be default, (unless I screwed up my tests) > ... 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. bisecting does not mean stripping out suspects. It is more efficient. You just divide uncommented parts of the config in half multiple times, commenting out chunks until the bug disappears. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://urldefense.com/v3/__https://orgmode.org/__;!!NLW3fF9v!JaNnh8nTLtKqkp9pbOzvrnEsjslUUl_TDOorD-G1vlW6trpuMndS8h_fleOXWvbDnAf9BBi2NuT7Li8srXTa5w$ >. Support Org development at <https://urldefense.com/v3/__https://liberapay.com/org-mode__;!!NLW3fF9v!JaNnh8nTLtKqkp9pbOzvrnEsjslUUl_TDOorD-G1vlW6trpuMndS8h_fleOXWvbDnAf9BBi2NuT7Li9oQf3Wgw$ >, or support my work at <https://urldefense.com/v3/__https://liberapay.com/yantar92__;!!NLW3fF9v!JaNnh8nTLtKqkp9pbOzvrnEsjslUUl_TDOorD-G1vlW6trpuMndS8h_fleOXWvbDnAf9BBi2NuT7Li9JtP-7-g$ >