From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/49947 Path: main.gmane.org!not-for-mail From: Satyaki Das Newsgroups: gmane.emacs.gnus.general Subject: Minor patches for CVS Gnus Date: Sat, 08 Feb 2003 08:08:35 -0800 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1044720462 28684 80.91.224.249 (8 Feb 2003 16:07:42 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 8 Feb 2003 16:07:42 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18hXVz-0007SO-00 for ; Sat, 08 Feb 2003 17:07:39 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 18hXXJ-00027U-00; Sat, 08 Feb 2003 10:09:01 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 08 Feb 2003 10:09:58 -0600 (CST) Original-Received: from sclp3.sclp.com (sclp3.sclp.com [66.230.238.2]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id KAA24990 for ; Sat, 8 Feb 2003 10:09:41 -0600 (CST) Original-Received: (qmail 24018 invoked by alias); 8 Feb 2003 16:08:39 -0000 Original-Received: (qmail 24012 invoked from network); 8 Feb 2003 16:08:39 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by 66.230.238.6 with SMTP; 8 Feb 2003 16:08:39 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 18hXey-0002pw-00 for ; Sat, 08 Feb 2003 17:16:56 +0100 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 135 Original-NNTP-Posting-Host: ev-01-st2435.stanford.edu Original-X-Trace: quimby.gnus.org 1044721016 10752 128.12.141.17 (8 Feb 2003 16:16:56 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 8 Feb 2003 16:16:56 GMT Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEXv5MaUZkXivZ6reFTq 38ZhOyUYDAi/iWLVnXPy6s7TuTa0AAACbElEQVR4nGXTQW/aMBQA4AghrT2+WSnqEa9TwjH1qOmtp JGAY7SGqcdpiu+QdS9XyJh97CGX/Ns922mBzRIiyudnv/fsBEE/hik/FCejf/06jKBYq/8h3dGzUu pfGO4KVZbrU/GwcLOVHeUZHLdViuLKkQjd+8EVzc9BAIRrF/aFvzj4QM+5QKwEhB5SD3NaeYQ0RAL rkuBnD58Vw9oYQzEQnsJdIY0fmISFW+rgqghzO3/Peawrt/19unNJFRY4d5A4yBwsyxxdAI9pLQ9j V/cRdAXFER5VLnvAxEProcyFxH33OmgAclvitYd5mQPAbNUtE0jgDAAk4j6I0OjkCJcEI9rBcGPiq grpXPqIcckkpWW4pqRY+P3uDQ4lo46jNthMCX4021UbWWhCtgGGaCpqPAu/NftVy22rzJShrHVt0D YYPh7Kex/Bx6x2vW3oT8PtH9rjkweoqU3aAtewvXuH+Kux7djHM05QX71BbJgFikKCpFkfQRg+iLG O5J5rsVNvcGE2tV0KK0l7jF6UevYwMLvZ3malqZbGnu115yCIQFJxVIeQBq9sE7voCNJeBmm0h4W/ otOR0dtJ10a1qeyZP/cRWcSMqWreCGM26gSChx1Nlbyig5qeQfA4oqRi+rmVTmABM9dGnfSw7OECp KujAgdPXdrDICHhBsF/IE99usFwKYDORCfAbn6dQUqLCDp4Jn4vTiFLJSYMhUCxzdbvkGVZLG0Dtc TqNsNN0cNlly2pSWjsZzjLVl17Q/AQZF3XumuAWFPCk45GNg/aNuvatqpdGRYnLUH7GIxnk8VNF/U fJ12ViZ3atX8BA0lLiCantuMAAAAASUVORK5CYII= User-Agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.3.50 Cancel-Lock: sha1:mgxdm+SMWS+jNn4n5BHWaZX9x+g= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:49947 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:49947 We have recently started using Gnus' MIME display code to display messages in MH-E (the Emacs frontend to MH). It works quite nicely. While working on this I came across a few potential bugs. Here they are along with patches to fix them: 1. The function mm-display-external could leaks buffers. In this function assume that method is mailcap-save-binary-file. Then a new temporary buffer is generated and method is set to nil. That means that the cleanup forms in the unwind-protect doesn't free the buffer. I think the following patch fixes it. Index: lisp/mm-decode.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/mm-decode.el,v retrieving revision 6.87 diff -u -r6.87 mm-decode.el --- lisp/mm-decode.el 3 Feb 2003 19:37:57 -0000 6.87 +++ lisp/mm-decode.el 8 Feb 2003 15:44:58 -0000 @@ -660,8 +660,7 @@ (if method (funcall method) (mm-save-part handle)) - (when (and (not non-viewer) - method) + (when (not non-viewer) (mm-handle-set-undisplayer handle mm))))) ;; The function is a string to be executed. (mm-insert-part handle) 2. The function mm-inline-emacs-image inserts a new line every time it is called. This means that if images are shown as buttons then a new line is inserted every cycle (show followed by hide). I think, this is only a problem for GNU Emacs. So I essentially copied the code for XEmacs and that seems to fix the problem. The following patch is what I did. Index: lisp/mm-view.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/mm-view.el,v retrieving revision 6.48 diff -u -r6.48 mm-view.el --- lisp/mm-view.el 30 Oct 2002 07:54:59 -0000 6.48 +++ lisp/mm-view.el 8 Feb 2003 15:44:59 -0000 @@ -77,7 +77,10 @@ (put-image (mm-get-image handle) b) (mm-handle-set-undisplayer handle - `(lambda () (remove-images ,b (1+ ,b)))))) + `(lambda () + (remove-images ,b (1+ ,b)) + (delete-region ,(set-marker (make-marker) b) + ,(set-marker (make-marker) (point))))))) (defun mm-inline-image-xemacs (handle) (insert "\n") 3. This isn't really a bug just a minor thing. I use pgg and don't like the way it blinks when used. Basically the contents of the buffer with the raw message is shown for a moment and then replaced with the buttons and all. I think this is caused because pgg calls gpg asynchronously with start-process. Since pgg then waits for the process to terminate any way I replaced start-process with call-process and the flashing goes away. I have used this for only a day or so, hence it is likely that this might cause other problems (there must be a reason why start-process was used in the first place). Thanks, Satyaki Index: lisp/pgg-gpg.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/pgg-gpg.el,v retrieving revision 6.8 diff -u -r6.8 pgg-gpg.el --- lisp/pgg-gpg.el 2 Nov 2002 04:27:00 -0000 6.8 +++ lisp/pgg-gpg.el 8 Feb 2003 15:45:00 -0000 @@ -59,27 +59,22 @@ (errors-buffer pgg-errors-buffer) (orig-mode (default-file-modes)) (process-connection-type nil) - process status exit-status) + exit-status) (with-current-buffer (get-buffer-create errors-buffer) (buffer-disable-undo) (erase-buffer)) (unwind-protect (progn (set-default-file-modes 448) - (let ((coding-system-for-write 'binary)) - (setq process - (apply #'start-process "*GnuPG*" errors-buffer - program args))) - (set-process-sentinel process #'ignore) - (when passphrase - (process-send-string process (concat passphrase "\n"))) - (process-send-region process start end) - (process-send-eof process) - (while (eq 'run (process-status process)) - (accept-process-output process 5)) - (setq status (process-status process) - exit-status (process-exit-status process)) - (delete-process process) + (let* ((coding-system-for-write 'binary) + (input (buffer-substring-no-properties start end))) + (with-temp-buffer + (when passphrase + (insert passphrase "\n")) + (insert input) + (setq exit-status + (apply #'call-process-region (point-min) (point-max) program + nil errors-buffer nil args)))) (with-current-buffer (get-buffer-create output-buffer) (buffer-disable-undo) (erase-buffer) @@ -87,12 +82,8 @@ (let ((coding-system-for-read 'raw-text-dos)) (insert-file-contents output-file-name))) (set-buffer errors-buffer) - (if (memq status '(stop signal)) - (error "%s exited abnormally: '%s'" program exit-status)) - (if (= 127 exit-status) - (error "%s could not be found" program)))) - (if (and process (eq 'run (process-status process))) - (interrupt-process process)) + (if (not (equal exit-status 0)) + (error "%s exited abnormally: '%s'" program exit-status)))) (if (file-exists-p output-file-name) (delete-file output-file-name)) (set-default-file-modes orig-mode))))