Re: [Orgmode] Re: [Patch] Re: Bug? Inconsistency with org-publish-attachment
Aidan Gauland aidal...@no8wireless.co.nz writes: Sebastian Rose sebastian_rose at gmx.de writes: This here works for both --- here it does. Uh, not quite. Now what should be in techy/programs/ is in techy/programs/techy/programs/ (non-org files, that is). At least now all files are treated consistently. :P --Aidan Hi Aidan, did you revert the previous patch? The second patch was against master again. Here is how I tested it: I changed to a subdirectory of my :base-directory (here $BASE): $ cd ${BASE}/subdirectory $ cp ~/images/first.jpg .# a simple image $ ln -s ~/images/second.jpg # a link to an image $ ln -s ~/images/screenshots/# a link to a directory When exporting, I get this tree in :publishing-directory ($PUB): $PUB/ |-- subdirectory/ | |-- first.jpg | |-- second.jpg | `-- screenshots/ | |-- some.png | `-- other.png which is what you expected, is that right? Thanks for your patience! I think we really _should_ make symbolic links work. Sebastian ___ 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
[Orgmode] Re: [Patch] Re: Bug? Inconsistency with org-publish-attachment
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.) --Aidan ___ 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
Re: [Orgmode] Re: [Patch] Re: Bug? Inconsistency with org-publish-attachment
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
Re: [Orgmode] Re: [Patch] Re: Bug? Inconsistency with org-publish-attachment
Aidan, that patch was against current master of course. Sebastian ___ 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
[Orgmode] Re: [Patch] Re: Bug? Inconsistency with org-publish-attachment
Sebastian Rose sebastian_rose at gmx.de writes: This here works for both --- here it does. Uh, not quite. Now what should be in techy/programs/ is in techy/programs/techy/programs/ (non-org files, that is). At least now all files are treated consistently. :P --Aidan ___ 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