Hi Sebastian,
thanks for all this analysis.
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?
Very good question. I don't think it would be good to exclude them
always, at least as "attachments" they would make sense, for example
for defining certain permissions in html directories which are, if I
remember correctly, stored in dotfiles.
I see two solutions:
- exclude files starting with ".#"
- do more explicit checking by resolving the link and looking at the
file pointed to.
The first one looks simple and perfectly effective to me. Also it
seems to me that, since these links seem to pop up as an indication
that the file is being modified, they should *never* be published! So
we should exclude these for sure.
However, dead soft links could be a problem in general. So we could
also check for
(file-exists-p (file-truename file))
Should I add both?
- Carsten
_______________________________________________
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