Monday, February 10, 2003

Patch for dme:blog.el to add post-find-hook

Here is a patch I sent to href="http://www.hollytree-house.co.uk/dme">David Edmondson to let
people customize the blog buffer the way they want it.



cd ~/
diff -c /home/marc/dme\:blog.el.orig /home/marc/dme\:blog.el
*** /home/marc/dme:blog.el.orig Mon Feb 10 14:39:09 2003
--- /home/marc/dme:blog.el Mon Feb 10 14:44:11 2003
***************
*** 32,44 ****
;; at:
;; http://www.hollytree-house.co.uk/dme/log/

;; Feedback encouraged !

(require 'easy-mmode)

;;; Customisation:

! (defvar dme:blog-destinations '(("~/var/blog" nil nil t))
"A alist of places where the blog entries should be published. Each
entry in the list has four elements:
dir - the directory,
--- 32,55 ----
;; at:
;; http://www.hollytree-house.co.uk/dme/log/

+ ;; Marc Nozell Mon Feb 10 14:44:04 2003
+ ;; Added dme:blog-post-find-hook so he could clean up the fixup the
+ ;; buffer after html-mode put in its stuff.
+ ;;
+ ;; Example:
+ ;; (add-hook 'dme:blog-post-find-hook '(lambda ()
+ ;; (erase-buffer)
+ ;; (goto-char (point-min))))
+
+
+
;; Feedback encouraged !

(require 'easy-mmode)

;;; Customisation:

! (defvar dme:blog-destinations '(("~/public_html/blog" nil nil t))
"A alist of places where the blog entries should be published. Each
entry in the list has four elements:
dir - the directory,
***************
*** 61,66 ****
--- 72,80 ----
(defvar dme:blog-pre-commit-hook nil
"Hook run just before a blog entry is committed.")

+ (defvar dme:blog-post-find-hook nil
+ "Hook run just after the blog entry is created.")
+
(defvar dme:blog-category nil
"The category of the current blog item. This is simply a directory
below the blog directory (see the Blosxom documentation for more
***************
*** 168,173 ****
--- 182,190 ----
(insert body)))))

(html-mode)
+ ; ready to start editing
+ (run-hooks 'dme:blog-post-find-hook)
+
(dme:blog-mode t))

(defun dme:blog-gnus-pretty-group (group)

Diff finished at Mon Feb 10 14:44:16