Dima Kogan writes: > Hi. I'm using the org included with a recent build from emacs git. I > have this tst.org: > > [[name][link]] > > * heading > #+NAME: name > > text > > I open it with 'emacs -Q'. I move the point to the link at the top, and > C-c C-o to follow the link. This doesn't work: > > Debugger entered--Lisp error: (wrong-type-argument stringp nil) [...] > Apparently org doesn't like the empty line right after the #+NAME tag. > Removing that empty line makes it work.
Thanks for the report. As suggested in Dante's reply, the blank line following #+name is invalid syntax. https://orgmode.org/worg/dev/org-syntax.html#Affiliated_keywords On maint (3bb073b63), the type error is now avoided for invalid name keywords. No attempt is made to match these keywords, though, so your example won't lead to a match aside from through a fuzzy text search when org-link-search-must-match-exact-headline is nil.