From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/82430 Path: news.gmane.org!not-for-mail From: Stephen Eglen Newsgroups: gmane.emacs.gnus.general Subject: suggested change to gnus-dired-attach Date: Wed, 24 Oct 2012 11:27:26 +0100 Message-ID: <857gqgupv5.fsf@damtp.cam.ac.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1351079557 5920 80.91.229.3 (24 Oct 2012 11:52:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Oct 2012 11:52:37 +0000 (UTC) Cc: Stephen Eglen To: ding@gnus.org Original-X-From: ding-owner+M30696@lists.math.uh.edu Wed Oct 24 13:52:43 2012 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TQzVp-0006Hm-B1 for ding-account@gmane.org; Wed, 24 Oct 2012 13:52:41 +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 1TQzUP-0006Ad-AO; Wed, 24 Oct 2012 06:51:13 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1TQyBm-0005qK-4j for ding@lists.math.uh.edu; Wed, 24 Oct 2012 05:27:54 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1TQyBk-0006ui-FG for ding@lists.math.uh.edu; Wed, 24 Oct 2012 05:27:53 -0500 Original-Received: from ppsw-43.csi.cam.ac.uk ([131.111.8.143]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1TQyBi-0001Ez-Ep for ding@gnus.org; Wed, 24 Oct 2012 12:27:50 +0200 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Original-Received: from lapc-br1-008.maths.private.cam.ac.uk ([172.16.218.8]:60399 helo=mea) by ppsw-43.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.139]:25) with esmtp id 1TQyBh-0004TU-oj (Exim 4.72) (return-path ); Wed, 24 Oct 2012 11:27:49 +0100 Original-Received: from stephen by mea with local (Exim 4.76) (envelope-from ) id 1TQyBK-0005Yj-G9; Wed, 24 Oct 2012 11:27:26 +0100 User-agent: mu4e 0.9.9-dev6; emacs 24.1.1 X-Spam-Score: -0.7 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:82430 Archived-At: I like using gnus-dired-attach to add attachment to *Message* buffers. how about the following small patch to that function, so that when there are multiple possible *draft* buffers, the most recent is used as the default? Thanks, Stephen *** /local/data/home/stephen/gnus-dired.el~ 2012-10-24 11:26:04.993082347 +0100 --- /local/data/home/stephen/gnus-dired.el 2012-10-24 11:26:20.385084245 +0100 *************** *** 156,162 **** (if (= (length bufs) 1) (get-buffer (car bufs)) (gnus-completing-read "Attach to which mail composition buffer" ! bufs t))) ;; setup a new mail composition buffer (let ((mail-user-agent gnus-dired-mail-mode) ;; A workaround to prevent Gnus from displaying the Gnus --- 156,162 ---- (if (= (length bufs) 1) (get-buffer (car bufs)) (gnus-completing-read "Attach to which mail composition buffer" ! bufs t nil nil (car bufs)))) ;; setup a new mail composition buffer (let ((mail-user-agent gnus-dired-mail-mode) ;; A workaround to prevent Gnus from displaying the Gnus