* Bug? Inconsistency with org-publish-attachment @ 2010-09-15 2:15 Aidan Gauland 2010-09-15 16:04 ` Sebastian Rose 0 siblings, 1 reply; 22+ messages in thread From: Aidan Gauland @ 2010-09-15 2:15 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1.1: Type: text/plain, Size: 674 bytes --] I have a (sub)project for publishing a website. It uses org-publish-attachment with the recursive option. ("static" :base-directory "~/doc-aidan/windmill-hill/main/" :publishing-directory "~/doc-aidan/windmill-hill/published/" :publishing-function org-publish-attachment :recursive t :base-extension "css\\|gz\\|bz\\|lzma\\|jpg\\|gif\\|png") I have all the files scattered throughout the source directory's hierarchy. Their location is preserved when copied to the publishing directory /except/ for the images (I only have png images right now), which are just dumped in the root of the publishing directory. Is this a bug, or am I doing something wrong? --Aidan [-- Attachment #1.2: Digital signature --] [-- Type: application/pgp-signature, Size: 198 bytes --] [-- Attachment #2: Type: text/plain, Size: 201 bytes --] _______________________________________________ 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 ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Bug? Inconsistency with org-publish-attachment 2010-09-15 2:15 Bug? Inconsistency with org-publish-attachment Aidan Gauland @ 2010-09-15 16:04 ` Sebastian Rose 2010-09-15 19:26 ` Emacs version Sébastien Vauban 2010-09-15 20:23 ` Bug? Inconsistency with org-publish-attachment Aidan Gauland 0 siblings, 2 replies; 22+ messages in thread From: Sebastian Rose @ 2010-09-15 16:04 UTC (permalink / raw) To: emacs-orgmode Aidan Gauland <aidan@dimension8.tehua.net> writes: > I have a (sub)project for publishing a website. It uses > org-publish-attachment with the recursive option. > > ("static" > :base-directory "~/doc-aidan/windmill-hill/main/" > :publishing-directory "~/doc-aidan/windmill-hill/published/" > :publishing-function org-publish-attachment > :recursive t > :base-extension "css\\|gz\\|bz\\|lzma\\|jpg\\|gif\\|png") > > I have all the files scattered throughout the source directory's > hierarchy. Their location is preserved when copied to the publishing > directory /except/ for the images (I only have png images right now), > which are just dumped in the root of the publishing directory. > > Is this a bug, or am I doing something wrong? It would be a bug. But I cannot reproduce it (current Org mode from git, emacs24). Sebastian ^ permalink raw reply [flat|nested] 22+ messages in thread
* Emacs version 2010-09-15 16:04 ` Sebastian Rose @ 2010-09-15 19:26 ` Sébastien Vauban 2010-09-15 20:11 ` Henri-Paul Indiogine 2010-09-15 22:31 ` Sebastian Rose 2010-09-15 20:23 ` Bug? Inconsistency with org-publish-attachment Aidan Gauland 1 sibling, 2 replies; 22+ messages in thread From: Sébastien Vauban @ 2010-09-15 19:26 UTC (permalink / raw) To: emacs-orgmode-mXXj517/zsQ Hi Sebastian, Sebastian Rose wrote: > It would be a bug. > But I cannot reproduce it (current Org mode from git, emacs24). I see that many of you already have Emacs 24. Did you build it yourself from the sources, or is there a package (in my case, for Ubuntu) that allows to get everything installed seamlessly? Best regards, Seb -- Sébastien Vauban _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Emacs version 2010-09-15 19:26 ` Emacs version Sébastien Vauban @ 2010-09-15 20:11 ` Henri-Paul Indiogine 2010-09-15 20:57 ` A. Ryan Reynolds 2010-09-15 22:31 ` Sebastian Rose 1 sibling, 1 reply; 22+ messages in thread From: Henri-Paul Indiogine @ 2010-09-15 20:11 UTC (permalink / raw) To: emacs-org Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes: > I see that many of you already have Emacs 24. Did you build it yourself from > the sources, or is there a package (in my case, for Ubuntu) that allows to get > everything installed seamlessly? I have added the following to my /etc/apt/sources.list ## Emacs snapshot deb http://ppa.launchpad.net/portis25/emacs/ubuntu lucid main deb-src http://ppa.launchpad.net/portis25/emacs/ubuntu lucid main Best, HP -- Henri-Paul Indiogine Email: hindiogine@gmail.com Skype: hindiogine Website: http://people.cehd.tamu.edu/~sindiogine ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Emacs version 2010-09-15 20:11 ` Henri-Paul Indiogine @ 2010-09-15 20:57 ` A. Ryan Reynolds 2010-09-16 19:27 ` Gregor Zattler 0 siblings, 1 reply; 22+ messages in thread From: A. Ryan Reynolds @ 2010-09-15 20:57 UTC (permalink / raw) To: hindiogine; +Cc: emacs-org On Wed, Sep 15, 2010 at 3:11 PM, Henri-Paul Indiogine <hindiogine@gmail.com> wrote: > I have added the following to my /etc/apt/sources.list > > ## Emacs snapshot > deb http://ppa.launchpad.net/portis25/emacs/ubuntu lucid main > deb-src http://ppa.launchpad.net/portis25/emacs/ubuntu lucid main Is there a similar repository for Debian? -- A. Ryan Reynolds ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Emacs version 2010-09-15 20:57 ` A. Ryan Reynolds @ 2010-09-16 19:27 ` Gregor Zattler 0 siblings, 0 replies; 22+ messages in thread From: Gregor Zattler @ 2010-09-16 19:27 UTC (permalink / raw) To: emacs-orgmode Hi A., * A. Ryan Reynolds <a.ryan.reynolds@gmail.com> [15. Sep. 2010]: > On Wed, Sep 15, 2010 at 3:11 PM, Henri-Paul Indiogine > <hindiogine@gmail.com> wrote: >> I have added the following to my /etc/apt/sources.list >> >> ## Emacs snapshot >> deb http://ppa.launchpad.net/portis25/emacs/ubuntu lucid main >> deb-src http://ppa.launchpad.net/portis25/emacs/ubuntu lucid main > > Is there a similar repository for Debian? Yes: # emacs-snapshot for debian/sid deb http://emacs.orebokech.com sid main #deb-src http://emacs.orebokech.com sid main # emacs-snapshot for debian/lenny deb http://emacs.orebokech.com lenny main #deb-src http://emacs.orebokech.com lenny main Ciao, Gregor -- -... --- .-. . -.. ..--.. ...-.- ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Emacs version 2010-09-15 19:26 ` Emacs version Sébastien Vauban 2010-09-15 20:11 ` Henri-Paul Indiogine @ 2010-09-15 22:31 ` Sebastian Rose 2010-09-16 3:16 ` suvayu ali 1 sibling, 1 reply; 22+ messages in thread From: Sebastian Rose @ 2010-09-15 22:31 UTC (permalink / raw) To: Sébastien Vauban; +Cc: emacs-orgmode Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes: > Hi Sebastian, > > Sebastian Rose wrote: >> It would be a bug. >> But I cannot reproduce it (current Org mode from git, emacs24). > > I see that many of you already have Emacs 24. Did you build it yourself from > the sources, or is there a package (in my case, for Ubuntu) that allows to get > everything installed seamlessly? I build it from sources. I update about weekly. There are little bugs from time to time, but you could jump back to previous version if you use bzr or, highly recommended, git: http://repo.or.cz/w/emacs.git ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Emacs version 2010-09-15 22:31 ` Sebastian Rose @ 2010-09-16 3:16 ` suvayu ali 2010-09-16 8:11 ` Scot Becker 0 siblings, 1 reply; 22+ messages in thread From: suvayu ali @ 2010-09-16 3:16 UTC (permalink / raw) To: Sebastian Rose; +Cc: org-mode mailing list On 15 September 2010 15:31, Sebastian Rose <sebastian_rose@gmx.de> wrote: > highly recommended, git: > > http://repo.or.cz/w/emacs.git I wasn't aware of the git repo! thanks a lot. :) -- Suvayu Open source is the future. It sets us free. ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Emacs version 2010-09-16 3:16 ` suvayu ali @ 2010-09-16 8:11 ` Scot Becker 0 siblings, 0 replies; 22+ messages in thread From: Scot Becker @ 2010-09-16 8:11 UTC (permalink / raw) To: suvayu ali; +Cc: org-mode mailing list I also update from the git repo, about weekly and install to the new Emacs to the default location in /usr/local, that way (1) the development version loads by default, so long as /usr/local/bin is earlier in your path, and (2) you keep your default ubuntu Emacs packages intact, and can go back to them if you ever want to, by running /usr/bin/emacs Scot On Thu, Sep 16, 2010 at 4:16 AM, suvayu ali <fatkasuvayu+linux@gmail.com> wrote: > On 15 September 2010 15:31, Sebastian Rose <sebastian_rose@gmx.de> wrote: >> highly recommended, git: >> >> http://repo.or.cz/w/emacs.git > > I wasn't aware of the git repo! thanks a lot. :) > > -- > Suvayu > > Open source is the future. It sets us free. > > _______________________________________________ > 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 > ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Bug? Inconsistency with org-publish-attachment 2010-09-15 16:04 ` Sebastian Rose 2010-09-15 19:26 ` Emacs version Sébastien Vauban @ 2010-09-15 20:23 ` Aidan Gauland 2010-09-15 22:40 ` Sebastian Rose 1 sibling, 1 reply; 22+ messages in thread From: Aidan Gauland @ 2010-09-15 20:23 UTC (permalink / raw) To: emacs-orgmode Sebastian Rose <sebastian_rose <at> gmx.de> writes: > It would be a bug. > > But I cannot reproduce it (current Org mode from git, emacs24). I just figured out why: I store all my images in ~/images/ and just have symbolic links to them in my Org website directory. Can you reproduce it now that you have this piece of information? --Aidan ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: Bug? Inconsistency with org-publish-attachment 2010-09-15 20:23 ` Bug? Inconsistency with org-publish-attachment Aidan Gauland @ 2010-09-15 22:40 ` Sebastian Rose 2010-09-16 3:15 ` Aidan Gauland 0 siblings, 1 reply; 22+ messages in thread From: Sebastian Rose @ 2010-09-15 22:40 UTC (permalink / raw) To: Aidan Gauland; +Cc: emacs-orgmode Aidan Gauland <aidalgol@no8wireless.co.nz> writes: > Sebastian Rose <sebastian_rose <at> gmx.de> writes: >> It would be a bug. >> >> But I cannot reproduce it (current Org mode from git, emacs24). > > I just figured out why: I store all my images in ~/images/ and just > have symbolic links to them in my Org website directory. > > Can you reproduce it now that you have this piece of information? Ah, OK. That might be because of some call to (file-truename file...) or similar. `file-truename' removes symbolic links in filenames. Functions like this are called to make sure, the file is published only if needed (i.e. the file has changed since last export). I'm not sure currently if it's clever to remove such calls (see lisp/org-publish.el and search `file-truename'). Sebastian ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: Bug? Inconsistency with org-publish-attachment 2010-09-15 22:40 ` Sebastian Rose @ 2010-09-16 3:15 ` Aidan Gauland 2010-09-16 12:23 ` [Patch] " Sebastian Rose 0 siblings, 1 reply; 22+ messages in thread From: Aidan Gauland @ 2010-09-16 3:15 UTC (permalink / raw) To: Sebastian Rose; +Cc: emacs-orgmode [-- Attachment #1.1: Type: text/plain, Size: 1083 bytes --] On Thu, Sep 16, 2010 at 12:40:34AM +0200, Sebastian Rose wrote: > Aidan Gauland <aidalgol@no8wireless.co.nz> writes: > > Sebastian Rose <sebastian_rose <at> gmx.de> writes: > >> It would be a bug. > >> > >> But I cannot reproduce it (current Org mode from git, emacs24). > > > > I just figured out why: I store all my images in ~/images/ and just > > have symbolic links to them in my Org website directory. > > > > Can you reproduce it now that you have this piece of information? > > > Ah, OK. That might be because of some call to > > (file-truename file...) > > or similar. `file-truename' removes symbolic links in filenames. > > Functions like this are called to make sure, the file is published only > if needed (i.e. the file has changed since last export). > > I'm not sure currently if it's clever to remove such calls (see > lisp/org-publish.el and search `file-truename'). What if `file-truename' was used only to get the path of the actual file to copy, but the (relative) path of the link is used as the destination? --Aidan [-- Attachment #1.2: Digital signature --] [-- Type: application/pgp-signature, Size: 198 bytes --] [-- Attachment #2: Type: text/plain, Size: 201 bytes --] _______________________________________________ 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 ^ permalink raw reply [flat|nested] 22+ messages in thread
* [Patch] Re: Bug? Inconsistency with org-publish-attachment 2010-09-16 3:15 ` Aidan Gauland @ 2010-09-16 12:23 ` Sebastian Rose 2010-09-16 20:33 ` Aidan Gauland 0 siblings, 1 reply; 22+ messages in thread From: Sebastian Rose @ 2010-09-16 12:23 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1551 bytes --] Aidan Gauland <aidalgol@no8wireless.co.nz> writes: > On Thu, Sep 16, 2010 at 12:40:34AM +0200, Sebastian Rose wrote: >> Aidan Gauland <aidalgol@no8wireless.co.nz> writes: >> > Sebastian Rose <sebastian_rose <at> gmx.de> writes: >> >> It would be a bug. >> >> >> >> But I cannot reproduce it (current Org mode from git, emacs24). >> > >> > I just figured out why: I store all my images in ~/images/ and just >> > have symbolic links to them in my Org website directory. >> > >> > Can you reproduce it now that you have this piece of information? >> >> >> Ah, OK. That might be because of some call to >> >> (file-truename file...) >> >> or similar. `file-truename' removes symbolic links in filenames. >> >> Functions like this are called to make sure, the file is published only >> if needed (i.e. the file has changed since last export). >> >> I'm not sure currently if it's clever to remove such calls (see >> lisp/org-publish.el and search `file-truename'). > > What if `file-truename' was used only to get the path of the actual > file to copy, but the (relative) path of the link is used as the > destination? > > --Aidan Hi Aidan, `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? Best wishes, Sebastian [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: org-publish-correct-target-directory.patch --] [-- Type: text/x-diff, Size: 1028 bytes --] diff --git a/lisp/org-publish.el b/lisp/org-publish.el index de52410..f32aa94 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -578,13 +578,18 @@ See `org-publish-org-to' to the list of arguments." "Publish a file with no transformation of any kind. See `org-publish-org-to' to the list of arguments." ;; make sure eshell/cp code is loaded +(let* ((rel-dir + (file-relative-name + (file-name-directory filename) + (plist-get plist :base-directory))) + (pub-dir + (expand-file-name + (concat (file-name-as-directory pub-dir) rel-dir)))) (unless (file-directory-p pub-dir) (make-directory pub-dir t)) (or (equal (expand-file-name (file-name-directory filename)) (file-name-as-directory (expand-file-name pub-dir))) - (copy-file filename - (expand-file-name (file-name-nondirectory filename) pub-dir) - t))) + (copy-file filename pub-dir t)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Publishing files, sets of files, and indices [-- Attachment #3: Type: text/plain, Size: 201 bytes --] _______________________________________________ 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 ^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [Patch] Re: Bug? Inconsistency with org-publish-attachment 2010-09-16 12:23 ` [Patch] " Sebastian Rose @ 2010-09-16 20:33 ` Aidan Gauland 2010-09-16 22:44 ` Sebastian Rose 2010-09-16 22:45 ` Re: [Patch] Re: Bug? " Sebastian Rose 0 siblings, 2 replies; 22+ messages in thread From: Aidan Gauland @ 2010-09-16 20:33 UTC (permalink / raw) To: emacs-orgmode 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 ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: [Patch] Re: Bug? Inconsistency with org-publish-attachment 2010-09-16 20:33 ` Aidan Gauland @ 2010-09-16 22:44 ` Sebastian Rose 2010-09-17 1:09 ` Aidan Gauland 2010-09-16 22:45 ` Re: [Patch] Re: Bug? " Sebastian Rose 1 sibling, 1 reply; 22+ messages in thread From: Sebastian Rose @ 2010-09-16 22:44 UTC (permalink / raw) To: Aidan Gauland; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1042 bytes --] Aidan Gauland <aidalgol@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. [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: org-publish-correct-target-directory-2.patch --] [-- Type: text/x-diff, Size: 731 bytes --] 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)))))) [-- Attachment #3: Type: text/plain, Size: 201 bytes --] _______________________________________________ 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 ^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [Patch] Re: Bug? Inconsistency with org-publish-attachment 2010-09-16 22:44 ` Sebastian Rose @ 2010-09-17 1:09 ` Aidan Gauland 2010-09-17 9:16 ` Sebastian Rose 0 siblings, 1 reply; 22+ messages in thread From: Aidan Gauland @ 2010-09-17 1:09 UTC (permalink / raw) To: emacs-orgmode 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 ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: [Patch] Re: Bug? Inconsistency with org-publish-attachment 2010-09-17 1:09 ` Aidan Gauland @ 2010-09-17 9:16 ` Sebastian Rose 2010-09-17 20:21 ` [Patch] Bug: " Aidan Gauland 0 siblings, 1 reply; 22+ messages in thread From: Sebastian Rose @ 2010-09-17 9:16 UTC (permalink / raw) To: Aidan Gauland; +Cc: emacs-orgmode Aidan Gauland <aidalgol@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 ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Patch] Bug: Inconsistency with org-publish-attachment 2010-09-17 9:16 ` Sebastian Rose @ 2010-09-17 20:21 ` Aidan Gauland 2010-09-17 22:18 ` Sebastian Rose 0 siblings, 1 reply; 22+ messages in thread From: Aidan Gauland @ 2010-09-17 20:21 UTC (permalink / raw) To: emacs-orgmode Sebastian Rose <sebastian_rose <at> gmx.de> writes: > did you revert the previous patch? The second patch was against master > again. I ran git reset --hard then applied the second patch. > 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? Yes, that's what I expected. What I'm getting is a little different. $PUB/ `-- subdirectory/ |-- screenshots/ | `-- subdirectory/ | `-- screenshots/ | |-- other.png | `-- some.png `-- subdirectory/ |-- first.jpg |-- second.jpg This is how the project is defined... (setq org-publish-project-alist '(("static" :base-directory "~/org-bug/" :publishing-directory "~/org-bug-pub/" :publishing-function org-publish-attachment :recursive t :base-extension "css\\|gz\\|bz\\|lzma\\|jpg\\|gif\\|png"))) And published with this sexp. (org-publish "static") Perhaps the discrepancy between our setups is git commit (not sure if I'm using the right terms there)? git log shows 878d94b47225729bfffaca9c57a5bdeb344a8ffb at the top of its output. Thanks for your help! --Aidan ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: [Patch] Bug: Inconsistency with org-publish-attachment 2010-09-17 20:21 ` [Patch] Bug: " Aidan Gauland @ 2010-09-17 22:18 ` Sebastian Rose 2010-09-17 23:12 ` Aidan Gauland 0 siblings, 1 reply; 22+ messages in thread From: Sebastian Rose @ 2010-09-17 22:18 UTC (permalink / raw) To: Aidan Gauland; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1960 bytes --] Aidan Gauland <aidalgol@no8wireless.co.nz> writes: > Sebastian Rose <sebastian_rose <at> gmx.de> writes: >> did you revert the previous patch? The second patch was against master >> again. > > I ran git reset --hard then applied the second patch. > >> 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? > > Yes, that's what I expected. What I'm getting is a little different. > > $PUB/ > `-- subdirectory/ > |-- screenshots/ > | `-- subdirectory/ > | `-- screenshots/ > | |-- other.png > | `-- some.png > `-- subdirectory/ > |-- first.jpg > |-- second.jpg > > This is how the project is defined... > (setq > org-publish-project-alist > '(("static" > :base-directory "~/org-bug/" > :publishing-directory "~/org-bug-pub/" > :publishing-function org-publish-attachment > :recursive t > :base-extension "css\\|gz\\|bz\\|lzma\\|jpg\\|gif\\|png"))) > > And published with this sexp. > (org-publish "static") > > Perhaps the discrepancy between our setups is git commit (not sure if > I'm using the right terms there)? git log shows > 878d94b47225729bfffaca9c57a5bdeb344a8ffb at the top of its output. > > Thanks for your help! > --Aidan Ahrrgh :) I just pulled, because I couldn't find that commit. That commit already includes the (obviously wrong) first patch... Here's the patch that reverts the first attempt and applies the new one. Hope this works :) Sebastian [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: org-publish-correct-target-directory-3.patch --] [-- Type: text/x-diff, Size: 1632 bytes --] diff --git a/lisp/org-publish.el b/lisp/org-publish.el index 7534524..90b0339 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -578,18 +578,13 @@ See `org-publish-org-to' to the list of arguments." "Publish a file with no transformation of any kind. See `org-publish-org-to' to the list of arguments." ;; make sure eshell/cp code is loaded - (let* ((rel-dir - (file-relative-name - (file-name-directory filename) - (plist-get plist :base-directory))) - (pub-dir - (expand-file-name - (concat (file-name-as-directory pub-dir) rel-dir)))) (unless (file-directory-p pub-dir) (make-directory pub-dir t)) (or (equal (expand-file-name (file-name-directory filename)) (file-name-as-directory (expand-file-name pub-dir))) - (copy-file filename pub-dir t)))) + (copy-file filename + (expand-file-name (file-name-nondirectory filename) pub-dir) + t))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Publishing files, sets of files, and indices @@ -606,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)))))) [-- Attachment #3: Type: text/plain, Size: 201 bytes --] _______________________________________________ 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 ^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: Re: [Patch] Bug: Inconsistency with org-publish-attachment 2010-09-17 22:18 ` Sebastian Rose @ 2010-09-17 23:12 ` Aidan Gauland 2010-09-17 23:18 ` Sebastian Rose 0 siblings, 1 reply; 22+ messages in thread From: Aidan Gauland @ 2010-09-17 23:12 UTC (permalink / raw) To: Sebastian Rose; +Cc: emacs-orgmode [-- Attachment #1.1: Type: text/plain, Size: 326 bytes --] On Sat, Sep 18, 2010 at 12:18:42AM +0200, Sebastian Rose wrote: > That commit already includes the (obviously wrong) first patch... > > Here's the patch that reverts the first attempt and applies the new > one. Hope this works :) Yup, this one works! Bug squashed. Go ahead and commit it. Thanks again, Aidan [-- Attachment #1.2: Digital signature --] [-- Type: application/pgp-signature, Size: 198 bytes --] [-- Attachment #2: Type: text/plain, Size: 201 bytes --] _______________________________________________ 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 ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: [Patch] Bug: Inconsistency with org-publish-attachment 2010-09-17 23:12 ` Aidan Gauland @ 2010-09-17 23:18 ` Sebastian Rose 0 siblings, 0 replies; 22+ messages in thread From: Sebastian Rose @ 2010-09-17 23:18 UTC (permalink / raw) To: emacs-orgmode Aidan Gauland <aidalgol@no8wireless.co.nz> writes: > On Sat, Sep 18, 2010 at 12:18:42AM +0200, Sebastian Rose wrote: >> That commit already includes the (obviously wrong) first patch... >> >> Here's the patch that reverts the first attempt and applies the new >> one. Hope this works :) > > Yup, this one works! Bug squashed. Go ahead and commit it. > > Thanks again, > Aidan Yiiihaa! Thanks for testing! Best wishes Sebastian ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Re: [Patch] Re: Bug? Inconsistency with org-publish-attachment 2010-09-16 20:33 ` Aidan Gauland 2010-09-16 22:44 ` Sebastian Rose @ 2010-09-16 22:45 ` Sebastian Rose 1 sibling, 0 replies; 22+ messages in thread From: Sebastian Rose @ 2010-09-16 22:45 UTC (permalink / raw) To: Aidan Gauland; +Cc: emacs-orgmode Aidan, that patch was against current master of course. Sebastian ^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2010-09-17 23:18 UTC | newest] Thread overview: 22+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-09-15 2:15 Bug? Inconsistency with org-publish-attachment Aidan Gauland 2010-09-15 16:04 ` Sebastian Rose 2010-09-15 19:26 ` Emacs version Sébastien Vauban 2010-09-15 20:11 ` Henri-Paul Indiogine 2010-09-15 20:57 ` A. Ryan Reynolds 2010-09-16 19:27 ` Gregor Zattler 2010-09-15 22:31 ` Sebastian Rose 2010-09-16 3:16 ` suvayu ali 2010-09-16 8:11 ` Scot Becker 2010-09-15 20:23 ` Bug? Inconsistency with org-publish-attachment Aidan Gauland 2010-09-15 22:40 ` Sebastian Rose 2010-09-16 3:15 ` Aidan Gauland 2010-09-16 12:23 ` [Patch] " Sebastian Rose 2010-09-16 20:33 ` Aidan Gauland 2010-09-16 22:44 ` Sebastian Rose 2010-09-17 1:09 ` Aidan Gauland 2010-09-17 9:16 ` Sebastian Rose 2010-09-17 20:21 ` [Patch] Bug: " Aidan Gauland 2010-09-17 22:18 ` Sebastian Rose 2010-09-17 23:12 ` Aidan Gauland 2010-09-17 23:18 ` Sebastian Rose 2010-09-16 22:45 ` Re: [Patch] Re: Bug? " Sebastian Rose
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.