unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* RFC: notmuch-cache.el: simple caching of MIME parts
@ 2014-10-07  7:53 David Edmondson
  2014-10-07  7:57 ` David Edmondson
  0 siblings, 1 reply; 3+ messages in thread
From: David Edmondson @ 2014-10-07  7:53 UTC (permalink / raw)
  To: notmuch

[-- Attachment #1: Type: text/plain, Size: 383 bytes --]

I've been using remote-notmuch over a 3G connection quite a lot
recently. Dragging down the same MIME part more than once is annoying,
so here is a very simple filesystem based cache of MIME parts for
notmuch. It's integrated using defadvice for now, but a cleaner approach
is obviously possible.

No suggestion that this should be integrated - it's just a toy to prompt
discussion.

[-- Attachment #2: notmuch-cache.el~ --]
[-- Type: application/octet-stream, Size: 234 bytes --]

(defun notmuch-cache-get (id part)
  "Return a cached copy of ID's MIME PART, or nil."
  nil)

(defun notmuch-cache-put (id part content)
  "Cache a copy of ID's MIME PART using CONTENT."
  )

(defadvice notmuch-get-bodypart-internal

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

* Re: RFC: notmuch-cache.el: simple caching of MIME parts
  2014-10-07  7:53 RFC: notmuch-cache.el: simple caching of MIME parts David Edmondson
@ 2014-10-07  7:57 ` David Edmondson
  2014-10-07 12:25   ` Jesse Rosenthal
  0 siblings, 1 reply; 3+ messages in thread
From: David Edmondson @ 2014-10-07  7:57 UTC (permalink / raw)
  To: notmuch

[-- Attachment #1: Type: text/plain, Size: 481 bytes --]

On Tue, Oct 07 2014, David Edmondson wrote:
> I've been using remote-notmuch over a 3G connection quite a lot
> recently. Dragging down the same MIME part more than once is annoying,
> so here is a very simple filesystem based cache of MIME parts for
> notmuch. It's integrated using defadvice for now, but a cleaner approach
> is obviously possible.
>
> No suggestion that this should be integrated - it's just a toy to prompt
> discussion.

Bah. Attached the auto-save file :-p


[-- Attachment #2: notmuch-cache.el --]
[-- Type: application/emacs-lisp, Size: 3613 bytes --]

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

* Re: RFC: notmuch-cache.el: simple caching of MIME parts
  2014-10-07  7:57 ` David Edmondson
@ 2014-10-07 12:25   ` Jesse Rosenthal
  0 siblings, 0 replies; 3+ messages in thread
From: Jesse Rosenthal @ 2014-10-07 12:25 UTC (permalink / raw)
  To: David Edmondson, notmuch

Hi David,

David Edmondson <dme@dme.org> writes:

> ...here is a very simple filesystem based cache of MIME parts for
> notmuch. It's integrated using defadvice for now, but a cleaner
> approach is obviously possible.

Just to say that this is great, and very much appreciated. There are
some threads I avoided opening (or opened from the cli) because they
started with huge attachments and I didn't feel like waiting.

I used to have something like this in my remote script, but trashed it
when I lost track of the emacs client internals, and wasn't sure anymore
what commands were called for attachments. So I'm very glad you were
moved to write this, and even gladder you posted it.

Best,
Jesse

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

end of thread, other threads:[~2014-10-07 13:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-07  7:53 RFC: notmuch-cache.el: simple caching of MIME parts David Edmondson
2014-10-07  7:57 ` David Edmondson
2014-10-07 12:25   ` Jesse Rosenthal

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

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 read-only IMAP folder(s) and NNTP newsgroup(s).