Re: Lisp error: (void-function org-element-keyword-parser)

2021-10-26 Thread Eric S Fraga
On Monday, 25 Oct 2021 at 15:00, Nick Dokos wrote:
> Eric S Fraga  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



Re: Lisp error: (void-function org-element-keyword-parser)

2021-10-25 Thread Nick Dokos
Eric S Fraga  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




Re: Lisp error: (void-function org-element-keyword-parser)

2021-10-24 Thread Ihor Radchenko
William Denton  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



Re: Lisp error: (void-function org-element-keyword-parser)

2021-10-24 Thread William Denton

On 24 October 2021, Ihor Radchenko wrote:


William Denton  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



Re: Lisp error: (void-function org-element-keyword-parser)

2021-10-23 Thread Ihor Radchenko
William Denton  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



Re: Lisp error: (void-function org-element-keyword-parser)

2021-10-23 Thread William Denton

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

Re: Lisp error: (void-function org-element-keyword-parser)

2021-10-22 Thread Ihor Radchenko
Jonas Bernoulli  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 

Best,
Ihor



problem.org
Description: Lotus Organizer


Re: Lisp error: (void-function org-element-keyword-parser)

2021-10-22 Thread Jonas Bernoulli
> 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.



Re: Lisp error: (void-function org-element-keyword-parser)

2021-10-22 Thread Eric S Fraga
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



Re: Lisp error: (void-function org-element-keyword-parser)

2021-10-21 Thread Ihor Radchenko
William Denton  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



Re: Lisp error: (void-function org-element-keyword-parser)

2021-10-21 Thread Ihor Radchenko
William Denton  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