From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rick Moynihan" Subject: Re: custom link type for files in a git repo Date: Tue, 7 Oct 2008 03:01:30 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kn1tG-0005J7-3p for emacs-orgmode@gnu.org; Mon, 06 Oct 2008 22:01:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kn1tE-0005Ir-Ob for emacs-orgmode@gnu.org; Mon, 06 Oct 2008 22:01:33 -0400 Received: from [199.232.76.173] (port=47432 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kn1tE-0005In-Gg for emacs-orgmode@gnu.org; Mon, 06 Oct 2008 22:01:32 -0400 Received: from rn-out-0910.google.com ([64.233.170.187]:18090) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kn1tE-0001AP-D2 for emacs-orgmode@gnu.org; Mon, 06 Oct 2008 22:01:32 -0400 Received: by rn-out-0910.google.com with SMTP id k32so1166019rnd.7 for ; Mon, 06 Oct 2008 19:01:30 -0700 (PDT) In-Reply-To: Content-Disposition: inline List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Austin Frank Cc: emacs-orgmode@gnu.org 2008/10/6 Austin Frank : --- snip --- > > Now that org and git are starting to be used in conjunction by more and > more of us, would anyone else find it useful to have a custom link type > for linking to git objects? Absolutely!! git is my new favourite tool, and being able to combine org-mode and git in a usable workflow would be a great idea! > I could imagine that calling org-store-link on a file or directory that > is in a git repo could link to the current HEAD version, and we could > have access to all of the information from calling git-log on the file > (commit, author, date, message). Similarly, we'd want to be able to > link to arbitrary objects in the repo's history (tags, particular > commits, merge points, etc). This sounds like it'd be handy, as I've already found myself pasting git SHA's into org-mode! So having these (plus a path to a local repo) link to the specific commits would be awesome. More than this though I want integration with git commit messages! > I think most of this could be done via git.el that is distributed with > git. One cool application of this would be a git post-commit-hook that > called remember to create a link to the new commit in the relevant > project file. Yeah, this sounds like exactly what I'd want! :-) Ideally it'd also be branch aware. And I can imagine that having each commit as an outline with a tag of the branch name and a property drawer containing the SHA (as a link) would be enough for a start! It'd make sense to follow the git tradition of having the first line of the commit message default to the outline's title in org. > This would be a really neat way to keep a timeline for a > particular project's commits right alongside all of the other > information stored in org. I can also see it being really useful to > link to a particular version of a non-org file within some org notes. > That file might change, making it difficult to interpret some notes or > making specific line numbers irrelevant, but a link to the exact version > being discussed would make such notes future proof. This would probably be quite handy too, though I think getting commits into the agenda would be better :-) > I think I could probably get at least a skeleton of these kinds of > functions working myself, but I won't be able to get to it until the > winter holidays. If these ideas scratch the itches of another org user > who wants to code this up, I promise I'll a) use it b) praise your > awesomeness, and c) buy you a beer if we're ever in the same city. > > Thoughts? Other features that could go into this? > > Thanks, > /au > > > -- > Austin Frank > http://aufrank.net > GPG Public Key (D7398C2F): http://aufrank.net/personal.asc R.