From: Daniel Clemente <n142857@gmail.com>
To: Org-mode <emacs-orgmode@gnu.org>
Subject: [BUG] wrong-type-argument syntax-table-p "Syntax table including \"@\" and \"_\" as word constituents.
Date: Sat, 27 May 2023 10:18:33 +0000 [thread overview]
Message-ID: <CAJKAhPCcMwZS6aYK9MRKsjds9uTivOdfC9nzMok70Df8vR3tPA@mail.gmail.com> (raw)
[-- 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 --]
next reply other threads:[~2023-05-27 10:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-27 10:18 Daniel Clemente [this message]
2023-05-29 8:34 ` [BUG] wrong-type-argument syntax-table-p "Syntax table including \"@\" and \"_\" as word constituents Ihor Radchenko
2023-05-29 17:14 ` Daniel Clemente
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=CAJKAhPCcMwZS6aYK9MRKsjds9uTivOdfC9nzMok70Df8vR3tPA@mail.gmail.com \
--to=n142857@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).