From: David Maus <dmaus@ictsoc.de>
To: Bastien <bzg@altern.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bugs and patches hunt before tomorrow
Date: Sat, 02 Jul 2011 16:49:08 +0200 [thread overview]
Message-ID: <87tyb4zqjf.wl%dmaus@ictsoc.de> (raw)
In-Reply-To: <87mxgwlqvw.fsf@altern.org>
[-- Attachment #1.1: Type: text/plain, Size: 267 bytes --]
At Sat, 02 Jul 2011 16:05:23 +0200,
Bastien wrote:
>
> Dear all,
>
> if there is important bugs and patches left, please resubmit
> them before tomorrow, as we will release 7.6 tomorrow.
And resubmit of this one:
http://article.gmane.org/gmane.emacs.orgmode/43235
[-- Attachment #1.2: 0001-Properly-handle-relative-symlinks-when-publishing.patch --]
[-- Type: text/plain, Size: 1715 bytes --]
From 6ad9f33ccb2d8702dd1d4375dd82998f72078e60 Mon Sep 17 00:00:00 2001
From: David Maus <dmaus@ictsoc.de>
Date: Sun, 26 Jun 2011 20:02:42 +0200
Subject: [PATCH] Properly handle relative symlinks when publishing
* org-publish.el (org-publish-cache-ctime-of-src): Properly handle
relative symlinks.
At Thu, 07 Apr 2011 01:11:00 -0400,
Nick Dokos wrote:
>
> org-publish-cache-ctime-of-src tries (but does not always succeed) to
> deal with symlinks: file-symlink-p returns the target as a string, but
> if the target is relative to the symlink, that's not going to fly.
> e.g. if c is a symlink like this
>
> /a/b/c->../d/f
>
> then (file-symlink-p "/a/b/c") -> "../d/f"
> but if the current directory is any place other than /a/b, the target
> will not be found, the file attributes are going to be nil and
> the function will blow up.
---
lisp/org-publish.el | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/lisp/org-publish.el b/lisp/org-publish.el
index 56cc80a..5646430 100644
--- a/lisp/org-publish.el
+++ b/lisp/org-publish.el
@@ -1157,9 +1157,12 @@ Returns value on success, else nil."
(defun org-publish-cache-ctime-of-src (filename)
"Get the FILENAME ctime as an integer."
- (let ((src-attr (file-attributes (if (stringp (file-symlink-p filename))
- (file-symlink-p filename)
- filename))))
+ (let* ((symlink-maybe (or (file-symlink-p filename) filename))
+ (src-attr (file-attributes (if (file-name-absolute-p symlink-maybe)
+ symlink-maybe
+ (expand-file-name
+ symlink-maybe
+ (file-name-directory filename))))))
(+
(lsh (car (nth 5 src-attr)) 16)
(cadr (nth 5 src-attr)))))
--
1.7.2.5
[-- Attachment #2: Type: application/pgp-signature, Size: 230 bytes --]
next prev parent reply other threads:[~2011-07-02 14:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-02 14:05 Bugs and patches hunt before tomorrow Bastien
2011-07-02 14:45 ` David Maus
2011-07-03 11:05 ` Bastien
2011-07-02 14:49 ` David Maus [this message]
2011-07-03 11:07 ` Bastien
2011-07-02 17:37 ` [PATCH 1/2] org-lparse/org-odt: Add docstring. Silence byte-compiler Jambunathan K
2011-07-03 10:36 ` [Accepted] [O, " Bastien Guerry
2011-07-02 17:39 ` [PATCH 2/2] doc/org.texi: Add a new node for OpenDocumentText exporter Jambunathan K
2011-07-02 18:34 ` Jambunathan K
2011-07-03 11:27 ` Bastien
2011-07-03 10:36 ` [Accepted] [O, " Bastien Guerry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tyb4zqjf.wl%dmaus@ictsoc.de \
--to=dmaus@ictsoc.de \
--cc=bzg@altern.org \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).