From: David Maus <dmaus@ictsoc.de>
To: "Daniel E. Doherty" <ded-law@ddoherty.net>
Cc: reimar.finken@gmx.de, Org-mode List <emacs-orgmode@gnu.org>
Subject: Re: Error on store-link in Normal File
Date: Sat, 08 May 2010 16:23:38 +0200 [thread overview]
Message-ID: <878w7u79qt.wl%dmaus@ictsoc.de> (raw)
In-Reply-To: <87y6fvr91a.wl%ded-law@ddoherty.net>
[-- Attachment #1.1.1: Type: text/plain, Size: 626 bytes --]
Daniel E. Doherty wrote:
>All,
>In doing a C-c l in a normal .tex file, I get an error, similar to one I
>was getting earlier in dired. The dired error is fixed, but I just
>noticed today that I get a similar error when trying to store a link
>within an buffer for an open file.
Attached patch should fix that: The problem was that org-git-link
abbreviates the file name and searches for a .git directory not
considering that calling `file-name-directory' for the abbreviation of
the home directory ("~") returns nil.
HTH
-- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de
[-- Attachment #1.1.2: org-git-link-fix.diff --]
[-- Type: application/octet-stream, Size: 1056 bytes --]
diff --git a/contrib/lisp/org-git-link.el b/contrib/lisp/org-git-link.el
index 4596e41..195bf9b 100644
--- a/contrib/lisp/org-git-link.el
+++ b/contrib/lisp/org-git-link.el
@@ -96,7 +96,7 @@
(let* ((strlist (org-git-split-string str))
(filepath (first strlist))
(commit (second strlist))
- (dirlist (org-git-find-gitdir filepath))
+ (dirlist (org-git-find-gitdir (file-truename filepath)))
(gitdir (first dirlist))
(relpath (second dirlist)))
(org-git-open-file-internal gitdir (concat commit ":" relpath))))
@@ -168,7 +168,7 @@
(defun org-git-create-git-link (file)
"Create git link part to file at specific time"
(interactive "FFile: ")
- (let* ((gitdir (first (org-git-find-gitdir file)))
+ (let* ((gitdir (first (org-git-find-gitdir (file-truename file))))
(branchname (org-git-get-current-branch gitdir))
(timestring (format-time-string "%Y-%m-%d" (current-time))))
(org-make-link "git:" file "::" (org-git-create-searchstring branchname timestring))))
[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 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
prev parent reply other threads:[~2010-05-08 14:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-07 16:06 Error on store-link in Normal File Daniel E. Doherty
2010-05-08 10:42 ` Carsten Dominik
2010-05-08 14:23 ` David Maus [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878w7u79qt.wl%dmaus@ictsoc.de \
--to=dmaus@ictsoc.de \
--cc=ded-law@ddoherty.net \
--cc=emacs-orgmode@gnu.org \
--cc=reimar.finken@gmx.de \
/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 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.