emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Asilata Bapat <asilata@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] org-agenda-skip fails in batch mode because comment-start-skip is nil
Date: Sun, 19 Jun 2022 09:47:22 +0800	[thread overview]
Message-ID: <87edzl4e6t.fsf@localhost> (raw)
In-Reply-To: <87fsk5955a.fsf@gmail.com>

Asilata Bapat <asilata@gmail.com> writes:

> When org-scan-tags runs in a batch mode invocation, the value of the variable comment-start-skip is nil even while scanning an org file. The function org-scan-tags calls (org-agenda-skip), which in turn calls (looking-at comment-start-skip). Since the value of comment-start-skip is nil, it triggers the error (wrong-type-argument stringp nil).
> To fix this, the function org-agenda-skip should ensure that the variable comment-start-skip is set to the appropriate value.

Could you please provide a detailed reproducer?

> 2. The issue can indeed be fixed, e.g., by changing the source of org-agenda-skip to invoke (org-mode) immediately before the let statement. Doing this presumably sets the variable comment-start-skip to the expected value, and the invocation succeeds.

org-agenda-skip should be operating after org-agenda-prepare-buffers,
which, in turn, should call org-mode. org-mode calls
org-setup-comments-handling which must set comment-start-skip to
non-nil.

Best,
Ihor


  reply	other threads:[~2022-06-19  1:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-15 17:44 [BUG] org-agenda-skip fails in batch mode because comment-start-skip is nil Asilata Bapat
2022-06-19  1:47 ` Ihor Radchenko [this message]
2022-06-21  1:42   ` Asilata Bapat
2022-06-23 13:13     ` Ihor Radchenko
2022-09-28  4:35       ` Ihor Radchenko
2022-09-28  4:41         ` Asilata Bapat

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=87edzl4e6t.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=asilata@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).