emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Iannis Zannos <zannos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Excluding folders in org-publish with :exclude regexp. Not working. Fix?
Date: Tue, 3 Jan 2012 16:17:15 +0200	[thread overview]
Message-ID: <6125CB61-75BB-41F1-BDBA-6BE3AAE89DC1@gmail.com> (raw)




Hello, 

I need to exclude some folders when publishing to html via an org-publish project definition. I create the project's alist as explained in the doc. 

For example, the beginning of my  org-publish-project-alist looks like this: 

 (("org" 
	:base-directory "/Users/iani/org/" 
	:publishing-directory "/Users/iani/org/html/" 
	:base-extension "org" 
	:exclude "config.org"
;; etc. 
 )
;; etc
)

The above project "org" excludes all files named config.org. 
HOWEVER: 
If I try to enter any directory path in the :exclude regexp, it does not work. I tried all sorts of combinations such as: 
-- The entire directory path: "/Users/iani/org/subproj1/"
-- Wildcard: /Users/iani/org/subproj1/*
-- Another wildcard: /Users/iani/org/subproj1/*.org
-- Even another wildcard:  ".*/config\\.org$" (just for testing, this should exclude all config.org files again. 

It seems that excluding directories, or including part of the path besides the filename itself in the exclude property does not work. 
I see a possibly related comment in function org-publish-get-base-files:

    (org-publish-get-base-files-1 base-dir recurse match
				  ;; FIXME distinguish exclude regexp
				  ;; for skip-file and skip-dir?
				  exclude-regexp exclude-regexp)

I also had a look at the relevant function definition: 
(defun org-publish-get-base-files-1 (...

But before spending some time trying to fix this I would like to ask if there is some other provision for excluding directories in org-publish which I am not aware of.

Many thanks in advance, 

Iannis Zannos

             reply	other threads:[~2012-01-03 14:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-03 14:17 Iannis Zannos [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-01-31 21:19 Excluding folders in org-publish with :exclude regexp. Not working. Fix? Sankalp

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=6125CB61-75BB-41F1-BDBA-6BE3AAE89DC1@gmail.com \
    --to=zannos@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).