all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Ido and Wanderlust
@ 2018-12-05 22:33 Greg Bognar
  2018-12-06  2:54 ` Óscar Fuentes
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Bognar @ 2018-12-05 22:33 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I use Wanderlust (https://github.com/wanderlust/wanderlust) for email.  It
depends on SEMI (https://github.com/wanderlust/semi) to provide MIME features,
one of which is the mime-save-content function to save attachments (defined in
mime-play.el, line 263,
https://github.com/wanderlust/semi/blob/semi-1_14-wl/mime-play.el).

I also use ido.  But when I enable ido.el with

(ido-everywhere) 

mime-save-content stops working.  It wants to save the attachment with the file
name that's on top of the completion list (prompting to overwrite it) and the
default name (ie, the name of the attached file) does not get inserted.

An alternative is to use Wanderlust's own wl-mime-save-content (defined in
wl-mime.el, line 894,
https://github.com/wanderlust/wanderlust/blob/master/wl/wl-mime.el), which
beings by inserting the attachment's file name into its own prompt, but if you
want to change the directory it switches to the ido prompt with the same result
as above.  The only solution in both cases is to exit the ido prompt with C-f.

Both functions use ido-read-file-name for read-file-name as ido sets
read-file-name-function.  I'm wondering what it is about ido-read-file-name that
causes this behavior.

Thanks,
Greg



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ido and Wanderlust
  2018-12-05 22:33 Ido and Wanderlust Greg Bognar
@ 2018-12-06  2:54 ` Óscar Fuentes
  2018-12-06  8:54   ` Greg Bognar
  0 siblings, 1 reply; 5+ messages in thread
From: Óscar Fuentes @ 2018-12-06  2:54 UTC (permalink / raw)
  To: Greg Bognar; +Cc: help-gnu-emacs

Greg Bognar <greg.bognar@startmail.com> writes:

> I use Wanderlust (https://github.com/wanderlust/wanderlust) for email.  It
> depends on SEMI (https://github.com/wanderlust/semi) to provide MIME features,
> one of which is the mime-save-content function to save attachments (defined in
> mime-play.el, line 263,
> https://github.com/wanderlust/semi/blob/semi-1_14-wl/mime-play.el).
>
> I also use ido.  But when I enable ido.el with
>
> (ido-everywhere) 
>
> mime-save-content stops working.  It wants to save the attachment with the file
> name that's on top of the completion list (prompting to overwrite it) and the
> default name (ie, the name of the attached file) does not get inserted.

I see this behavior in other prompts. The solution is to use C-j, which
tells Ido to accept wathever is written on the prompt instead of the
proposed completion.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ido and Wanderlust
  2018-12-06  2:54 ` Óscar Fuentes
@ 2018-12-06  8:54   ` Greg Bognar
  2018-12-06 16:42     ` Óscar Fuentes
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Bognar @ 2018-12-06  8:54 UTC (permalink / raw)
  To: Óscar Fuentes; +Cc: help-gnu-emacs

I don't see how C-j is a solution.  C-j won't insert by default the attachment's
file name, so you end up having to type it after the directory (or type a
different file name).  That's very inconvenient.

Dropping back to the default prompt with C-f solves this problem -- it
"remembers" the attachment's file name so you can save it to the directory of
your choice.

But shouldn't this be considered a bug with ido, especially if it has the same
problem in other prompts?  After all, the default read-file-name *can* handle
the situation, while ido cannot.  Given that ido is advertised as a "drop-in
replacement" for read-file-name, it should provide the same functionality, one
would think.

On Thu  6 Dec 2018 at 03:54 Óscar Fuentes wrote:
> Greg Bognar <greg.bognar@startmail.com> writes:
> 
> > I use Wanderlust (https://github.com/wanderlust/wanderlust) for email.  It
> > depends on SEMI (https://github.com/wanderlust/semi) to provide MIME features,
> > one of which is the mime-save-content function to save attachments (defined in
> > mime-play.el, line 263,
> > https://github.com/wanderlust/semi/blob/semi-1_14-wl/mime-play.el).
> >
> > I also use ido.  But when I enable ido.el with
> >
> > (ido-everywhere) 
> >
> > mime-save-content stops working.  It wants to save the attachment with the file
> > name that's on top of the completion list (prompting to overwrite it) and the
> > default name (ie, the name of the attached file) does not get inserted.
> 
> I see this behavior in other prompts. The solution is to use C-j, which
> tells Ido to accept wathever is written on the prompt instead of the
> proposed completion.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ido and Wanderlust
  2018-12-06  8:54   ` Greg Bognar
@ 2018-12-06 16:42     ` Óscar Fuentes
  2018-12-06 22:03       ` Greg Bognar
  0 siblings, 1 reply; 5+ messages in thread
From: Óscar Fuentes @ 2018-12-06 16:42 UTC (permalink / raw)
  To: Greg Bognar; +Cc: help-gnu-emacs

Greg Bognar <greg.bognar@startmail.com> writes:

> I don't see how C-j is a solution.  C-j won't insert by default the attachment's
> file name, so you end up having to type it after the directory (or type a
> different file name).  That's very inconvenient.

Have you tried it?



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ido and Wanderlust
  2018-12-06 16:42     ` Óscar Fuentes
@ 2018-12-06 22:03       ` Greg Bognar
  0 siblings, 0 replies; 5+ messages in thread
From: Greg Bognar @ 2018-12-06 22:03 UTC (permalink / raw)
  To: Óscar Fuentes; +Cc: help-gnu-emacs

On Thu  6 Dec 2018 at 17:42 Óscar Fuentes wrote:
> Greg Bognar <greg.bognar@startmail.com> writes:
> 
> > I don't see how C-j is a solution.  C-j won't insert by default the attachment's
> > file name, so you end up having to type it after the directory (or type a
> > different file name).  That's very inconvenient.
> 
> Have you tried it?

Yes, but I did get myself confused.  It turns out C-j does not work with
wl-mime-save-content at all, but it does work with mime-save-content.

(Wanderlust remembers which one you initially chose in an Emacs session, so in
order to test the other function, Emacs needs to be restarted each time.  I
probably lost track which function I was testing.)

I'm not sure what is responsible for the difference between wl-mime-save-content
and mime-save-content in this regard.  I guess I can just use the latter, then.
Thanks!



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-12-06 22:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-05 22:33 Ido and Wanderlust Greg Bognar
2018-12-06  2:54 ` Óscar Fuentes
2018-12-06  8:54   ` Greg Bognar
2018-12-06 16:42     ` Óscar Fuentes
2018-12-06 22:03       ` Greg Bognar

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.