Hi Sebastian and Richard, I just pushed what I think fixes this bug, please verify. Thanks. - Carsten On Oct 27, 2008, at 12:55 AM, Sebastian Rose wrote: > Hi, > > > I tried to use (file-locked-p f) in org-publish-base-files-1, > but I couldn't get it to work. > > (file-locked-p "~/notes/index.org") ;; => t if "~/notes/.#index.org" > exists. > > .#index.org is only there, if I change the file without saving it. > It's > removed, if I save the buffer. > > > > > A working quick fix: > > Instead of > (not (string-match "^\\.+$" fnd)) > use > (not (string-match "^\\.+" fnd)) > > in org-publish-base-files-1 > > Drawbacks: > - we can't export hidden files anymore. > Or is that a feature? > > > > It might be better to look for locked project files, or those still > opened in emacs, and ask the user to save those files before > publishing > them. Unsaved changes in a buffer are not published before saving them > anyway. So a warning would be usefull anyway. A user might be > surprised > if unsaved changes are not published, as unsaved changes are exported. > > > > > Anyway - here's the little patch: > > > diff --git a/lisp/org-publish.el b/lisp/org-publish.el > index 2af71d3..46fd055 100644 > --- a/lisp/org-publish.el > +++ b/lisp/org-publish.el > @@ -430,7 +430,7 @@ matching the regexp SKIP-DIR when recursiing > through BASE-DIR." > (let ((fd-p (car (file-attributes f))) > (fnd (file-name-nondirectory f))) > (if (and fd-p recurse > - (not (string-match "^\\.+$" fnd)) > + (not (string-match "^\\.+" fnd)) > (if skip-dir (not (string-match skip-dir fnd)) t)) > (org-publish-get-base-files-1 f recurse match skip- > file skip-dir) > (unless (or fd-p ;; this is a directory > > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode