emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Re: Excluding folders in org-publish with :exclude regexp. Not working. Fix?
@ 2012-01-31 21:19 Sankalp
  0 siblings, 0 replies; 2+ messages in thread
From: Sankalp @ 2012-01-31 21:19 UTC (permalink / raw)
  To: zannos; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 744 bytes --]

Hi,
This is in continuation with the message

http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00053.html

I'm facing the same issue. I want to exclude a particular file, and be able
to specify it by its path.

Say, for example, in the scenario presented below,

.
├── notes
│   └── file.tex
├── project1
│   └── file.tex
└── project2
    └── file.tex

I want to exclude notes/file.tex but publish the others. Using :exclude
"notes/file.tex" doesn't
work, whereas :exclude "file.tex" excludes all the files with that name.

Is this a feature that needs to be added, or is it a bug which I can fix
somehow? Any help would be
appreciated.

Sincerely,
-------
Sankalp

[-- Attachment #2: Type: text/html, Size: 1834 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Excluding folders in org-publish with :exclude regexp. Not working. Fix?
@ 2012-01-03 14:17 Iannis Zannos
  0 siblings, 0 replies; 2+ messages in thread
From: Iannis Zannos @ 2012-01-03 14:17 UTC (permalink / raw)
  To: emacs-orgmode




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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-31 21:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-31 21:19 Excluding folders in org-publish with :exclude regexp. Not working. Fix? Sankalp
  -- strict thread matches above, loose matches on Subject: below --
2012-01-03 14:17 Iannis Zannos

Code repositories for project(s) associated with this 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).