diff -ur orig/debian-bug.el mods/debian-bug.el --- orig/debian-bug.el 2003-08-30 12:44:24.000000000 +0900 +++ mods/debian-bug.el 2003-08-30 13:22:59.000000000 +0900 @@ -1440,7 +1440,7 @@ (forward-sexp 1) (beginning-of-line)) -(defun debian-bug-wget-mbox (&optional bug-number) +(defun debian-bug-wget-mbox-or-html (download-mbox-p &optional bug-number) "Wget the mbox file for bug BUG-NUMBER and return the filename created." (if (not debian-bug-download-directory) (error "Please set ` debian-bug-download-directory'")) @@ -1456,11 +1456,17 @@ (concat "debian-bug-" (if debian-bug-package-name (concat debian-bug-package-name "-")) - bug-number) + bug-number + (if download-mbox-p + "" + ".html")) debian-bug-download-directory)) (status) (url (concat "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=" - bug-number "&mbox=yes"))) + bug-number + (if download-mbox-p + "&mbox=yes" + "")))) (if (and (file-exists-p filename) (not (y-or-n-p "Bug file already exists. Download again? "))) filename @@ -1472,6 +1478,14 @@ filename (error "`wget' failed")))))) +(defun debian-bug-wget-mbox (&optional bug-number) + "Wget the mbox file for bug BUG-NUMBER and return the filename created." + (debian-bug-wget-mbox-or-html t bug-number)) + +(defun debian-bug-wget-html (&optional bug-number) + "Wget the html file for bug BUG-NUMBER and return the filename created." + (debian-bug-wget-mbox-or-html nil bug-number)) + (defun debian-bug-get-bug-as-file (&optional bug-number) "Browse the BTS for BUG-NUMBER via `browse-url'." (interactive (list (completing-read "Bug number to fetch: " diff -ur orig/debian-changelog-mode.el mods/debian-changelog-mode.el --- orig/debian-changelog-mode.el 2003-08-30 12:44:18.000000000 +0900 +++ mods/debian-changelog-mode.el 2003-08-30 13:15:35.000000000 +0900 @@ -645,7 +645,22 @@ (if (not (string-match "^[0-9]+$" bug-number)) (error "The bug number should consists of only digits.")) (debian-changelog-add-entry) - (save-excursion (insert " (closes: #" bug-number ")")) + (save-excursion + (insert + (with-current-buffer + (find-file-noselect (debian-bug-wget-html bug-number)) + (beginning-of-buffer) + (concat + (progn + + (re-search-forward "