Christian Moe <m...@christianmoe.com> writes:

> Hi,
>
> After upgrading to 9.7.1 on Emacs 27.1, I get a curious warning on Emacs
> start-up:
>
> "Warning (org-element): ‘org-element-at-point’ cannot be used in non-Org
> buffer #<buffer *scratch*> (fundamental-mode)"
>
> It does not happen with 'emacs -Q', but it also did not happen before
> the upgrade, so I don't know what in my configuration now triggers it,
> or why anything would want to do this.
>
> Anyone else seeing this?

I also started to see this.  I too traced it to some of my own
coding where I was doing some fancy reformatting of the "*Org
Agenda*" buffer with a definition of org-agenda-prefix-format
that called my user function with an argument including
(org-get-outline-path).  This now gives the above warning
because *Org Agenda* is not an org buffer per se.

I worked around it by removing the custom code which was
pretty awkward in any case.  It does however leave open the
question about whether there are or are not legitimate cases
for org-element-at-point in buffers which are not org buffers
but present summary or custom views of org material like the
agenda.

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU-Linux/Emacs/Gnus/BBDB

Reply via email to