* Including headlines in export with specific tags AND no tags?
@ 2014-05-04 21:06 Rehan Iftikhar
2014-05-04 21:49 ` Leonard Avery Randall
0 siblings, 1 reply; 3+ messages in thread
From: Rehan Iftikhar @ 2014-05-04 21:06 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 507 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 638 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Including headlines in export with specific tags AND no tags?
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
0 siblings, 1 reply; 3+ messages in thread
From: Leonard Avery Randall @ 2014-05-04 21:49 UTC (permalink / raw)
To: Rehan Iftikhar; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1441 bytes --]
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 <mailto: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
[-- Attachment #2.1: Type: text/html, Size: 4678 bytes --]
[-- Attachment #2.2: compose-unknown-contact.jpg --]
[-- Type: image/jpeg, Size: 770 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Including headlines in export with specific tags AND no tags?
2014-05-04 21:49 ` Leonard Avery Randall
@ 2014-05-05 13:51 ` Rehan Iftikhar
0 siblings, 0 replies; 3+ messages in thread
From: Rehan Iftikhar @ 2014-05-05 13:51 UTC (permalink / raw)
To: Leonard Avery Randall; +Cc: emacs-orgmode
[-- 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 --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-05 13:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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.