From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/60850 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: Imroving deleting/stripping MIME parts Date: Wed, 31 Aug 2005 13:18:08 +0900 Organization: Emacsen advocacy group Message-ID: References: <87r7cfxfma.fsf@uwo.ca> <87d5nw88p9.fsf@uwo.ca> <87fysr78gi.fsf@uwo.ca> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1125461995 26990 80.91.229.2 (31 Aug 2005 04:19:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 31 Aug 2005 04:19:55 +0000 (UTC) Original-X-From: ding-owner+M9382=ding+2Daccount=gmane.org@lists.math.uh.edu Wed Aug 31 06:19:49 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EAK3V-0007Hq-6e for ding-account@gmane.org; Wed, 31 Aug 2005 06:18:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1EAK3T-0006O0-00 for ding-account@gmane.org; Tue, 30 Aug 2005 23:18:31 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1EAK3N-0006Nj-00 for ding@lists.math.uh.edu; Tue, 30 Aug 2005 23:18:25 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by util2.math.uh.edu with esmtp (Exim 4.30) id 1EAK3M-0007Gi-2d for ding@lists.math.uh.edu; Tue, 30 Aug 2005 23:18:24 -0500 Original-Received: from washington.hostforweb.net ([66.225.201.13]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1EAK3E-0007m2-00 for ; Wed, 31 Aug 2005 06:18:17 +0200 Original-Received: from localhost ([127.0.0.1]) by washington.hostforweb.net with esmtpa (Exim 4.50) id 1EAK3Q-00075e-0C for ding@gnus.org; Tue, 30 Aug 2005 23:18:28 -0500 Original-To: ding@gnus.org X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:56yNGaRu/uDI2oXTqE+lWsJnkig= X-Hashcash: 1:20:050831:ding@gnus.org::kvyz/GTBJ0oT3B36:00004rum X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - washington.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -4.8 (----) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:60850 Archived-At: --=-=-= >>>>> In Reiner Steib wrote: > I suspect that `gnus-article-goto-part' doesn't work for certain > articles/parts. I suspect too. I surely experienced the `No MIME part under point' problem, but now I cannot reproduce it with the same article. Hmm... >>>>> In Reiner Steib wrote: > We could add `gnus-summary-show-article' in > `gnus-article-part-wrapper' to display the right article: > (defun gnus-article-part-wrapper (n function &optional no-handle) > + (gnus-summary-show-article) > But I'm not sure if the _not_ selecting the article was intended > behavior (i.e. this change might break other usage). Opinions? It seems that it should not work when the article is not visible or it is not the right article. However, I think redisplaying of the article is needed for the other reason. I'd like to propose adding two features. The following definition displays all the MIME buttons even if `gnus-inhibit-mime-unbuttonizing' is nil (which is the default), and specifies which part the user is going to manipulate. How about it? --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline (defun gnus-article-part-wrapper (n function &optional no-handle) (let (window redisplay) ;; Check whether the article is displayed. (unless (and (gnus-buffer-live-p gnus-article-buffer) (setq window (get-buffer-window gnus-article-buffer t)) (frame-visible-p (window-frame window))) (error "No article is displayed")) ;; Check whether the article displays the right contents. (unless (with-current-buffer gnus-article-buffer (with-current-buffer gnus-summary-buffer (eq gnus-current-article (gnus-summary-article-number)))) (error "You should select the right article first")) ;; Make sure all the MIME buttons are visible. (unless gnus-inhibit-mime-unbuttonizing (setq redisplay t) (let ((gnus-inhibit-mime-unbuttonizing t)) (gnus-summary-show-article))) (save-window-excursion (select-window window) (when (> n (length gnus-article-mime-handle-alist)) (error "No such part")) (gnus-article-goto-part n) (let ((cursor-in-non-selected-windows t) ;; Display cursor. (overlay-arrow-string "=>") ;; Display arrow. (overlay-arrow-position (point-marker))) (unwind-protect (if no-handle (funcall function) (let ((handle (cdr (assq n gnus-article-mime-handle-alist)))) (funcall function handle))) (set-marker overlay-arrow-position nil) (when redisplay (gnus-summary-show-article))))))) --=-=-=--