From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/68912 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: attaching many files Date: Thu, 20 Aug 2009 20:25:24 +0900 Organization: Emacsen advocacy group Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1250767659 23181 80.91.229.12 (20 Aug 2009 11:27:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Aug 2009 11:27:39 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M17332@lists.math.uh.edu Thu Aug 20 13:27:32 2009 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1Me5nm-0003GG-Sr for ding-account@gmane.org; Thu, 20 Aug 2009 13:27:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Me5mW-0005Kt-Mo; Thu, 20 Aug 2009 06:26:12 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Me5mV-0005Ke-9k for ding@lists.math.uh.edu; Thu, 20 Aug 2009 06:26:11 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1Me5mT-0004Gw-Qa for ding@lists.math.uh.edu; Thu, 20 Aug 2009 06:26:11 -0500 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1Me5n4-0007Ep-00 for ; Thu, 20 Aug 2009 13:26:46 +0200 Original-Received: from localhost ([127.0.0.1]:50305) by orlando.hostforweb.net with esmtpa (Exim 4.69) (envelope-from ) id 1Me5lo-0007z4-Uk for ding@gnus.org; Thu, 20 Aug 2009 06:25:29 -0500 X-Hashcash: 1:20:090820:ding@gnus.org::WIfADGZw2WgcNi1C:00000oiS 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.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:YekmbeWxaLjeoh+kA/ePvAXJFA0= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.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: -1.2 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:68912 Archived-At: --=-=-= Hi, When I attach two or more files to a message, I need to type two `C-n's every time before attaching the next file. It is because the `mml-attach-(file|buffer|external)' commands don't move point after inserting a tag. I feel it inconvenience. Furthermore, if those commands are invoked at the message header, the tag will be added to the bottom of the body but point stays in the message header no matter how big the body may be. WDYT? It's easy to make those commands move point. That is to remove `save-excursion'. Is it ok? To try the new behavior without modifying Gnus, use the following advices: --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline (defmacro my-attach-and-move-point (form) `(if (message-in-body-p) (let ((mk (point-marker))) (set-marker-insertion-type mk t) ,form (goto-char mk)) ,form (goto-char (point-max)))) (defadvice mml-attach-file (around attach-and-move-point activate) (my-attach-and-move-point ad-do-it)) (defadvice mml-attach-buffer (around attach-and-move-point activate) (my-attach-and-move-point ad-do-it)) (defadvice mml-attach-external (around attach-and-move-point activate) (my-attach-and-move-point ad-do-it)) --=-=-=--