From: Asilata Bapat <asilata@gmail.com>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] org-agenda-skip fails in batch mode because comment-start-skip is nil
Date: Tue, 21 Jun 2022 11:42:55 +1000 [thread overview]
Message-ID: <87pmj2hj51.fsf@gmail.com> (raw)
In-Reply-To: <87edzl4e6t.fsf@localhost>
[-- Attachment #1.1: Type: text/plain, Size: 1221 bytes --]
Ihor Radchenko <yantar92@gmail.com> writes:
> Could you please provide a detailed reproducer?
Sure. I have attached the files "mwe-data.org" and "mwe-export.org".
To reproduce, save both files in the same directory. Then open mwe-export.org, navigate to the "Export script" heading, and evaluate (Ctrl-C Ctrl-C) the shell source block.
Expected output: a generated html file containing the fruits and vegetables from the mwe-data.org file.
Actual output: Lisp error: (wrong-type-argument stringp nil), details as in my first message.
Compare on the other hand if you navigate to the "Fruits and vegetables" heading and evaluate the emacs-lisp code block, it outputs a list of fruits and vegetables in a results drawer.
> 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.
OK, thanks for the insight. I haven't figured out where things are going wrong. But a possibly related issue is that lately, when I open an org file for the first time, org-mode does not load automatically. If I close the file and reopen, org-mode loads as expected.
Best regards,
Asilata
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: mwe-data.org --]
[-- Type: text/x-org, Size: 94 bytes --]
* Fruits
** Apple
** Banana
** Cantaloupe
* Vegetables
** Asparagus
** Broccoli
** Cabbage
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: mwe-export.org --]
[-- Type: text/x-org, Size: 609 bytes --]
#+title: MWE for testing org-agenda-skip bug
#+author: Asilata Bapat
#+options: toc:nil
* Fruits and vegetables
#+begin_src emacs-lisp :results value drawer :exports results
(defun show-title ()
(let ((title (org-entry-get nil "ITEM")))
(format "- %s" title)))
(string-join
(org-map-entries
'show-title
"LEVEL=2"
'("mwe-data.org"))
"\n")
#+end_src
* Export script :noexport:
#+begin_src shell :results silent
emacs --batch --visit "mwe-export.org" --eval '(require (quote org))' --eval '(setq org-confirm-babel-evaluate nil)' --eval '(org-html-export-to-html)'
#+end_src
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 219 bytes --]
next prev parent reply other threads:[~2022-06-21 1:56 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
2022-06-21 1:42 ` Asilata Bapat [this message]
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=87pmj2hj51.fsf@gmail.com \
--to=asilata@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=yantar92@gmail.com \
/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).