Remote usage script updated

Jesse Rosenthal jrosenthal at jhu.edu
Wed Feb 9 13:13:13 PST 2011


Michal,

On Sun, 06 Feb 2011 00:58:29 +0100, Michal Sojka <sojkam1 at fel.cvut.cz> wrote:
> Hmm, this code worked well with dropbear ssh server but it seems that
> with openssh server the result is not that good. Namely, if the master
> connection is dead, the command running true blocked for a long time.

Seemed to work okay for me when I played around with it a bit (in
different circumstances, and with a confused laptop waking up from
hibernation). But I'll hold off on updating it till I can figure out the
most reliable way.

I'll definitely take your suggestion to use printf instead of manually
escaping characters. 

Thanks, in any event, for your suggestions!

By the way, I've also realized that most attachment downloading is done
not by "--format=raw" but by "notmuch part". It's possible to do caching
there as well. There are a few options there:

  * One option would be to just cache by the attachment number -- but
    this is very fragile if you delete an attachment through mutt or
    some other client that allows it.

  * cache by the hash of the attachment. The idea is that asking the
    server to fetch it, hash it, and send the hash would still save
    time over sending the whole attachment. Probably -- though most
    attachments are small enough and most connections are fast enough
    that this might not actually matter.

  * Actually stick the attachment hash in the json output in the first
    place. But this would be a lot of trouble for a small gain for
    very few.

It would come in handy when I'm trying to get a biggish pdf over a bus's
slow wireless connection. But it's certainly not a priority.

Best,
Jesse


More information about the notmuch mailing list