bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mail's "copy" command incorrectly handles folders (w/ patch)...


From: Sergey Poznyakoff
Subject: Re: mail's "copy" command incorrectly handles folders (w/ patch)...
Date: Tue, 16 Jul 2002 10:50:07 +0300

Hi Matthew,

Thanks again for your reports.

> I've noticed mail's "copy" command has the same filename expansion
[...]
> but this issue has brought up two questions:

> 1. Should all this filename expansion be handled by mail's commands
> themselves or should it be handled by the mailbox_*() functions?
> mailbox_create_default() seems to want to handle this, but its plus
> expansion (courtesy of plus_expand()) appears to be broken.

It could have been handled by mailbox_create_default, if the latter
had sufficient information to do so. Actually, the only expansions
it handles now are '%' and '~', which do not require any surplus
information. The function does a rudimentary attempt to handle '+'
expansion basing on the assumption that user's mail folder is always
'Mail'. Introducing a global variable to keep the current folder name
will solve this.

> 2. Should "copy" support the '#' (previous file) semantics available to
> "file"?  It kinda makes sense, and I can see an argument in favor of it,
> especially if you want to handle filename expansion at a lower level than
> in the individual commands.

It would be a good extension. But I believe it should be handled by
mail functions, not by mailbox_*(). Storing the previous mailbox name
in a variable doesn't seem feasible, since an application can open
several mailboxes at a time (and actually, guimb does so), then
each successive call to mailbox_create_default would overwrite the
variable with the new value.

> For the record, my patch to mail/copy.c does not support '#' expansion.

Thanks!

Regards,
Sergey










reply via email to

[Prev in Thread] Current Thread [Next in Thread]