From: Rehan Iftikhar <rehan.iftikhar@gmail.com>
To: Leonard Avery Randall <leonard.a.randall@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Including headlines in export with specific tags AND no tags?
Date: Mon, 5 May 2014 06:51:29 -0700 [thread overview]
Message-ID: <CAJsxe3Ok7E5aUObTpSFP-8xAS6mrSjP=k-=F-ibR0D7nKre1iA@mail.gmail.com> (raw)
In-Reply-To: <5366B5F2.7050409@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2067 bytes --]
Hi Leonard
Thanks for the tip. I am exporting via Emacs's batch mode so I wrote a
short elisp function:
(defun org-export-non-greedy-select-tags (lst)
"Workaround to export a .org file with headlines that contain
tags in `lst` AND headlines that have no tags"
(let (all-buffer-tags)
(setq all-buffer-tags (apply #'append (org-get-buffer-tags)))
(dolist (tag lst)
(delete tag all-buffer-tags)
)
(setq org-export-exclude-tags all-buffer-tags)
)
)
On Sun, May 4, 2014 at 2:49 PM, Leonard Avery Randall <
leonard.a.randall@gmail.com> wrote:
> Hi Rehan,
>
> Rehan Iftikhar wrote:
>
>
> I'd like to export a .org file which includes all headlines without
> any tags AND headlines with selected tags. Headlines with tags which
> do not match the specified list are skipped.
>
>
>
> I am not sure exactly how to elegantly do what you wish to do, but
> if your tag list is not too extensive, you may be able to simply
> exclude all the tags you don't want. If you do not currently have a
> complete list of tags, you can get one by attempting to add a tag to
> headline by calling C-q and then pressing tab. That should give you
> a completions buffer with a list that includes all tags in the
> current .org file. Then just add all the tags you don't want to
> org-export exclude tags or to an #+EXCLUDE_TAGS line.
>
> It's not elegant but it should work.
>
> Hope this helps,
>
> All the best,
>
> Leonard
>
>
> Rehan Iftikhar <rehan.iftikhar@gmail.com>
> May 4, 2014 at 10:06 PM
> Hello
>
> I'd like to export a .org file which includes all headlines without any
> tags AND headlines with selected tags. Headlines with tags which do not
> match the specified list are skipped.
>
> My testing so far reveals that setting org-export-select-tags only selects
> headlines which strictly match the specified tag list. I have tried
> including nil, an empty string, and an empty string with a space in the
> specified tag list without any luck.
>
> Does anyone know if this is currently possible?
>
> Thanks,
> -Rehan
>
>
--
-Rehan
[-- Attachment #1.2: Type: text/html, Size: 5500 bytes --]
[-- Attachment #2: compose-unknown-contact.jpg --]
[-- Type: image/jpeg, Size: 770 bytes --]
prev parent reply other threads:[~2014-05-05 13:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-04 21:06 Including headlines in export with specific tags AND no tags? Rehan Iftikhar
2014-05-04 21:49 ` Leonard Avery Randall
2014-05-05 13:51 ` Rehan Iftikhar [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJsxe3Ok7E5aUObTpSFP-8xAS6mrSjP=k-=F-ibR0D7nKre1iA@mail.gmail.com' \
--to=rehan.iftikhar@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=leonard.a.randall@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.