all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [BUG] org-agenda: definition is void: org-element--cache-active-p
@ 2023-01-18  0:45 zimoun
  2023-01-18  8:54 ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: zimoun @ 2023-01-18  0:45 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

The reproducer using Emacs 28.2 and Org 9.6.1 both from Guix (29efa27):

--8<---------------cut here---------------start------------->8---
$ cd /tmp/
$ cat config.el
(setq
 org-directory "/tmp/"
 org-agenda-files '("example.org"))
$ cat example.org
* TODO Stuff
$ emacs -q -l config.el -f org-agenda

Press m  Match a TAGS/PROP/TODO query

Error:
org-get-buffer-tags: Symbol's function definition is void: org-element--cache-active-p

$ emacs -q -l config.el --eval '(org-batch-agenda "m")' --batch
Debugger entered--Lisp error: (void-function org-element--cache-active-p)
  org-element--cache-active-p()
  org-get-buffer-tags()
  org-make-tags-matcher(nil)
  org-tags-view(nil)
  funcall-interactively(org-tags-view nil)
  call-interactively(org-tags-view)
  org-agenda(nil "m")
  #f(compiled-function () #<bytecode 0xa6570c2f762a95a>)()
  funcall(#f(compiled-function () #<bytecode 0xa6570c2f762a95a>))
  (let nil (funcall '#f(compiled-function () #<bytecode 0xa6570c2f762a95a>)))
  eval((let nil (funcall '#f(compiled-function () #<bytecode 0xa6570c2f762a95a>))))
  org--batch-agenda("m" nil nil)
  (org-batch-agenda "m")
  command-line-1(("-l" "config.el" "--eval" "(org-batch-agenda \"m\")"))
  command-line()
  normal-top-level()
--8<---------------cut here---------------end--------------->8---

To be precise, it is run inside a Linux namespace container:

    guix shell --container emacs emacs-org -E TERM \
         -- emacs -q -l config.el -f org-agenda


This message [1] about a similar topic leads to this commit
791ea50528df55bac110fe5e2731af056989bedb [2]:

--8<---------------cut here---------------start------------->8---
* lisp/org-element.el (org-element--cache-active-p): Fix compiler warning
Using `defsubst' here is impractical because some code above does call
`org-element--cache-active-p'.  Moving would trigger major refactoring
for little gain.  Hence, move back to using simple `defun' until we
modularize lisp/org-element.el better.

Reported-by: No Wayman <iarchivedmywholelife@gmail.com>
Link: https://orgmode.org/list/874jws2v87.fsf@gmail.com
--8<---------------cut here---------------end--------------->8---

and I guess it is related.  Especially with release note 9.6 [3]:

    Element cache is enabled by default and work for headings

Obviously, loading org-element fixes the issue:

    $ emacs -q -l config.el --eval "(require 'org-element)" -f org-agenda

Therefore, maybe the addition of such requirement in org-agenda.el could
be enough?

1:
[BUG] org-element: defsubst org-element--cache-active-p used before defined
Tue, 27 Sep 2022 20:32:36 -0400
id:874jws2v87.fsf@gmail.com

2: https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=791ea50528df55bac110fe5e2731af056989bedb
3: <https://orgmode.org/Changes.html>

Cheers,
simon


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

* Re: [BUG] org-agenda: definition is void: org-element--cache-active-p
  2023-01-18  0:45 [BUG] org-agenda: definition is void: org-element--cache-active-p zimoun
@ 2023-01-18  8:54 ` Ihor Radchenko
  2023-01-18  9:17   ` Simon Tournier
  0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2023-01-18  8:54 UTC (permalink / raw)
  To: zimoun; +Cc: emacs-orgmode

zimoun <zimon.toutoune@gmail.com> writes:

> Obviously, loading org-element fixes the issue:
>
>     $ emacs -q -l config.el --eval "(require 'org-element)" -f org-agenda
>
> Therefore, maybe the addition of such requirement in org-agenda.el could
> be enough?

Thanks for reporting!
Loading should be good enough (and does not cause circular dependency
issue).

Fixed, on bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5d9c9c27c

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: [BUG] org-agenda: definition is void: org-element--cache-active-p
  2023-01-18  8:54 ` Ihor Radchenko
@ 2023-01-18  9:17   ` Simon Tournier
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Tournier @ 2023-01-18  9:17 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

Hi,

On Wed, 18 Jan 2023 at 09:53, Ihor Radchenko <yantar92@posteo.net> wrote:

> Fixed, on bugfix.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5d9c9c27c

Cool!  Thank you for the quick fix.

Cheers,
simon


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

end of thread, other threads:[~2023-01-18  9:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-18  0:45 [BUG] org-agenda: definition is void: org-element--cache-active-p zimoun
2023-01-18  8:54 ` Ihor Radchenko
2023-01-18  9:17   ` Simon Tournier

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.