From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: owner@emacsbugs.donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#4388: marked as done (23.1; rmailmm save option does not prompt for filename correctly (patch)) Date: Tue, 15 Sep 2009 02:50:04 +0000 Message-ID: References: <32hbv5dj0e.fsf@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1252983004-16530-0" X-Trace: ger.gmane.org 1252984051 28492 80.91.229.12 (15 Sep 2009 03:07:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Sep 2009 03:07:31 +0000 (UTC) To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 15 05:07:24 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MnOO2-0002oF-KD for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Sep 2009 05:07:23 +0200 Original-Received: from localhost ([127.0.0.1]:46845 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MnOO2-0006Rk-3W for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Sep 2009 23:07:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MnONs-0006Ly-8i for bug-gnu-emacs@gnu.org; Mon, 14 Sep 2009 23:07:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MnONn-0006JZ-B8 for bug-gnu-emacs@gnu.org; Mon, 14 Sep 2009 23:07:11 -0400 Original-Received: from [199.232.76.173] (port=56352 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MnONn-0006JW-66 for bug-gnu-emacs@gnu.org; Mon, 14 Sep 2009 23:07:07 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:52258) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MnONi-0005rV-N5; Mon, 14 Sep 2009 23:07:03 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8F370JE020090; Mon, 14 Sep 2009 20:07:00 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n8F2o5rf016560; Mon, 14 Sep 2009 19:50:05 -0700 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: closed 4388 X-Emacs-PR-Package: emacs X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:31103 Archived-At: This is a multi-part message in MIME format... ------------=_1252983004-16530-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Mon, 14 Sep 2009 22:44:17 -0400 with message-id <32hbv5dj0e.fsf@fencepost.gnu.org> and subject line Re: bug#4388: 23.1; rmailmm save option does not prompt fo= r filename correctly (patch) has caused the Emacs bug report #4388, regarding 23.1; rmailmm save option does not prompt for filename correctly = (patch) to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com immediately.) --=20 4388: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D4388 Emacs Bug Tracking System Contact owner@emacsbugs.donarmstrong.com with problems ------------=_1252983004-16530-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 10 Sep 2009 12:02:15 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.3 required=4.0 tests=AWL,FOURLA,MURPHY_DRUGS_REL8 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8AC2Bui019776 for ; Thu, 10 Sep 2009 05:02:13 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MliLr-0002ex-7j for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 08:02:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MliLm-0002bN-Q1 for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 08:02:10 -0400 Received: from [199.232.76.173] (port=59271 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MliLm-0002b6-Gc for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 08:02:06 -0400 Received: from mercav16.na.sas.com ([149.173.6.153]:47789) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MliLl-0000Xp-RI for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 08:02:06 -0400 X-TM-IMSS-Message-ID: <04ad18d90000d5e9@mercav16.na.sas.com> Received: from d16922.us.sas.com ([10.40.12.239]) by mercav16.na.sas.com ([10.19.9.246]) with ESMTP (TREND IMSS SMTP Service 7.0) id 04ad18d90000d5e9 ; Thu, 10 Sep 2009 08:02:02 -0400 Date: Thu, 10 Sep 2009 08:02:01 -0400 Message-Id: From: "David J. Biesack" To: bug-gnu-emacs@gnu.org Subject: 23.1; rmailmm save option does not prompt for filename correctly (patch) X-detected-operating-system: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ When decoding an RMAIL message with an attachement, invoke rmail-view. rmailmm creates a button for each attached file, such as Attached application/rtf file: Ch7_2009_08_31.rtf On the attachment button/link, press Enter to invoke rmail-mime-save Currently, this prompts for a location to save the attachment but does not pass the current file name and directory name correctly. The attached patch fixes this. In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600) of 2009-07-30 on SOFT-MJASON Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.4)' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ENU value of $XMODIFIERS: nil locale-coding-system: cp1252 default-enable-multibyte-characters: t Major mode: Shell Minor modes in effect: diff-auto-refine-mode: t display-time-mode: t shell-dirtrack-mode: t delete-selection-mode: t pc-selection-mode: t show-paren-mode: t iswitchb-mode: t compilation-shell-minor-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t next-error-follow-minor-mode: t abbrev-mode: t Recent input: M-f M-f S w M-p M-b M-b M-b M-f C-f C-f | C-p C-e C-b C-b C-x F C-v C-v C-v C-v C-v C-v C-v C-v C-x k SPC M-p M-> M-x m a n d i f f C-x o C-s w h i C-a C-x p C-x b r m a i l m m . e l . o r C-g C-g C-x , C-x C-f r m a SPC m m . e l SPC . o SPC C-x , C-x , C-x , M-x f i n d - f i l e - l SPC r m a i l m m . e l y M-x h s - s h o w - a l l C-x p C-x , M-x r m a i l - C-g C-g M-x f i n d - f i l e - l i SPC r m a i l . m m . e l . o r SPC y C-x p C-e C-x C-g C-g C-x l C-x o C-x l C-x o C-x ( C-e C-d C-n C-e C-x ) C-x e C-x e C-x e M-4 M-0 M-0 C-x e C-u C-x e C-u C-x e C-u C-x e C-u C-x e M-< C-a C-x C-s C-x * M-p C-p C-e C-b C-b C-x F C-x 1 C-SPC C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n M-w C-x 4 , C-n M-x r e p o r t - b SPC Recent messages: History item: 1 rmailmm.patch [2 times] Fontifying rmailmm.patch... (regexps................) rmailmm.patch Fontifying rmailmm.patch... (regexps................) rmailmm.patch Mark set Region saved 8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------ *** rmailmm.el.orig Thu Aug 13 11:54:46 2009 --- rmailmm.el Thu Sep 10 07:56:10 2009 *************** *** 81,86 **** --- 81,89 ---- (let* ((filename (button-get button 'filename)) (directory (button-get button 'directory)) (data (button-get button 'data))) + (setq directory (if (not (string-match "^~$\\.*/" directory)) + (concat directory "/") + directory)) (while (file-exists-p (expand-file-name filename directory)) (let* ((f (file-name-sans-extension filename)) (i 1)) *************** *** 89,98 **** f (substring f 0 (match-beginning 0)))) (setq filename (concat f "-" (number-to-string i) "." (file-name-extension filename))))) (setq filename (expand-file-name (read-file-name (format "Save as (default: %s): " filename) directory ! (expand-file-name filename directory)) directory)) (when (file-regular-p filename) (error (message "File `%s' already exists" filename))) --- 92,104 ---- f (substring f 0 (match-beginning 0)))) (setq filename (concat f "-" (number-to-string i) "." (file-name-extension filename))))) + (setq filename (expand-file-name (read-file-name (format "Save as (default: %s): " filename) directory ! (expand-file-name filename directory) ! nil ! filename) directory)) (when (file-regular-p filename) (error (message "File `%s' already exists" filename))) *************** -- David J. Biesack, SAS SAS Campus Dr. Cary, NC 27513 www.sas.com (919) 531-7771 ------------=_1252983004-16530-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 4388-done) by emacsbugs.donarmstrong.com; 15 Sep 2009 02:44:19 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-7.6 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8F2iIRa015686 for <4388-done@emacsbugs.donarmstrong.com>; Mon, 14 Sep 2009 19:44:19 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1MnO1h-0003rG-Gq; Mon, 14 Sep 2009 22:44:17 -0400 From: Glenn Morris To: 4388-done@emacsbugs.donarmstrong.com Subject: Re: bug#4388: 23.1; rmailmm save option does not prompt for filename correctly (patch) References: X-Spook: Firewalls eternity server e-bomb electronic surveillance X-Ran: T1ht[[XUJ{xF]&y\ User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii "David J. Biesack" wrote: > I invoke rmail-mime-save and enter a different directory, using > completion (and TAB)... this often results with a directory name that > ends with /, such as c:/djb/attachments/ Should be fixed now. > I still prefer to have the file name in the prompt so that I can > change it more easily rather than having to type it all in (i.e. > change the case or change blanks to hyphens or remove a "-1" or "-2" > version string to replace an earlier saved version etc.) I think this is a matter of personal preference, there are advantages to both styles. The current default is consistent with write-file, and with rmail-output, so I think it should remain. I have however simplified the function so that it does not try to come up with a unique file name, it just lets you decide whether or not you want to overwrite an existing file. ------------=_1252983004-16530-0--