From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: Re: [Patch] Re: Bug? Inconsistency with org-publish-attachment Date: Fri, 17 Sep 2010 00:44:12 +0200 Message-ID: <878w31qpfn.fsf@gmx.de> References: <20100915021535.GA19762@dimension8.tehua.net> <87tylrgfin.fsf@gmx.de> <87eicuhbq5.fsf@gmx.de> <20100916031504.GA5117@dimension8.tehua.net> <87d3sdswqe.fsf_-_@gmx.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from [140.186.70.92] (port=46998 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OwNBq-0005h6-Bx for emacs-orgmode@gnu.org; Thu, 16 Sep 2010 18:44:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OwNBn-0002S5-PQ for emacs-orgmode@gnu.org; Thu, 16 Sep 2010 18:44:26 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:33023 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OwNBn-0002Rx-DG for emacs-orgmode@gnu.org; Thu, 16 Sep 2010 18:44:23 -0400 In-Reply-To: (Aidan Gauland's message of "Thu, 16 Sep 2010 20:33:18 +0000 (UTC)") 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: Aidan Gauland Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Aidan Gauland writes: > Sebastian Rose gmx.de> writes: >> `org-publish-attachment' is wrong or called with wrong arguments. >> >> This patch fixes it. >> >> As always, there might be a better way to fix it, >> but this way the function `org-publish-attachment' will work regardless >> of parameters. Someone will always call this function with the wrong >> `PUB-DIR' parameter... >> >> Aidan, would like to apply the patch and verify it works for you? > > That fixes the problem, but introduces/reveals another: > > All symlinks in artsy/photography/images/ are dereferenced and copied > to published/artsy/photography/images/, but all regular files in > artsy/photography/images/ are copied to > published/artsy/photography/images/artsy/photography/images/. > > So the patch works only if there are only symlinks. (Not sure about > only regular files. It may have broken something.) Arrrgh, yes... So my first guess was the better one. This here works for both --- here it does. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=org-publish-correct-target-directory-2.patch diff --git a/lisp/org-publish.el b/lisp/org-publish.el index de52410..90b0339 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -601,13 +601,13 @@ See `org-publish-projects'." (error "File %s not part of any known project" (abbreviate-file-name filename))))) (project-plist (cdr project)) - (ftname (file-truename filename)) + (ftname (expand-file-name filename)) (publishing-function (or (plist-get project-plist :publishing-function) 'org-publish-org-to-html)) (base-dir (file-name-as-directory - (file-truename + (expand-file-name (or (plist-get project-plist :base-directory) (error "Project %s does not have :base-directory defined" (car project)))))) --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--