;ELC ;;; Compiled by mwolson@grepfind.mwolson.org on Thu Jan 24 00:15:32 2008 ;;; from file /stuff/proj/emacs/dvc/mwolson/lisp/xgit-gnus.el ;;; in Emacs version 23.0.50.2 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`xgit-gnus.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #@222 Integrate Xgit into Gnus. The following keybindings are installed for gnus-summary: K t s `xgit-gnus-article-view-status-for-apply-patch' K t v `xgit-gnus-article-view-patch' The following keybindings are ignored: K t l (defalias 'xgit-insinuate-gnus #[nil "\301 \210\302\303\304#\210\302\305\306#\210\302\307\310#\207" [gnus-summary-dvc-submap dvc-gnus-initialize-keymap define-key [115] xgit-gnus-article-view-status-for-apply-patch [118] xgit-gnus-article-view-patch [108] ignore] 4 (#$ . 597) nil]) #@270 *Working directories in which patches should be applied. An alist of rules to map a regexp matching an email address to a working directory. This is used by the `xgit-gnus-apply-patch' function. Example setting: '((".*erc-discuss@gnu.org" "~/proj/emacs/erc/master")) (custom-declare-variable 'xgit-apply-patch-mapping 'nil '(#$ . -1111) :type '(repeat (list :tag "Rule" (string :tag "Email address regexp") (string :tag "Working directory"))) :group 'dvc-xgit) (byte-code "\301B\302\301!\204\303\301\304\"\210\304\207" [current-load-list xgit-gnus-patch-from-user default-boundp set-default nil] 3) #@253 Apply the current article as a git patch. N is the mime part given to us by DVC. If N is negative, then force applying of the patch by doing a 3-way merge. We ignore the use of N as a mime part, since git can extract patches from the entire message. (defalias 'xgit-gnus-article-apply-patch #[(n) "\302 \247\203 \303W\203\304\305!)\207" [force n nil 0 t xgit-gnus-apply-patch] 2 (#$ . 1723) "p"]) #@71 Apply a git patch via gnus. HANDLE should be the handle of the part. (defalias 'xgit-gnus-apply-patch #[(force) "\306\307!\310P\311 \312\211\211\313\314!\210\315 \210\212\312  \316\f!\210*eb\210\317\320\312\321#\210!\312\"\211#\203W#@\"\322\"@!\203N\323\"\211$A@)!#A\211#\2046+\313 \210\324 \210\325 \210\326\f!\210p\327\330\312\211\321 %\331\216 \203 %\332\f&\"\210)\333 !\210 \205\224\334\335!\205\224\336 \312\"\210\324 .\207" [patch-buffer working-dir err-occurred window-conf patch-file-name mm-text-coding-system dvc-make-temp-name "gnus-xgit-apply-" ".patch" current-window-configuration nil gnus-summary-show-article raw gnus-summary-select-article-buffer gnus-write-buffer re-search-forward "^To: " t looking-at dvc-uniquify-file-name delete-other-windows dvc-buffer-push-previous-window-config find-file dvc-read-directory-name "Apply git patch to: " ((byte-code "\302!\210\303 !\207" [patch-file-name patch-buffer delete-file kill-buffer] 2)) xgit-apply-mbox set-window-configuration y-or-n-p "Run git log in working directory? " xgit-log coding-system-for-write require-final-newline xgit-apply-patch-mapping m #1=#:--cl-dolist-temp-- x default-directory force] 6 (#$ . 2135)]) (byte-code "\301B\302\301!\204\303\301\304\"\210\304\207" [current-load-list xgit-gnus-status-window-configuration default-boundp set-default nil] 3) #@207 View the status for the repository, where MIME part N would be applied as a git patch. Use the same logic as in `xgit-gnus-article-apply-patch' to guess the repository path via `xgit-apply-patch-mapping'. (defalias 'xgit-gnus-article-view-status-for-apply-patch #[(n) "\301 \210\302!\207" [xgit-gnus-status-window-configuration xgit-gnus-view-status-for-apply-patch set-window-configuration] 2 (#$ . 3519) "p"]) #@72 View the status for a repository before applying a git patch via gnus. (defalias 'xgit-gnus-view-status-for-apply-patch #[nil "\306 \307\310 \210\212eb\210\311\312\307\313#\210\n\307\211\2034\f@\314 @!\203-\315 \211A@)!\fA\211\204+\204A\316\317\307\211\313%\320 \210\321 \210\306 \322 !+\207" [working-dir window-conf xgit-apply-patch-mapping m #1=#:--cl-dolist-temp-- x current-window-configuration nil gnus-summary-select-article-buffer re-search-forward "^To: " t looking-at dvc-uniquify-file-name dvc-read-directory-name "View git repository status for: " xgit-dvc-status delete-other-windows dvc-buffer-push-previous-window-config default-directory xgit-gnus-status-window-configuration] 6 (#$ . 3939)]) #@113 View the currently looked-at patch. All this does is switch to the article and move to where the patch begins. (defalias 'xgit-gnus-article-view-patch #[(n) "\300 \210eb\210\301\302\303\304#\210\305y\207" [gnus-summary-select-article-buffer re-search-forward "^---$" nil t 1] 4 (#$ . 4676) "p"]) (provide 'xgit-gnus)