profile
viewpoint

Ask questionsGoing to the beginning of an Org buffer fails if there is any text before the first heading

In Org buffers M-< seems to only work if the buffer starts with a *. When it fails it does so with the message:

Invalid function: org-with-limited-levels

It fails for (1) an empty Org buffer, (2) a buffer containing just a, (3) a buffer that has * a as the second line after an empty first line, (4) a buffer with, say a title:

#+TITLE: a

* b

I think it might be due to the declaration (declare-function org-with-limited-levels "org-macs"). My theory is that that tells the byte compiler to emit a function call sequence for org-with-limited-levels, but since it's actually a macro and not a function, this causes the invalid function error.

It seems that simply commenting out the declaration fixes the problem and causes no warning from the byte-compiler, but I'm not sure if that's the right fix.

DamienCassou/beginend

Answer questions duckwork

Hmm, yes. Which is pretty strange!

useful!

Related questions

No questions were found.
source:https://uonfu.com/
answerer
Case Duckworth duckwork Baton Rouge, LA https://www.acdw.net Case Duckworth is a LIBRARIAN living in Baton Rouge who uses Linux and codes sometimes, badly.
Github User Rank List