emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Lisp error: (void-function org-element-keyword-parser)
@ 2021-10-22  0:54 William Denton
  2021-10-22  1:11 ` Ihor Radchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: William Denton @ 2021-10-22  0:54 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2912 bytes --]

I've had something strange going on for days that I haven't been able to figure 
out.  With my usual set up, I can get things working except that any Org files 
initially loaded up aren't recognized as Org, but if I run =M-x org-mode= it all 
kicks in.  There were also transient errors about avl-tree-something showing. 
(Whether this is connected to the R problem I mentioned a few days ago, I don't 
know, but this was worse so I'm trying to figure it out first.)

I spent a while trying it out with various methods that just confused me more 
(and made me consider declaring init backruptcy), but eventually I got it down 
to something that I think is reproducible but doesn't make sense to me.

I run Org from source and Emacs from source.  I've kept both up to date and 
remade them over the past few days as I've been working on this.

I used the minimal-org.el file from https://orgmode.org/org.html#Feedback .

I have a problem.org file that is just:

#+begin_src org
,#+TITLE: Problem?
,#+STARTUP: showall
#+end_src

These are both in /tmp/.

I run:

$ cd /usr/local/src/org-mode
$ git pull
$ git rev-parse HEAD
5315773e8a0838268592617174b221ec7bf1c87a
$ make autoloads
$ cd /tmp/
$ emacs -Q -l minimal-org.el

Emacs starts, I hit =C-x C-f problem.org= ... and I get this error 
(also attached; I deleted a list of file modes to make it more readable):

   Debugger entered--Lisp error: (void-function org-element-keyword-parser)
     org-element-keyword-parser(39 (19))
     org--collect-keywords-1(("SETUPFILE" "FILETAGS" "TAGS" "ARCHIVE" "CATEGORY" 
"COLUMNS" "CONSTANTS" "LINK" "OPTIONS" "PRIORITIES" "PROPERTY" "SEQ_TODO" 
"STARTUP" "TODO" "T  YP_TODO") ("ARCHIVE" "CATEGORY" "COLUMNS" "PRIORITIES") nil 
("/tmp/problem.org") nil)
     org-collect-keywords(("FILETAGS" "TAGS" "ARCHIVE" "CATEGORY" "COLUMNS" 
"CONSTANTS" "LINK" "OPTIONS" "PRIORITIES" "PROPERTY" "SEQ_TODO" "STARTUP" "TODO" 
"TYP_TODO") ("ARC  HIVE" "CATEGORY" "COLUMNS" "PRIORITIES"))
     org-set-regexps-and-options()
     org-mode()
     set-auto-mode-0(org-mode nil)
     set-auto-mode--apply-alist((("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" nil epa-file) MUCH DELETED nil nil)
     set-auto-mode()
     normal-mode(t)
     after-find-file(nil t)
     find-file-noselect-1(#<buffer problem.org> "/tmp/problem.org" nil nil "/tmp/problem.org" (933773 2052))
     find-file-noselect("/tmp/problem.org" nil nil t)
     find-file("/tmp/problem.org" t)
     funcall-interactively(find-file "/tmp/problem.org" t)
     call-interactively(find-file nil nil)
     command-execute(find-file)

I have no idea what's causing that.  Is this reproducible?  Does anyone know 
what's going on?  Surely if other people were seeing it they'd have reported it, 
but if this isn't reproducible I don't know why.

Thanks for any help!

Bill

--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada

[-- Attachment #2: Type: text/plain, Size: 2691 bytes --]

Debugger entered--Lisp error: (void-function org-element-keyword-parser)
  org-element-keyword-parser(39 (19))
  org--collect-keywords-1(("SETUPFILE" "FILETAGS" "TAGS" "ARCHIVE" "CATEGORY" "COLUMNS" "CONSTANTS" "LINK" "OPTIONS" "PRIORITIES" "PROPERTY" "SEQ_TODO" "STARTUP" "TODO" "TYP_TODO") ("ARCHIVE" "CATEGORY" "COLUMNS" "PRIORITIES") nil ("/tmp/problem.org") nil)
  org-collect-keywords(("FILETAGS" "TAGS" "ARCHIVE" "CATEGORY" "COLUMNS" "CONSTANTS" "LINK" "OPTIONS" "PRIORITIES" "PROPERTY" "SEQ_TODO" "STARTUP" "TODO" "TYP_TODO") ("ARCHIVE" "CATEGORY" "COLUMNS" "PRIORITIES"))
  org-set-regexps-and-options()
  org-mode()
  set-auto-mode-0(org-mode nil)
  set-auto-mode--apply-alist((("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" nil epa-file) ("\\.elc\\'" . elisp-byte-code-mode) ("\\.zst\\'" nil jka-compr) ("\\.dz\\'" nil jka-compr) ("\\.xz\\'" nil jka-compr) ("\\.lzma\\'" nil jka-compr) ("\\.lz\\'" nil jka-compr) ("\\.g?z\\'" nil jka-compr) ("\\.bz2\\'" nil jka-compr) ("\\.Z\\'" nil jka-compr) ("\\.vr[hi]?\\'" . vera-mode) ("\\(?:\\.\\(?:rbw?\\|ru\\|rake\\|thor\\|jbuilder\\|rabl\\|ge..." . ruby-mode) ("\\.re?st\\'" . rst-mode) ("\\.py[iw]?\\'" . python-mode) ("\\.m\\'" . octave-maybe-mode) ("\\.less\\'" . less-css-mode) ("\\.scss\\'" . scss-mode) ("\\.awk\\'" . awk-mode) ("\\.\\(u?lpc\\|pike\\|pmod\\(\\.in\\)?\\)\\'" . pike-mode) ("\\.idl\\'" . idl-mode) ("\\.java\\'" . java-mode) ("\\.m\\'" . objc-mode) ("\\.ii\\'" . c++-mode) ("\\.i\\'" . c-mode) ("\\.lex\\'" . c-mode) ("\\.y\\(acc\\)?\\'" . c-mode) ("\\.h\\'" . c-or-c++-mode) ("\\.c\\'" . c-mode) ("\\.\\(CC?\\|HH?\\)\\'" . c++-mode) ("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode) ("\\.\\(cc\\|hh\\)\\'" . c++-mode) ("\\.\\(bat\\|cmd\\)\\'" . bat-mode) ("\\.[sx]?html?\\(\\.[a-zA-Z_]+\\)?\\'" . mhtml-mode) ("\\.svgz?\\'" . image-mode) ("\\.svgz?\\'" . xml-mode) ("\\.x[bp]m\\'" . image-mode) ("\\.x[bp]m\\'" . c-mode) ("\\.p[bpgn]m\\'" . image-mode) ("\\.tiff?\\'" . image-mode) ("\\.gif\\'" . image-mode) ("\\.png\\'" . image-mode) ("\\.jpe?g\\'" . image-mode) ("\\.te?xt\\'" . text-mode) ("\\.[tT]e[xX]\\'" . tex-mode) ("\\.ins\\'" . tex-mode) ("\\.ltx\\'" . latex-mode) ("\\.dtx\\'" . doctex-mode) ("\\.org\\'" . org-mode) ("\\.dir-locals\\(?:-2\\)?\\.el\\'" . lisp-data-mode) ("eww-bookmarks\\'" . lisp-data-mode) ...) nil nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer problem.org> "/tmp/problem.org" nil nil "/tmp/problem.org" (933773 2052))
  find-file-noselect("/tmp/problem.org" nil nil t)
  find-file("/tmp/problem.org" t)
  funcall-interactively(find-file "/tmp/problem.org" t)
  call-interactively(find-file nil nil)
  command-execute(find-file)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Lisp error: (void-function org-element-keyword-parser)
  2021-10-22  0:54 Lisp error: (void-function org-element-keyword-parser) William Denton
@ 2021-10-22  1:11 ` Ihor Radchenko
  2021-10-22  1:39 ` Ihor Radchenko
  2021-10-22  6:47 ` Eric S Fraga
  2 siblings, 0 replies; 12+ messages in thread
From: Ihor Radchenko @ 2021-10-22  1:11 UTC (permalink / raw)
  To: William Denton; +Cc: emacs-orgmode

William Denton <wtd@pobox.com> writes:

> I've had something strange going on for days that I haven't been able to figure 
> out.  With my usual set up, I can get things working except that any Org files 
> initially loaded up aren't recognized as Org, but if I run =M-x org-mode= it all 
> kicks in.

Can you try again with latest main (5315773e8)?

Best,
Ihor


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Lisp error: (void-function org-element-keyword-parser)
  2021-10-22  0:54 Lisp error: (void-function org-element-keyword-parser) William Denton
  2021-10-22  1:11 ` Ihor Radchenko
@ 2021-10-22  1:39 ` Ihor Radchenko
  2021-10-22 22:16   ` Jonas Bernoulli
  2021-10-23 16:59   ` William Denton
  2021-10-22  6:47 ` Eric S Fraga
  2 siblings, 2 replies; 12+ messages in thread
From: Ihor Radchenko @ 2021-10-22  1:39 UTC (permalink / raw)
  To: William Denton; +Cc: emacs-orgmode

William Denton <wtd@pobox.com> writes:

> $ git rev-parse HEAD
> 5315773e8a0838268592617174b221ec7bf1c87a

Sorry, I missed that you are already on the latest main.

I cannot reproduce the problem using relatively recent Emacs master
(commit ae9bfaa891c).

A blind guess: Try to run make clean?

Best,
Ihor


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Lisp error: (void-function org-element-keyword-parser)
  2021-10-22  0:54 Lisp error: (void-function org-element-keyword-parser) William Denton
  2021-10-22  1:11 ` Ihor Radchenko
  2021-10-22  1:39 ` Ihor Radchenko
@ 2021-10-22  6:47 ` Eric S Fraga
  2021-10-25 19:00   ` Nick Dokos
  2 siblings, 1 reply; 12+ messages in thread
From: Eric S Fraga @ 2021-10-22  6:47 UTC (permalink / raw)
  To: William Denton; +Cc: emacs-orgmode

On Thursday, 21 Oct 2021 at 20:54, William Denton wrote:
> With my usual set up, I can get things working except that any Org files
> initially loaded up aren't recognized as Org, but if I run =M-x org-mode= it all
> kicks in.  

For the record, I have had this or something very similar for a very
long time (years) now.  All my org-agenda-files which get loaded during
my initialization, when I set up the appointment handling, are in org
mode but none of the in-file settings have been applied.  I brought this
up on the list a long time ago and was told that this was the expected
behaviour.

Are you sure they are not recognised as org files or is it that your
specific settings are ignored?

-- 
: Eric S Fraga via Emacs 28.0.60, Org release_9.5-163-g4eab5b
: Latest paper written in org: https://arxiv.org/abs/2106.05096


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Lisp error: (void-function org-element-keyword-parser)
  2021-10-22  1:39 ` Ihor Radchenko
@ 2021-10-22 22:16   ` Jonas Bernoulli
  2021-10-23  3:28     ` Ihor Radchenko
  2021-10-23 16:59   ` William Denton
  1 sibling, 1 reply; 12+ messages in thread
From: Jonas Bernoulli @ 2021-10-22 22:16 UTC (permalink / raw)
  To: Ihor Radchenko, William Denton; +Cc: emacs-orgmode

> A blind guess: Try to run make clean?

Didn't help here.

I have added

(with-eval-after-load 'org
  (require 'org-element))

to my init.el as a temporary workaround.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Lisp error: (void-function org-element-keyword-parser)
  2021-10-22 22:16   ` Jonas Bernoulli
@ 2021-10-23  3:28     ` Ihor Radchenko
  0 siblings, 0 replies; 12+ messages in thread
From: Ihor Radchenko @ 2021-10-23  3:28 UTC (permalink / raw)
  To: Jonas Bernoulli; +Cc: William Denton, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 377 bytes --]

Jonas Bernoulli <jonas@bernoul.li> writes:

>> A blind guess: Try to run make clean?
>
> Didn't help here.

Can you try exactly the following steps:

1. Save the attached file to /tmp/problem.org

2.

mkdir /tmp/orgmode-test
cd /tmp/orgomode-test
git clone git://git.sv.gnu.org/emacs/org-mode.git
cd org-mode/
emacs -Q -l ./lisp

3. C-x C-f /tmp/problem.org <RET>

Best,
Ihor


[-- Attachment #2: problem.org --]
[-- Type: application/vnd.lotus-organizer, Size: 65 bytes --]

#+begin_src org
,#+TITLE: Problem?
,#+STARTUP: showall
#+end_src

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Lisp error: (void-function org-element-keyword-parser)
  2021-10-22  1:39 ` Ihor Radchenko
  2021-10-22 22:16   ` Jonas Bernoulli
@ 2021-10-23 16:59   ` William Denton
  2021-10-24  5:00     ` Ihor Radchenko
  1 sibling, 1 reply; 12+ messages in thread
From: William Denton @ 2021-10-23 16:59 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2002 bytes --]

On 22 October 2021, Ihor Radchenko wrote:

> I cannot reproduce the problem using relatively recent Emacs master
> (commit ae9bfaa891c).
>
> A blind guess: Try to run make clean?

Thanks for checking, and the suggestion.  In the end I think one or the other 
two things did it:

First, rebuilding Emacs with "make cleanall && make bootstrap".  I'd use "make 
bootstrap" to clear out a warning I was getting about Tramp having been built 
with a previous version, and it was after that that my problems started, but 
whether because of it, who knows.

Second, dropping the org-bullets package that makes Org look fancier.  In all my 
looking at warnings and messages I saw some mention of it, so I removed it, and 
then things started working again.

So if anyone out there is using org-bullets and runs into a problem, try 
removing it and see if that helps.

Now I'm using org-superstar-mode¹ and liking it.  In case it's helpful to 
anyone, this is my use-package incantation.

(use-package org-superstar
   :config
   (setq org-superstar-headline-bullets-list '("⊢" "⋮" "⋱" "◉" "○"))
   :hook
   (org-mode . (lambda () (org-superstar-mode 1)))
   )

Sometimes fiddling with Emacs and Org is like spending an afternoon working in 
the kitchen cleaning out the fridge, cleaning the oven, fixing a leak in the tap 
and reorganizing your pots and pans.  Then you discover that when you turn on 
the hot water the refrigeratoor door swings open.  There's no clue why.  You can 
either spend days identifying the problem, or you can live with it, or you can 
move.  Then you ask if this has ever happened to anyone else, and someone says 
they discovered it stops if your feet are bare, and five years later you're 
still taking off your shoes and socks before cooking.

Bill

¹ https://github.com/integral-dw/org-superstar-mode

--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Lisp error: (void-function org-element-keyword-parser)
  2021-10-23 16:59   ` William Denton
@ 2021-10-24  5:00     ` Ihor Radchenko
  2021-10-25  1:55       ` William Denton
  0 siblings, 1 reply; 12+ messages in thread
From: Ihor Radchenko @ 2021-10-24  5:00 UTC (permalink / raw)
  To: William Denton; +Cc: emacs-orgmode

William Denton <wtd@pobox.com> writes:

> So if anyone out there is using org-bullets and runs into a problem, try 
> removing it and see if that helps.

Not necessarily.  Recent patch (d3143feaf) removed the call to
org-element-keyword-parser completely, which was probably the real fix
;)

Best,
Ihor


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Lisp error: (void-function org-element-keyword-parser)
  2021-10-24  5:00     ` Ihor Radchenko
@ 2021-10-25  1:55       ` William Denton
  2021-10-25  2:28         ` Ihor Radchenko
  0 siblings, 1 reply; 12+ messages in thread
From: William Denton @ 2021-10-25  1:55 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

On 24 October 2021, Ihor Radchenko wrote:

> William Denton <wtd@pobox.com> writes:
>
>> So if anyone out there is using org-bullets and runs into a problem, try
>> removing it and see if that helps.
>
> Not necessarily.  Recent patch (d3143feaf) removed the call to
> org-element-keyword-parser completely, which was probably the real fix
> ;)

It's things like this that make me consider going back to using my operating 
system's Emacs package and Emacs's Org, so everything is nice and stable all the 
time.  One day I will, but not today ...

Bill

--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Lisp error: (void-function org-element-keyword-parser)
  2021-10-25  1:55       ` William Denton
@ 2021-10-25  2:28         ` Ihor Radchenko
  0 siblings, 0 replies; 12+ messages in thread
From: Ihor Radchenko @ 2021-10-25  2:28 UTC (permalink / raw)
  To: William Denton; +Cc: emacs-orgmode

William Denton <wtd@pobox.com> writes:

> It's things like this that make me consider going back to using my operating 
> system's Emacs package and Emacs's Org, so everything is nice and stable all the 
> time.  One day I will, but not today ...

We have stable bugfix branch distributed via ELPA. main is the
development branch. It is inherently unstable, especially when we do
major changes in the internal Org machinery.

Best,
Ihor


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Lisp error: (void-function org-element-keyword-parser)
  2021-10-22  6:47 ` Eric S Fraga
@ 2021-10-25 19:00   ` Nick Dokos
  2021-10-26  8:54     ` Eric S Fraga
  0 siblings, 1 reply; 12+ messages in thread
From: Nick Dokos @ 2021-10-25 19:00 UTC (permalink / raw)
  To: emacs-orgmode

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> On Thursday, 21 Oct 2021 at 20:54, William Denton wrote:
>> With my usual set up, I can get things working except that any Org files
>> initially loaded up aren't recognized as Org, but if I run =M-x org-mode= it all
>> kicks in.  
>
> For the record, I have had this or something very similar for a very
> long time (years) now.  All my org-agenda-files which get loaded during
> my initialization, when I set up the appointment handling, are in org
> mode but none of the in-file settings have been applied.  I brought this
> up on the list a long time ago and was told that this was the expected
> behaviour.
>
> Are you sure they are not recognised as org files or is it that your
> specific settings are ignored?

Hi Eric,

I'm pretty sure that that should *NOT* be the case: setting the mode
on the file consists of calling `org-mode'; that calls
`org-set-regexps-and-options' which loops over all the in-buffer
options and sets them.

When you do `C-c C-c' on an in-buffer option after the initialization,
that calls `org-mode-restart' which calls `org-mode' which calls
`org-set-regexps-and-options'.

So the only time an in-buffer setting would not be recognized is
after you've added it to the buffer and before you've restarted Org mode
on it (or closed and reopened which does pretty much the same thing).
If you have unrecognized settings when you open a file and the file is
already in Org mode, that needs to be investigated: it's very much
*un*expected AFAICT.

I haven't gone back to find the previous discussion, but if you can find
it, you might want to resurrect it.

-- 
Nick

"There are only two hard problems in computer science: cache invalidation, naming things, and off-by-one errors." -Martin Fowler



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Lisp error: (void-function org-element-keyword-parser)
  2021-10-25 19:00   ` Nick Dokos
@ 2021-10-26  8:54     ` Eric S Fraga
  0 siblings, 0 replies; 12+ messages in thread
From: Eric S Fraga @ 2021-10-26  8:54 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-orgmode

On Monday, 25 Oct 2021 at 15:00, Nick Dokos wrote:
> Eric S Fraga <e.fraga@ucl.ac.uk> writes:
>> For the record, I have had this or something very similar for a very
>> long time (years) now.  All my org-agenda-files which get loaded during
>> my initialization, when I set up the appointment handling, are in org
>> mode but none of the in-file settings have been applied.  
>
> I'm pretty sure that that should *NOT* be the case: setting the mode
> on the file consists of calling `org-mode'; that calls
> `org-set-regexps-and-options' which loops over all the in-buffer
> options and sets them.

Hi Nick,

I was told (I will try to find the original answer but it was indeed a
very long time ago) that the files were loaded in some way that avoided
all/most initialization.

The behaviour I see does seem to match the behaviour I would expect if
org-agenda-inhibit-startup were t but I have it set to nil.

Going through the org agenda appt code also seems to ensure that this
variable is nil in any case.

So I remain puzzled but it's not a biggie (for me) as Emacs is my window
manager (exwm) and my system is up 24/7: I seldom re-start Emacs.

-- 
: Eric S Fraga via Emacs 28.0.60, Org release_9.5-163-g4eab5b
: Latest paper written in org: https://arxiv.org/abs/2106.05096


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-10-26  8:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-22  0:54 Lisp error: (void-function org-element-keyword-parser) William Denton
2021-10-22  1:11 ` Ihor Radchenko
2021-10-22  1:39 ` Ihor Radchenko
2021-10-22 22:16   ` Jonas Bernoulli
2021-10-23  3:28     ` Ihor Radchenko
2021-10-23 16:59   ` William Denton
2021-10-24  5:00     ` Ihor Radchenko
2021-10-25  1:55       ` William Denton
2021-10-25  2:28         ` Ihor Radchenko
2021-10-22  6:47 ` Eric S Fraga
2021-10-25 19:00   ` Nick Dokos
2021-10-26  8:54     ` Eric S Fraga

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).