emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emacs-wiki-discuss] Re: File-specific notes page


From: Sacha Chua
Subject: [emacs-wiki-discuss] Re: File-specific notes page
Date: Thu, 30 Jun 2005 13:44:58 +0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

"Patricia J. Hawkins" <address@hidden> writes:

> Oh! So have links into the directory with comments? Now that would
> be nice!

Incidentally, you can already do this with Planner. You can create a
task based on a file (or directory, if in dired) and it will
automatically be linked. If you use Remember, you can easily create
notes. You just have to remember to file them away somewhere...

> Um.  Suppose dired let you add comments...?  And/or links?

Hmmm. The following code lets you open a file associated with the
current one in some kind of comments directory. It's just a plain text
file, no hyperlinks or anything, but that might be an interesting start.

(defvar patricia/file-comment-directory "~/.comments" "*Directory to place 
comment files in.")

(defun patricia/show-file-comments ()
  "Display the file comments in another buffer."
  (interactive)
  (when (buffer-file-name)
    (let ((backup-directory-alist (list (cons "." 
patricia/file-comment-directory))))
      (find-file-other-window (make-backup-file-name-1 (file-chase-links 
(buffer-file-name)))))))

(defun patricia/dired-show-file-comments ()
  "Display the file comments in another buffer."
  (interactive)
  (patricia/show-file-comments (dired-get-filename)))
 
-- 
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
sachac on irc.freenode.net#emacs . YM: sachachua83




reply via email to

[Prev in Thread] Current Thread [Next in Thread]