emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: sebastian_rose@gmx.de
Cc: org-mode <emacs-orgmode@gnu.org>
Subject: Re: Bug on file publish
Date: Mon, 27 Oct 2008 06:24:13 +0100	[thread overview]
Message-ID: <D9A27E78-BC98-4243-AF5A-E1FE60F69D84@gmail.com> (raw)
In-Reply-To: <4905036A.4000706@gmx.de>

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

  reply	other threads:[~2008-10-27  5:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-25  0:09 Bug on file publish Richard Riley
2008-10-26  6:42 ` Carsten Dominik
2008-10-26 21:56   ` Sebastian Rose
2008-10-26 22:10   ` Sebastian Rose
2008-10-26 23:55     ` Sebastian Rose
2008-10-27  5:24       ` Carsten Dominik [this message]
2008-10-27  7:22       ` Carsten Dominik

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=D9A27E78-BC98-4243-AF5A-E1FE60F69D84@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=sebastian_rose@gmx.de \
    /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).