Aidan Gauland <aidal...@no8wireless.co.nz> 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))
 	 (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))))))
_______________________________________________
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

Reply via email to