emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* custom link type for files in a git repo
@ 2008-10-06  4:38 Austin Frank
  2008-10-07  2:01 ` Rick Moynihan
  0 siblings, 1 reply; 4+ messages in thread
From: Austin Frank @ 2008-10-06  4:38 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1977 bytes --]

Hey org-folk--

I originally included this in my questions to John and Carsten about the
new attach system, but decided it deserved its own thread.  Apologies if
this seems like too much git-spam.

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?

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).

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.  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.

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

[-- Attachment #1.2: Type: application/pgp-signature, Size: 193 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: custom link type for files in a git repo
  2008-10-06  4:38 custom link type for files in a git repo Austin Frank
@ 2008-10-07  2:01 ` Rick Moynihan
  2008-10-07  7:20   ` Ian Barton
  0 siblings, 1 reply; 4+ messages in thread
From: Rick Moynihan @ 2008-10-07  2:01 UTC (permalink / raw)
  To: Austin Frank; +Cc: emacs-orgmode

2008/10/6 Austin Frank <austin.frank@gmail.com>:
--- 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: custom link type for files in a git repo
  2008-10-07  2:01 ` Rick Moynihan
@ 2008-10-07  7:20   ` Ian Barton
  2008-10-07 10:55     ` Jason F. McBrayer
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Barton @ 2008-10-07  7:20 UTC (permalink / raw)
  To: Rick Moynihan; +Cc: emacs-orgmode


>> 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!
> 
Without wishing to start a VCS war, it would be nice if any org 
interface was as tool agnostic as possible. I use bzr, mainly because I 
use Ubuntu and it's what Canonical use. I am sure there are other people 
who use Hg, etc.

Ian.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: custom link type for files in a git repo
  2008-10-07  7:20   ` Ian Barton
@ 2008-10-07 10:55     ` Jason F. McBrayer
  0 siblings, 0 replies; 4+ messages in thread
From: Jason F. McBrayer @ 2008-10-07 10:55 UTC (permalink / raw)
  To: emacs-orgmode

Ian Barton <lists@manor-farm.org> writes:

>>> 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!
>>
> Without wishing to start a VCS war, it would be nice if any org
> interface was as tool agnostic as possible. I use bzr, mainly because
> I use Ubuntu and it's what Canonical use. I am sure there are other
> people who use Hg, etc.

Since emacs already abstracts basic VCS functionality through its vc
interface, it would be nice if any org-vcs integration would use that.
I use three vc systems on a regular basis (svn at work, hg for my own
projects, and git for other peoples' projects that I track).

-- 
+-----------------------------------------------------------+
| Jason F. McBrayer                    jmcbray@carcosa.net  |
| If someone conquers a thousand times a thousand others in |
| battle, and someone else conquers himself, the latter one |
| is the greatest of all conquerors.  --- The Dhammapada    |

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-10-07 10:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-06  4:38 custom link type for files in a git repo Austin Frank
2008-10-07  2:01 ` Rick Moynihan
2008-10-07  7:20   ` Ian Barton
2008-10-07 10:55     ` Jason F. McBrayer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).