From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Bug on file publish Date: Mon, 27 Oct 2008 06:24:13 +0100 Message-ID: References: <98ECED6C-E9C1-48EA-B858-E580557834BF@uva.nl> <4904EAC1.40602@gmx.de> <4905036A.4000706@gmx.de> Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KuKaT-0001qH-70 for emacs-orgmode@gnu.org; Mon, 27 Oct 2008 01:24:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KuKaR-0001px-0N for emacs-orgmode@gnu.org; Mon, 27 Oct 2008 01:24:20 -0400 Received: from [199.232.76.173] (port=35057 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KuKaQ-0001pt-Qg for emacs-orgmode@gnu.org; Mon, 27 Oct 2008 01:24:18 -0400 Received: from nf-out-0910.google.com ([64.233.182.187]:40645) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KuKaQ-0001xT-Vx for emacs-orgmode@gnu.org; Mon, 27 Oct 2008 01:24:19 -0400 Received: by nf-out-0910.google.com with SMTP id c7so686854nfi.26 for ; Sun, 26 Oct 2008 22:24:16 -0700 (PDT) In-Reply-To: <4905036A.4000706@gmx.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: sebastian_rose@gmx.de Cc: org-mode 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