From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "David J. Biesack" Newsgroups: gmane.emacs.bugs Subject: bug#4388: 23.1; rmailmm save option does not prompt for filename correctly (patch) Date: Thu, 10 Sep 2009 08:02:01 -0400 Message-ID: Reply-To: "David J. Biesack" , 4388@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1252585659 20504 80.91.229.12 (10 Sep 2009 12:27:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Sep 2009 12:27:39 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 10 14:27:32 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 1MlikM-0005fq-HE for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Sep 2009 14:27:30 +0200 Original-Received: from localhost ([127.0.0.1]:47498 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlikL-0008SP-EM for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Sep 2009 08:27:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mlik7-0008Qz-10 for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 08:27:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mlik1-0008OX-L3 for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 08:27:14 -0400 Original-Received: from [199.232.76.173] (port=35748 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mlik1-0008OG-24 for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 08:27:09 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:20782) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mlik0-0006OQ-G5 for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 08:27:08 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mlijz-0002WT-KN for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 08:27:07 -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 n8ACQx2H024194; Thu, 10 Sep 2009 05:26:59 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n8ACA4LX021674; Thu, 10 Sep 2009 05:10:04 -0700 Resent-Date: Thu, 10 Sep 2009 05:10:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: "David J. Biesack" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 10 Sep 2009 12:10:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 4388 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125258413519781 (code B ref -1); Thu, 10 Sep 2009 12:10:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 10 Sep 2009 12:02:15 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-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 Original-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 Original-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 Original-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 Original-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> Original-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 X-detected-operating-system: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Resent-Date: Thu, 10 Sep 2009 08:27:13 -0400 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:30925 Archived-At: 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