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: Thu, 26 Apr 2012 21:06:04 +0300 Message-ID: References: <87k41awr1m.fsf@altern.org> <87zk9yh9u9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8ff2563262dcb104be98d7f2 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:42678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNT53-0000X3-MN for emacs-orgmode@gnu.org; Thu, 26 Apr 2012 14:06:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SNT4y-0003ua-Dz for emacs-orgmode@gnu.org; Thu, 26 Apr 2012 14:06:13 -0400 In-Reply-To: <87zk9yh9u9.fsf@gnu.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 --e89a8ff2563262dcb104be98d7f2 Content-Type: text/plain; charset=UTF-8 Thanks for your suggestion Bastien, but unfortunately it does not directly map to the shortcut that I implemented in my package. In my *old* syntax: git:repo::file.txt file.txt is a search pattern for a *file* with in the symbolic repo "repo" which maps to a real repo through the hash variable my-org-repos. The whole idea was that I wanted to be able to use the symbolic name as a shortcut. In addition file.txt is not the path of a file in the repo, but a search pattern for a file in the repo. In case of duplicates the user is prompted to interactively resolve the file. In addition I would also like to add a search pattern for a string in the file. My problem is how to merge this syntax with the org-git-link.el which uses the syntax git:/home/user/repo/data/results.png::nobelprize where /home/.../results.png is the name of the path to a file and nobelprize is the name of a tag. Both my linking and the org-git-linking are two different equally valid use cases. My problem is how to merge both these use cases under a single syntax. Regards, Dov On Thu, Apr 26, 2012 at 17:00, Bastien wrote: > Hi Dov, > > Dov Grobgeld writes: > > > 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. > > The double colon is standard in Org for indicating the search pattern, > please use it this way too. > > > 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? > > git:[user@?][repo-server]:[git-repo-itself]::[search-pattern] > > When user is set, the repo-server URL won't have a protocol > (git will be used by default as a protocol.) > > When user is not set, the repo-server may contain git:// or > http:// as the protocol. > > But I didn't test your packing, so I'm maybe shooting in the > dark for this syntax suggestion. > > HTH, > > -- > Bastien > --e89a8ff2563262dcb104be98d7f2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks for your suggestion Bast= ien, but unfortunately it does not directly map to the shortcut that I impl= emented in my package. In my *old* syntax:

=C2=A0=C2=A0=C2=A0 git:re= po::file.txt

file.txt is a search pattern for a *file* with in the symbolic repo &qu= ot;repo" which maps to a real repo through the hash variable my-org-re= pos. The whole idea was that I wanted to be able to use the symbolic name a= s a shortcut. In addition file.txt is not the path of a file in the repo, b= ut a search pattern for a file in the repo. In case of duplicates the user = is prompted to interactively resolve the file. In addition I would also lik= e to add a search pattern for a string in the file.

My problem is how to merge this syntax with the org-git-link.el which u= ses the syntax
git:/home/user/repo/data/results.=
png::nobelprize
<= /span>
where /home/.../results.png is the name of the p= ath to a file and nobelprize is the name of a tag.

Both my linking a= nd the org-git-linking are two different equally valid use cases. My proble= m is how to merge both these use cases under a single syntax.

Regards,
Dov

On Thu, Apr 26, 2012 at 17:00, Bastien <bzg@gnu.org> wrote:
> Thanks for the link. I wasn't aware of tha= t 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.
The double colon is standard in Org for indicating the search pattern= ,
please use it this way too.

> Thus to join the packages I need to change the syntax. Which of the > following would make more sense:
>
> =C2=A0=C2=A0 git:@repo:file-in-repo::pattern-in-file
> =C2=A0=C2=A0 git://repo/file-in-repo::pattern-in-file
>
> or perhaps some other syntax? Suggestions?

git:[user@?][repo-server]:[git-repo-itself]::[search-pattern]

When user is set, the repo-server URL won't have a protocol
(git will be used by default as a protocol.)

When user is not set, the repo-server may contain git:// or
http:// as the protocol.

But I didn't test your packing, so I'm maybe shooting in the
dark for this syntax suggestion.

HTH,

--
=C2=A0Bastien

--e89a8ff2563262dcb104be98d7f2--