emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [BUG] org-agenda: definition is void: org-element--cache-active-p
Date: Wed, 18 Jan 2023 01:45:55 +0100	[thread overview]
Message-ID: <86r0vszn3w.fsf@gmail.com> (raw)

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


             reply	other threads:[~2023-01-18  0:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-18  0:45 zimoun [this message]
2023-01-18  8:54 ` [BUG] org-agenda: definition is void: org-element--cache-active-p Ihor Radchenko
2023-01-18  9:17   ` Simon Tournier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86r0vszn3w.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).