From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dov Grobgeld Subject: Re: Fast linking to files in private git repos through a hyperlink Date: Sun, 22 Apr 2012 00:19:10 +0300 Message-ID: References: <87k41awr1m.fsf@altern.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8fb1fd92b7d4fa04be36f4d6 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:47551) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLhi9-0005wW-Fc for emacs-orgmode@gnu.org; Sat, 21 Apr 2012 17:19:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SLhi4-0005wk-Ud for emacs-orgmode@gnu.org; Sat, 21 Apr 2012 17:19:17 -0400 Received: from mail-ob0-f169.google.com ([209.85.214.169]:32942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLhi4-0005wd-Mw for emacs-orgmode@gnu.org; Sat, 21 Apr 2012 17:19:12 -0400 Received: by obbeh20 with SMTP id eh20so10735606obb.0 for ; Sat, 21 Apr 2012 14:19:10 -0700 (PDT) In-Reply-To: <87k41awr1m.fsf@altern.org> 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: Bastien Cc: emacs-orgmode --e89a8fb1fd92b7d4fa04be36f4d6 Content-Type: text/plain; charset=UTF-8 Thanks for the link. I wasn't aware of that package. I see that I have a conflict in syntax as I used double colon for indicating the git repo while org-git-link.el used double colon for search pattern. Thus to join the packages I need to change the syntax. Which of the following would make more sense: git:@repo:file-in-repo::pattern-in-file git://repo/file-in-repo::pattern-in-file or perhaps some other syntax? Suggestions? Regards, Dov On Fri, Apr 20, 2012 at 15:01, Bastien wrote: > Hi Dov, > > Dov Grobgeld writes: > > > 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 > > > > Here's the code for org-git-hyperlink.el: > > Nice. > > Can you try to merge these features with contrib/lisp/org-git-link.el > from the current repo? > > Thanks! > > -- > Bastien > --e89a8fb1fd92b7d4fa04be36f4d6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks for the link. I wasn'= ;t aware of that package. I see that I have a conflict in syntax as I used = double colon for indicating the git repo while org-git-link.el used double = colon for search pattern. Thus to join the packages I need to change the sy= ntax. Which of the following would make more sense:

=C2=A0=C2=A0 git:@repo:file-in-repo::pattern-in-file
=C2=A0=C2=A0 gi= t://repo/file-in-repo::pattern-in-file

or perhaps some other syntax?= Suggestions?

Regards,
Dov

On F= ri, Apr 20, 2012 at 15:01, Bastien <bzg@altern.org> wrote:
Hi Dov,

Dov Grobgeld <dov.grobgeld@gma= il.com> writes:

> 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
>
> Here's the code for org-git-hyperlink.el:

Nice.

Can you try to merge these features with contrib/lisp/org-git-link.el
from the current repo?

Thanks!

--
=C2=A0Bastien

--e89a8fb1fd92b7d4fa04be36f4d6--