(add-to-list 'load-path "/usr/share/emacs/site-lisp/xtla") (add-to-list 'load-path "/usr/src/emacs-stuff/xtla") ;(load "/usr/src/emacs-stuff/pcmpl-tla/pcmpl-tla.el") (require 'xtla) (tla-insinuate-gnus) (setq tla-apply-patch-mapping '(((nil "planner" nil nil nil) "~/notebook/emacs/dev/planner/"))) (defun tla-gnus-article-extract-log-message () "Parse the mail and extract the log information. Save it to `tla-memorized-log-header', `tla-memorized-log-message' and `tla-memorized-version'." (interactive) (gnus-summary-select-article-buffer) (save-excursion (goto-char (point-min)) (let* ((start-pos (or (search-forward "[PATCH] " nil t) (search-forward "Subject: "))) (end-pos (line-end-position)) (log-header (buffer-substring-no-properties start-pos end-pos))) (setq tla-memorized-log-header log-header)) (goto-char (point-min)) (let* ((start-pos (search-forward "[VERSION] " nil t)) (end-pos (line-end-position)) (version (when start-pos (buffer-substring-no-properties start-pos end-pos)))) (setq tla-memorized-version (and start-pos version))) (goto-char (point-min)) (let* ((start-pos (+ (search-forward "<>") 1)) (end-pos (- (progn (search-forward ">") (line-beginning-position)) 1)) (log-message (buffer-substring-no-properties start-pos end-pos))) (setq tla-memorized-log-message log-message) (message "Extracted the tla log message from '%s'" tla-memorized-log-header))) (gnus-article-show-summary))