emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org and git blame integration?
@ 2009-12-03  0:13 Jason Dunsmore
  2009-12-03  8:17 ` Martin Pohlack
  2009-12-08  0:20 ` Samuel Wales
  0 siblings, 2 replies; 3+ messages in thread
From: Jason Dunsmore @ 2009-12-03  0:13 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

I used to use state change logging (configured with "!" in
org-todo-keywords), but I didn't like the way it cluttered my org files
and I rarely referred to the logged times.

As an alternative, I found the git-blame utility to be useful for
finding out stuck projects and tasks in my Org files.  For example, the
following command will sort each line in an org file by the date it was
committed:

git blame todo.org|cut -c29-|cut -c 20-25 --complement|sort -n|less -S

I made a couple of bash functions based on this:

function org_history () {
    git blame $1|cut -c29-|cut -c 20-25 --complement|sort -n|less -S
}

# Limit the output to Org headlines
function org_history_headings () {
    git blame $1|grep ') \*'|cut -c29-|cut -c 20-25 --complement|sort -n|less -S
}

But I still have to go back and forth between the git-blame output and
Org.

It'd be nice if I could view and edit the git-blame output in org-mode,
group the sort by a certain level heading, cycle body visibility, etc...
I'm not sure how difficult that would be to implement.  Does this sound
like a reasonable feature request?

Regards,
Jason

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

* Re: Org and git blame integration?
  2009-12-03  0:13 Org and git blame integration? Jason Dunsmore
@ 2009-12-03  8:17 ` Martin Pohlack
  2009-12-08  0:20 ` Samuel Wales
  1 sibling, 0 replies; 3+ messages in thread
From: Martin Pohlack @ 2009-12-03  8:17 UTC (permalink / raw)
  To: Jason Dunsmore; +Cc: emacs-orgmode

Hi Jason,

Jason Dunsmore wrote:
[...]

> git blame todo.org|cut -c29-|cut -c 20-25 --complement|sort -n|less -S
> 
> I made a couple of bash functions based on this:
> 
> function org_history () {
>     git blame $1|cut -c29-|cut -c 20-25 --complement|sort -n|less -S
> }
> 
> # Limit the output to Org headlines
> function org_history_headings () {
>     git blame $1|grep ') \*'|cut -c29-|cut -c 20-25 --complement|sort -n|less -S
> }
> 
> But I still have to go back and forth between the git-blame output and
> Org.
> 
> It'd be nice if I could view and edit the git-blame output in org-mode,
> group the sort by a certain level heading, cycle body visibility, etc...
> I'm not sure how difficult that would be to implement.  Does this sound
> like a reasonable feature request?

I'm not sure how git blame would help with finding stuck projects, but
if you tweak the output to be similar to this:

  <file>:<line>: message/string

or

  <file>:<line>:<col>: message/string

You could call the script from a compile buffer (M-x compile).  In this
buffer, this kind of output is linked back to the original files and you
could iterated over the found lines.

Cheers,
Martin Pohlack

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

* Re: Org and git blame integration?
  2009-12-03  0:13 Org and git blame integration? Jason Dunsmore
  2009-12-03  8:17 ` Martin Pohlack
@ 2009-12-08  0:20 ` Samuel Wales
  1 sibling, 0 replies; 3+ messages in thread
From: Samuel Wales @ 2009-12-08  0:20 UTC (permalink / raw)
  To: Jason Dunsmore; +Cc: emacs-orgmode

Some type of git integration here would be nice.  I like the idea of
eliminating most todo state changes, because then there isn't an issue
with ellipses on empty headilnes..  I.e.  no need to cycle to see if a
headline is empty because it only contains a logbook drawer.

Of course, you will still need semi-manual interaction to track a
headline that changes and has a todo state change in the same commit.

On 2009-12-02, Jason Dunsmore <jason.public@gmail.com> wrote:
> Hi,
>
> I used to use state change logging (configured with "!" in
> org-todo-keywords), but I didn't like the way it cluttered my org files
> and I rarely referred to the logged times.
>
> As an alternative, I found the git-blame utility to be useful for
> finding out stuck projects and tasks in my Org files.  For example, the
> following command will sort each line in an org file by the date it was
> committed:
>
> git blame todo.org|cut -c29-|cut -c 20-25 --complement|sort -n|less -S
>
> I made a couple of bash functions based on this:
>
> function org_history () {
>     git blame $1|cut -c29-|cut -c 20-25 --complement|sort -n|less -S
> }
>
> # Limit the output to Org headlines
> function org_history_headings () {
>     git blame $1|grep ') \*'|cut -c29-|cut -c 20-25 --complement|sort
> -n|less -S
> }
>
> But I still have to go back and forth between the git-blame output and
> Org.
>
> It'd be nice if I could view and edit the git-blame output in org-mode,
> group the sort by a certain level heading, cycle body visibility, etc...
> I'm not sure how difficult that would be to implement.  Does this sound
> like a reasonable feature request?
>
> Regards,
> Jason
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>


-- 
Q: How many CDC "scientists" does it take to change a lightbulb?
A: You only think it's dark. [CDC has denied ME/CFS for 25 years]
=================================================================
Retrovirus: http://www.wpinstitute.org/xmrv/xmrv_qa.html

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

end of thread, other threads:[~2009-12-08  0:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-03  0:13 Org and git blame integration? Jason Dunsmore
2009-12-03  8:17 ` Martin Pohlack
2009-12-08  0:20 ` Samuel Wales

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