From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/76600 Path: news.gmane.org!not-for-mail From: Antoine Levitt Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus-summary-save-parts enhancement Date: Sat, 12 Feb 2011 13:12:55 +0100 Message-ID: <87aai1sb7c.fsf@gmail.com> References: <87wrl7dhel.fsf@gmail.com> <87hbcbq2i1.fsf@keller.adm.naquadah.org> <878vxm9cc7.fsf@ericabrahamsen.net> <87k4h5wnmb.fsf@gmail.com> <87ipwp8oec.fsf@ericabrahamsen.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1297512808 9446 80.91.229.12 (12 Feb 2011 12:13:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 12 Feb 2011 12:13:28 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M24944@lists.math.uh.edu Sat Feb 12 13:13:24 2011 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.69) (envelope-from ) id 1PoELq-0007An-4d for ding-account@gmane.org; Sat, 12 Feb 2011 13:13:22 +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 1PoELf-0004lc-Sy; Sat, 12 Feb 2011 06:13:11 -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 1PoELe-0004lH-8R for ding@lists.math.uh.edu; Sat, 12 Feb 2011 06:13:10 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PoELc-0006Lg-Ug for ding@lists.math.uh.edu; Sat, 12 Feb 2011 06:13:10 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1PoELb-00064k-Ku for ding@gnus.org; Sat, 12 Feb 2011 13:13:07 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PoELb-00075c-EM for ding@gnus.org; Sat, 12 Feb 2011 13:13:07 +0100 Original-Received: from ney92-7-78-233-218-202.fbx.proxad.net ([78.233.218.202]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 12 Feb 2011 13:13:07 +0100 Original-Received: from antoine.levitt by ney92-7-78-233-218-202.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 12 Feb 2011 13:13:07 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 36 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: ney92-7-78-233-218-202.fbx.proxad.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:EhozE8bJjnfHDUDUknRT1KQ1+y8= X-Spam-Score: -1.0 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:76600 Archived-At: 12/02/11 12:48, Eric Abrahamsen >>> When I try to save or delete-and-save an attachment the same >>> thing happens that used to happen: it finds a file instead of a >>> directory, and I need to cancel out of ido mode altogether with C-f in >>> order to save to a directory. Anything else that needs to be done to >>> make this work? >> >> I can't think of a reason why this would not work. Can you find out >> where the prompt is coming from? M-x toggle-debug-on-quit and C-g inside >> the prompt should do the trick. > > This is after going into a summary buffer and hitting "K o" on a message > with an attachment. That's bound to gnus-article-save-part, so I guess > the reason it's not working is because it's not calling > gnus-summary-save-parts at all! What should be getting called here? Ah, then it's normal. You've got X m, which is gnus-summary-save-parts, and saves multiple files (therefore expects a directory), and K o which is gnus-article-save-part, and saves just one part (therefore expects a file). Using read-directory-name for gnus-article-save-part would break autocompletion in case you want to save to an existing file. The problem here is that ido has no ways of knowing whether the caller wants a file to write or a file to read, and prety much defaults to an agressive completion suitable for files to read, but quite bothersome for files to write (because in many cases you want to just give a directory name). Also, ido has a few variables to control this kind of things. See for instance ido-read-file-name-as-directory-commands (which is a hack, and is probably useless with my patch on emacs-devel) and ido-read-file-name-non-ido. So, as a hack, you could set ido-read-file-name-as-directory-commands, but that'd break autocompletion of file names. Possibly the best solution would be to hack into ido to offer the possibility of presenting "." in the completion list even for read-file-name?