|Version 3 (modified by spookylukey, 5 years ago) (diff)|
Trac Wiki Page Editing Mode for Emacs
trac-wiki.el is a emacs lisp code to create/edit wiki pages via XML-RPC. It provides not only comfortable editing on emacs but also some original functions for editing like diff, merging, highlighting, completion.
- Multiple project access.
- Retrieve page from remote site and edit it with highlighting.
- Commit page with version check.
- Diff / Ediff between editing text and original.
- Revert local edit.
- Merge with most recent version if it is modified by other user.
- Show history of page (but not so informative).
- Preview page in emacs with w3m (textual).
- Preview page with external browser with CSS.
- Search words in trac site for all pages and view result.
- Completion for macro name and wiki page name in buffer.
Patch to add save-buffers-kill-emacs support to trac-wiki
The following patch prevents you from losing work when hitting C-x C-c, by telling trac-wiki mode to prompt you when emacs is killed. Just paste it into your trac-wiki.el at the end, right before the line with (provide 'trac-wiki) .
(defun trac-wiki-modified-buffers () "Return a list of all modified trac-wiki buffers." (let (trac-wiki-modified-buffer-list) (dolist (buf (buffer-list) trac-wiki-modified-buffer-list) (if (and (buffer-modified-p buf) (equal "TracWiki" (cdr (assq 'mode-name (buffer-local-variables buf))))) (setq trac-wiki-modified-buffer-list (cons buf trac-wiki-modified-buffer-list)))))) (defun trac-wiki-commit-all-modified-buffers () "Iterate over modified trac-wiki buffers and prompt to commit each one" (interactive) (dolist (buf (trac-wiki-modified-buffers)) (switch-to-buffer buf) (if (yes-or-no-p (format "Commit changes to buffer %s ? " (buffer-name buf))) (call-interactively 'trac-wiki-commit)) )) ;;Make save-buffers-kill-emacs run this function (add-hook 'kill-emacs-query-functions (lambda () (trac-wiki-commit-all-modified-buffers) t))