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 


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