From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Voit Subject: Re: Fast linking to files in private git repos through a hyperlink Date: Thu, 19 Apr 2012 20:49:42 +0200 Message-ID: <2012-04-19T20-47-20@devnull.Karl-Voit.at> References: Reply-To: news1142@Karl-Voit.at Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55222) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKwQh-0005kH-Ep for emacs-orgmode@gnu.org; Thu, 19 Apr 2012 14:50:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SKwQe-0008FP-0O for emacs-orgmode@gnu.org; Thu, 19 Apr 2012 14:50:07 -0400 Received: from plane.gmane.org ([80.91.229.3]:42524) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKwQd-0008Ct-Pf for emacs-orgmode@gnu.org; Thu, 19 Apr 2012 14:50:03 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SKwQb-0005aA-Nf for emacs-orgmode@gnu.org; Thu, 19 Apr 2012 20:50:01 +0200 Received: from mail.michael-prokop.at ([88.198.6.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Apr 2012 20:50:01 +0200 Received: from news1142 by mail.michael-prokop.at with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Apr 2012 20:50:01 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org * Dov Grobgeld wrote: > > I thought I would share the following hack that I did with git. > > In my org-mode notebook I often find myself references files that reside in > various private git repos. So far I have referenced these either by just > writing their name or giving a full path. But giving the full path is > disruptive and if the repo moves it will no longer work. So I added a hack > to make the following hyperlink work git:myrepo::myfile . When opening it > the following happens: > > - myrepo is looked up in the emacs hash my-git-repos and mapped to the path > of a git repo root. > - git-find-file-in-repo searches for the the file myfile in the the repo > repo Cool hack! :-) You might be interested in looking at the git-module of Memacs[1]. It puts your commits into your Agenda if you want. And for this purpose it already holds a list of your local repositories. But this list is generated using shell scripts - Sorry no ELISP here. I do think both solutions could go well together ... 1. https://github.com/novoid/Memacs -- Karl Voit