emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [BUG] bug in org-publish and a (wrong) patch


From: David Maus
Subject: Re: [O] [BUG] bug in org-publish and a (wrong) patch
Date: Sun, 26 Jun 2011 20:10:06 +0200
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.2 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

At Fri, 08 Apr 2011 12:58:06 -0400,
Nick Dokos wrote:
>
> Carsten Dominik <address@hidden> wrote:
>
> > Hi Nick,
> >
> > I have not looked closely, but maybe you can use
> >
> >
> > (expand-file-name  .... (file-name-directory filename))
> >
> > to fix this patch?  Not sure, I have not spent any time on it.
> >
>
> Almost but not quite: C-h v expand-file-name says
>
> ,----
> | (expand-file-name NAME &optional DEFAULT-DIRECTORY)
> |
> | Convert filename NAME to absolute, and canonicalize it.
> | Second arg DEFAULT-DIRECTORY is directory to start with if NAME is relative
> | (does not start with slash or tilde); if DEFAULT-DIRECTORY is nil or 
> missing,
> | the current buffer's value of `default-directory' is used.
> `----
>
> so you end up tacking it onto a completely unrelated directory (and my
> experiments confirm this).
>
> But there is a :base-directory for the project that could be obtained
> from the project-plist and passed to expand-file-name.  I think that
> would work but would require passing the project-plist down through a couple
> of layers to org-publish-cache-ctime-of-src. Alternatively, it (or just
> the base directory) could be bound dynamically in org-publish-file and
> used in the ctime function.
>
> What do you think would be preferable?

Took some time, but attached patch fixes the problem w/o the need for
passing down :base-directory at all. Simply expand-filename only if
the symlink is relative; luckily the filename passed to this fun
already is absolute.

@Bastien: Didn't push because I assume you already started the release
process for Org 7.6.

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... address@hidden
Email..... address@hidden

Attachment: 0001-Properly-handle-relative-symlinks-when-publishing.patch
Description: Text document

Attachment: pgpASHOD4cq9f.pgp
Description: PGP signature


reply via email to

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