[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Re: [Patch] Re: Bug? Inconsistency with org-publish-attach

From: Sebastian Rose
Subject: Re: [Orgmode] Re: [Patch] Re: Bug? Inconsistency with org-publish-attachment
Date: Fri, 17 Sep 2010 00:44:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Aidan Gauland <address@hidden> writes:
> Sebastian Rose <sebastian_rose <at> 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.

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))
          (or (plist-get project-plist :publishing-function)
-          (file-truename
+          (expand-file-name
            (or (plist-get project-plist :base-directory)
                (error "Project %s does not have :base-directory defined"
                       (car project))))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]