* [BUG] wrong-type-argument syntax-table-p "Syntax table including \"@\" and \"_\" as word constituents.
@ 2023-05-27 10:18 Daniel Clemente
2023-05-29 8:34 ` Ihor Radchenko
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Clemente @ 2023-05-27 10:18 UTC (permalink / raw)
To: Org-mode
[-- Attachment #1: Type: text/plain, Size: 1926 bytes --]
Hi,
there was a recent change to how the tags table is initialized. I think
that as a side effect, some tag functions like org-tags-expand don't work
unless you open an org-mode buffer first. I have a small bash script that
exports my agenda; right in the beginning (before opening any org-mode
file) it collects some data by calling org-map-entries. org-map-entries
needs org-tags-expand, which now fails because the syntax table hasn't been
initialized yet.
Minimal case to reproduce this:
1. run: emacs -Q
2. load latest org:
(add-to-list 'load-path "/…/org-mode/lisp")
(require 'org)
3. eval:
(org-tags-expand "+sometag")
You'll see:
Debugger entered--Lisp error: (wrong-type-argument syntax-table-p "Syntax
table including \"@\" and \"_\" as word constit...")
org-tags-expand("+sometag")
(progn (org-tags-expand "+sometag"))
elisp--eval-last-sexp(nil)
eval-last-sexp(nil)
funcall-interactively(eval-last-sexp nil)
If I open any .org file before step 3, then it will work.
I think the related commit is:
commit 6e6354c074a323780f103aabf45be74104ce3ecf
Author: Ihor Radchenko <yantar92@posteo.net>
Date: Mon May 8 13:23:15 2023 +0200
org-tags-expand: Do no modify buffer's syntax table by side effect
* lisp/org.el (org-mode-tags-syntax-table): New variable holding
syntax table for tags.
(org-mode): Initialize tag syntax table.
(org-make-tags-matcher): Match tags using appropriate syntax table.
(org-tags-expand): Do no modify syntax table by side effect.
Reported-by: Mattias Engdegård <mattias.engdegard@gmail.com>
Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63225#68
Of course I could make sure to open an org file (any file) before calling
org-map-entries but that seems like a workaround to a bug. I would expect
(org-map-entries … 'agenda) to also work before opening any .org file.
[-- Attachment #2: Type: text/html, Size: 2592 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [BUG] wrong-type-argument syntax-table-p "Syntax table including \"@\" and \"_\" as word constituents.
2023-05-27 10:18 [BUG] wrong-type-argument syntax-table-p "Syntax table including \"@\" and \"_\" as word constituents Daniel Clemente
@ 2023-05-29 8:34 ` Ihor Radchenko
2023-05-29 17:14 ` Daniel Clemente
0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2023-05-29 8:34 UTC (permalink / raw)
To: Daniel Clemente; +Cc: Org-mode
Daniel Clemente <n142857@gmail.com> writes:
> there was a recent change to how the tags table is initialized. I think
> that as a side effect, some tag functions like org-tags-expand don't work
> unless you open an org-mode buffer first. I have a small bash script that
> exports my agenda; right in the beginning (before opening any org-mode
> file) it collects some data by calling org-map-entries. org-map-entries
> needs org-tags-expand, which now fails because the syntax table hasn't been
> initialized yet.
>
> Minimal case to reproduce this:
Thanks for reporting!
Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=24ed8b204
--
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] wrong-type-argument syntax-table-p "Syntax table including \"@\" and \"_\" as word constituents.
2023-05-29 8:34 ` Ihor Radchenko
@ 2023-05-29 17:14 ` Daniel Clemente
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Clemente @ 2023-05-29 17:14 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: Org-mode
[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]
It works now. Thanks!
On Mon, 29 May 2023 at 08:34, Ihor Radchenko <yantar92@posteo.net> wrote:
> Daniel Clemente <n142857@gmail.com> writes:
>
> > there was a recent change to how the tags table is initialized. I think
> > that as a side effect, some tag functions like org-tags-expand don't work
> > unless you open an org-mode buffer first. I have a small bash script that
> > exports my agenda; right in the beginning (before opening any org-mode
> > file) it collects some data by calling org-map-entries. org-map-entries
> > needs org-tags-expand, which now fails because the syntax table hasn't
> been
> > initialized yet.
> >
> > Minimal case to reproduce this:
>
> Thanks for reporting!
> Fixed, on main.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=24ed8b204
>
> --
> 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>
>
[-- Attachment #2: Type: text/html, Size: 1842 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-29 17:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-27 10:18 [BUG] wrong-type-argument syntax-table-p "Syntax table including \"@\" and \"_\" as word constituents Daniel Clemente
2023-05-29 8:34 ` Ihor Radchenko
2023-05-29 17:14 ` Daniel Clemente
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).