[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emacs-wiki-discuss] new log-edit code...
From: |
Jody Klymak |
Subject: |
[emacs-wiki-discuss] new log-edit code... |
Date: |
Tue, 21 Dec 2004 14:23:43 -0800 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (darwin) |
Hi All,
as mentioned in an older post, I wanted some more annotation for the
planner-log-edit functionality. The following code creates entries of
the type:
> .#2 Commit [[/Users/jklymak/doc/newvita/newvita.tex]] 1.2 ([[JobNotes#1]])
>
> Added Log info
where is has been cross-referenced with a plan page on the daily page
if planner-log-edit-add-xref is t. Note that I do not use any of the
module-name logic because I just use RCS on individual files. I'm
sure someone clever can fix this to work with CVS in the proper way
and make part of the distributed planner-log-edit.el.
Thanks, 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))))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [emacs-wiki-discuss] new log-edit code...,
Jody Klymak <=