Gnus development mailing list
 help / color / mirror / Atom feed
From: Antoine Levitt <antoine.levitt@gmail.com>
To: ding@gnus.org
Subject: Re: gnus-summary-save-parts enhancement
Date: Sat, 12 Feb 2011 13:12:55 +0100	[thread overview]
Message-ID: <87aai1sb7c.fsf@gmail.com> (raw)
In-Reply-To: <87ipwp8oec.fsf@ericabrahamsen.net>

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?




  reply	other threads:[~2011-02-12 12:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-10 15:43 Antoine Levitt
2011-02-10 16:27 ` Julien Danjou
2011-02-12  3:11   ` Eric Abrahamsen
2011-02-12 10:31     ` Antoine Levitt
2011-02-12 11:48       ` Eric Abrahamsen
2011-02-12 12:12         ` Antoine Levitt [this message]
2011-02-12 16:25           ` Eric Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87aai1sb7c.fsf@gmail.com \
    --to=antoine.levitt@gmail.com \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).