emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Samuel Wales <samologist@gmail.com>
Cc: Daniel Radetsky <dradetsky@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: plain list noexport
Date: Sat, 16 Nov 2024 18:19:09 +0000	[thread overview]
Message-ID: <87zflzqbxe.fsf@localhost> (raw)
In-Reply-To: <CAJcAo8v-JCL6iPG2Kr=ZeJkK3crg4VXarQPjet+L9VGfnLwDtw@mail.gmail.com>

Samuel Wales <samologist@gmail.com> writes:

> i need to export a plain list with a noexport feature per item.
> the list is a timeline with some items having timestamps.
>
> one design idea was that i would specify this with [X] (checkbox
> checked).
>
> exported:
>   1) i left msg for A
>   2) [2024-11-09 Sat 13:22] i left msg for A
>   3) [ ] i left msg for A
>   4) [ ] [2024-11-09 Sat 13:22] i left msg for A
> not exported:
>   1) [X] i left msg for A
>   2) [X] [2024-11-09 Sat 13:15] i left msg for A
>
> so it could be used for only exporting not yet done items, or
> items that should be exported depending on audience.

(add-hook 'org-export-filter-parse-tree-functions #'yant/filter-checked-items)

(defun yant/filter-checked-items (data _backend info)
  "Remove items with checked checkbox from DATA."
  (org-element-map data 'item
    (lambda (item)
      (when (eq 'on (org-element-property :checkbox item))
	(org-element-extract-element item)))
    info)
  ;; return modified data					
  data)

-- 
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>


  reply	other threads:[~2024-11-16 18:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-25 23:23 Adding a class to the auto-inserted <br> elements Daniel Radetsky
2024-09-01 16:31 ` Ihor Radchenko
2024-09-01 22:23   ` Daniel Radetsky
2024-09-02  2:20     ` Suhail Singh
2024-09-09 17:13     ` [POLL] Mark all the tags in HTML export with unique class (was: Adding a class to the auto-inserted <br> elements) Ihor Radchenko
2024-11-09 14:31       ` Ihor Radchenko
2024-11-09 21:25         ` plain list noexport Samuel Wales
2024-11-16 18:19           ` Ihor Radchenko [this message]
2024-11-17  1:34             ` Samuel Wales
2024-09-09 17:16     ` Adding a class to the auto-inserted <br> elements Ihor Radchenko

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=87zflzqbxe.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=dradetsky@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=samologist@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).