[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emacs-wiki-discuss] Re: planner-log-edit work-alike for psvn?
From: |
Jody Klymak |
Subject: |
[emacs-wiki-discuss] Re: planner-log-edit work-alike for psvn? |
Date: |
Tue, 01 Mar 2005 07:39:02 -0800 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (darwin) |
Hi Stefan,
Stefan Reichör <address@hidden> writes:
>> So after committing, you get something like this automagically
>> added to your plan page:
>>
>> .#2 Commit
>> Files: somefile.c
>>
>> Fix bug in some frob foo bar.
>>
>> For svn, it would be great to have the revision number in there too
>> :-)
I made some mods to planner-log-edit that make my entries that have
more complete links and the version number. I keep versions of just
about everything in RCS so just having the file name was not too
useful. I also wanted to version number and a cross-ref:
****
.#2 Commit [[/Volumes/DataE/ki95/twodbernoulli/AllModefits2Works.m]]
([[KnightInlet#note5][KnightInlet]])
1.1
Version where I fixed some bugs...
****
Cheers Jody
(require 'planner-log-edit);
(defvar jmk-vc-filename nil
"Variable to keep vc file name")
(defadvice vc-log-edit (before jmk activate)
"Schedule next task if there are no other unfinished tasks for this project."
(setq jmk-vc-filename file))
(defvar planner-log-edit-add-xref t
"If non-nil makes attaches the note to a plan page")
;; redefine log-edit-add-note.
;; What I really want it to do is to associate with a plan page.
(defun planner-log-edit-add-note ()
"Add a note describing the commit to the current planner page."
(let* ((buffer (current-buffer))
(files (log-edit-files))
; (plan-page (planner-read-name (planner-file-alist)))
;; This should be a function call into log-edit, but until it
;; exists ...
;; (module-name (when (fboundp 'cvs-get-module) (cvs-get-module))))
(module-name nil))
(if (if (functionp planner-log-edit-notice-commit-function)
(funcall planner-log-edit-notice-commit-function)
planner-log-edit-notice-commit-function)
(save-excursion
(save-window-excursion
(planner-create-note nil)
(insert "Commit [[")
(insert jmk-vc-filename)
(insert "]] ")
(insert (vc-workfile-version jmk-vc-filename))
;; (newline)
(when planner-log-edit-include-files-flag
(newline)(newline))
(insert-buffer-substring buffer)
(planner-narrow-to-note)
(if planner-log-edit-add-xref
(remember-planner-add-xref))
(narrow-to-page))))))