On 01Feb2013 21:10, Derek Martin <inva...@pizzashack.org> wrote:
| On Sat, Feb 02, 2013 at 11:20:37AM +1100, Cameron Simpson wrote:
| > Given that they're both Maildirs on the same filesystem, why doesn't mutt
| > take this more efficient (both in time and disc space) approach? Just naive
| > use of an existing "save-message" library routine.
| 
| I find your surprise to be very surprising. :)
| 
|  - Copy = actual copy... implies multiple physical copies, which you
|    don't get with hard links

<save-message> implies a delete in the source mailbox. You don't need a
copy. (Yes, I know <sync> is a separate op, breaking this metaphor
somewhat.)

|  - Not all systems support hard links

Rolls eyes. Sure, but all _my_ systems do! UNIX dammit!

|  - Even on systems that support hard links, you need to either detect
|    that the filesystem is the same, or try it and fall back to making
|    a copy.

Doing the latter is really easy. link(), if failure, copy. It's a single
if-statement.

Since mutt's <edit-message> makes a new copy anyway (absent the edit in
place patch that I only learnt about today), there's no real downside to
using hardlinks. (Ignoring outside other mail apps.) Procmail even
delivers to multiple mailboxes with hardlinks by default when possible.

| It could be an option...

Indeed. If I find the time (unlikely, alas, but I'll put it on my todo
wishlist) I might try to do this.

Cheers,
-- 
Cameron Simpson <c...@zip.com.au>

Gummi: I'm so smart! I'm so smart! S M R T. I mean, S M A R T!
        - gu...@hengill.rhi.hi.is (Gudmundur Bjarni Josepsson)

Reply via email to