From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/67787 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general,gmane.mail.mh-e.devel Subject: Re: small change suggested for mh-mm-save-part Followup-To: gmane.mail.mh-e.devel Date: Tue, 11 Nov 2008 00:09:18 +0100 Message-ID: <878wrrdvq9.fsf@marauder.physik.uni-ulm.de> References: <338.1225540156@cpc1-cmbg2-0-0-cust309.cmbg.cable.ntl.com> <1228.1225565342@olgas.newt.com> <17907.1226075080@maps> Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1226390906 2177 80.91.229.12 (11 Nov 2008 08:08:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Nov 2008 08:08:26 +0000 (UTC) Cc: mh-e-devel@lists.sourceforge.net, Stephen Eglen To: ding@gnus.org Original-X-From: ding-owner+M16236@lists.math.uh.edu Tue Nov 11 09:09:26 2008 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 1KzoJP-0004Kf-IS for ding-account@gmane.org; Tue, 11 Nov 2008 09:09:23 +0100 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 1KzoI8-0005re-IX; Tue, 11 Nov 2008 02:08:04 -0600 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 1KzoI7-0005rP-72 for ding@lists.math.uh.edu; Tue, 11 Nov 2008 02:08:03 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1KzoI4-00039Y-5Z for ding@lists.math.uh.edu; Tue, 11 Nov 2008 02:08:03 -0600 Original-Received: from mail.uni-ulm.de ([134.60.1.11]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1KzoID-0003UY-00 for ; Tue, 11 Nov 2008 09:08:09 +0100 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.10.175]) by mail.uni-ulm.de (8.14.2/8.14.2) with ESMTP id mAB87gEx002721; Tue, 11 Nov 2008 09:07:45 +0100 (MET) Original-Received: from localhost (localhost [127.0.0.1]) by bridgekeeper.physik.uni-ulm.de (Postfix) with ESMTP id 253521345D; Tue, 11 Nov 2008 09:07:42 +0100 (CET) X-Face: :6KQZ[nyoS_edmB.%gw-=)BYth^|2+Y+^cu%I$FSx!&>-'om>3H7A|M&n(V7fIo3P.;yo.b yq4$p;ZaBtkv)\}biaiBQe"mD}iib1AA@99-fZ7i*bLhNRVC&0Wkxg9)SH?oWc@{ Mail-Followup-To: ding@gnus.org, mh-e-devel@lists.sourceforge.net, Stephen Eglen In-Reply-To: <17907.1226075080@maps> (Stephen Eglen's message of "Fri, 07 Nov 2008 16:24:40 +0000") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.1 (gnu/linux) X-DCC-debian-Metrics: poseidon 1169; Body=3 Fuz1=3 Fuz2=3 X-Virus-Scanned: by amavisd-new X-Spam-Score: -1.8 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:67787 gmane.mail.mh-e.devel:13043 Archived-At: On Fri, Nov 07 2008, Stephen Eglen wrote: > Dear Bill, > > Thanks for your comments, I was able to upload an item of the > sourceforge site this afternoon. [...] > > https://sourceforge.net/tracker/index.php?func=detail&aid=2235022&group_id=13357&atid=313357 > > I'll write to Reiner now. Here's the code from Stephen's mail: ---------------------------------------------------------------------- ;; The two lines following the three line comment are new. When ;; saving an attachment in MH-E, you are prompted for a filename. ;; With this change, you can give a directory name, and then the ;; attachment is stored in that directory, using the default name of ;; the attachment. This mirrors what happens when you save a file ;; using C-x C-w and supply a directory name. (defun mh-mm-save-part (handle) "Write HANDLE to a file." (let ((name (mail-content-type-get (mm-handle-type handle) 'name)) (filename (mail-content-type-get (mm-handle-disposition handle) 'filename)) file) (when filename (setq filename (file-name-nondirectory filename))) (setq file (read-file-name "Save MIME part to: " (or mm-default-directory default-directory) nil nil (or filename name ""))) (setq mm-default-directory (file-name-directory file)) ;; If user entered a directory, assume that is the directory where ;; the attachment should be saved, with the default filename ;; provided in the attachment. (when (and (file-directory-p file) filename) (setq file (concat (file-name-as-directory file) filename))) (and (or (not (file-exists-p file)) (yes-or-no-p (format "File %s already exists; overwrite? " file))) (mm-save-part-to-file handle file)))) ---------------------------------------------------------------------- Stephen, MH-E's copy `mh-mm-save-part' (`lisp/mh-e/mh-gnus.el') isn't the same as the current version `mm-save-part' in `lisp/gnus/mm-decode.el'. Could you please provide a patch ("diff -u" preferred) against `lisp/gnus/mm-decode.el', please? Bill, wouldn't it make more sense to add a proper check in `mh-mm-save-part' and simply use `mm-save-part' if Gnus is new enough. This would avoid divergent versions. (E.g. check (fboundp 'mm-complicated-handles) or the Gnus version.) > Bill Wohler wrote: > >> Stephen Eglen wrote: >> >> > Would it be okay if I committed the following extra lines to >> > mh-mm-save-part in the CVS Emacs repository? They are the two lines >> > following the long comment, which doesn't need to go in, but I put it >> > there so you can see what it does. >> >> Hi Stephen, >> >> This looks like a good change. It is, however, in an awkward location >> and time. >> >> 1. There is an Emacs code freeze. >> >> 2. I'd want the Emacs release to have a released version of MH-E. >> >> 3. Ordinarily, we would have dropped this function when we stop >> supporting Emacs 21. Since this change is not present in the current >> version of Gnus in Emacs 23, 5.13, we would then lose this >> functionality. >> >> One scenario is to submit this patch at [1] and encourage Reiner to >> incorporate this patch in the developmental version of Gnus. It could >> then be incorporated after Emacs 23 is released. Although this is the >> most likely scenario, this means that we'll have to support >> mh-mm-save-part until we drop support of Emacs 23 :-(. >> >> Another scenario, assuming we have time (the Kepler launch is March 5 so >> this is a grand assumption), is to add this change to both Gnus 5.13 and >> Emacs 23, creating an MH-E 8.2 release, so that we would only have to >> support mh-mm-save-part until we drop support of Emacs 22. >> >> In any event, I'd like to get Reiner's opinion before we proceed. >> >> 1. http://sourceforge.net/tracker/?group_id=13357&atid=313357 >> >> -- >> Bill Wohler http://www.newt.com/wohler/ GnuPG ID:610BD9AD Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/