[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emacs-wiki-discuss] Re: vc and planner?
From: |
Sacha Chua |
Subject: |
[emacs-wiki-discuss] Re: vc and planner? |
Date: |
Sat, 13 Nov 2004 10:20:55 +0900 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) |
Jody Klymak <address@hidden> writes:
> One of the greatest advantages of planner for me is keeping track of
> where things are that I've done. To that end, I'd like to get the
> directory name in the file name and make it a wiki link.
Excellent idea! =)
> planner-annotation- does not work because by the time log-edit is
> called we have switched to the *VC-log* buffer. log-edit-files does
> not return the directory name, and I'm ashamed to say that I do not
> know how to return the current directory in elisp. Even worse,
> *VC-log* has buffer-file-name nil.
I'd suggest advising the function that brings up the *VC-log* buffer
so that it does something useful like storing the current directory
directory in a variable before opening the log.
Ah, here's how it can work:
- Whenever you call log-edit, notice the filename and store it in some
variable. This will probably be a list.
- After you commit, iterate over the list, getting vc-workfile-version
for each file and coming up with the links you want to use in your
planner note.
You may be able to get it to produce a note like this:
.#2 Commit planner-config.el 1.2, emacs-wiki-config.el 1.5
* annotation
* annotation
* annotation
where the source text is
.#2 Commit
[[/Users/jklymak/emacs-common/planner/planner-config.el][planner-config.el]]
1.2, [[/Users/jklymak/emacs-common/planner/][emacs-wiki-config.el]] 1.5
* annotation
* annotation
* annotation
> And even slicker would be the ability to associate the note with a
> plan page, rather than just the daily pager.
Feel free to steal ideas from remember-planner.el. There's a
remember-planner-add-xref there.
I'll add planner-copy-note to my TODO, but probably won't be able to work on
it this weekend.
(defun planner-copy-note (page &optional xref)
"Copy the current note to PAGE.
Link both notes to each other. If XREF is non-nil, replace the original
note body with a link to the note on PAGE."
(interactive (list (planner-read-non-date-page (planner-file-alist))
current-prefix))
;; Some magic goes here.
;; planner-narrow-to-note might be useful.
;; planner-update-note from planner-experimental
)
Come to think of it, perhaps planner-update-note should just be extended so that
it creates the note if necessary, and allows the transformation of the current
note into a cross-reference if you feel like it.
--
Sacha Chua <address@hidden> - open source geekette
http://sacha.free.net.ph/ - PGP Key ID: 0xE7FDF77C
interests: emacs, gnu/linux, personal information management, CS ed
applying as a Debian new maintainer | looking for a grad school