~pkal/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
3 2

[PATCH autocrypt.el] Fix flickering in mu4e

Details
Message ID
<20231210173457.1382571-1-sandra.snan@idiomdrottning.org>
DKIM signature
missing
Download raw message
Patch: +6 -4
---
As we talked about on irc://libera.chat/emacs I'm gonna try to pick
this work back up two years later. I've got the FSF papers signed so
that this can go into ELPA.♥

(It took a year to get it from then and then it took me a year to get
back into the mood for working on this kinds of stuff.)

(I'm also more used to working with git and sourcehut, I guess I was
kinda confused back then.)

This first patch is unrelated to what I'm gonna work later and you can
accept it or reject it, either way is fine by me, since I don't use
mu4e and the patches don't conflict. It came about because I fixed
similar flickering in the notmuch version.

 autocrypt-mu4e.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/autocrypt-mu4e.el b/autocrypt-mu4e.el
index 10c6a0b..e5119ac 100644
--- a/autocrypt-mu4e.el
+++ b/autocrypt-mu4e.el
@@ -48,10 +48,12 @@

(defun autocrypt-mu4e--get-header (header)
  "Ask mu4e to return HEADER."
  (save-window-excursion
    (with-current-buffer (mu4e-view-raw-message)
      (prog1 (mail-fetch-field header)
        (kill-buffer (current-buffer))))))
  (let ((path (mu4e-message-field-at-point :path)))
    (unless (and path (file-readable-p path))
      (mu4e-error "Not a readable file: %S" path))
    (with-temp-buffer
      (insert-file-contents path)
      (mail-fetch-field header))))

(provide 'autocrypt-mu4e)

-- 
2.39.2
Details
Message ID
<87plzbqbnw.fsf@ellen.idiomdrottning.org>
In-Reply-To
<20231210173457.1382571-1-sandra.snan@idiomdrottning.org> (view parent)
DKIM signature
missing
Download raw message
Ah! This doesn't work since the hooks are buffer-local in the mu4e
version!
Details
Message ID
<87msufqbhx.fsf@ellen.idiomdrottning.org>
In-Reply-To
<87plzbqbnw.fsf@ellen.idiomdrottning.org> (view parent)
DKIM signature
missing
Download raw message
Uh, never mind, it should work just fine. But some mu4e user 
should test it. I've made a new notmuch version, testing it out 
before sending it.
It'll be in an new thread, not the one from two years ago. It's just a
different implementation all together.
Details
Message ID
<87r0jqm260.fsf@posteo.net>
In-Reply-To
<20231210173457.1382571-1-sandra.snan@idiomdrottning.org> (view parent)
DKIM signature
missing
Download raw message
Sandra Snan <sandra.snan@idiomdrottning.org> writes:

> ---
> As we talked about on irc://libera.chat/emacs I'm gonna try to pick
> this work back up two years later. I've got the FSF papers signed so
> that this can go into ELPA.♥

Great!

> (It took a year to get it from then and then it took me a year to get
> back into the mood for working on this kinds of stuff.)
>
> (I'm also more used to working with git and sourcehut, I guess I was
> kinda confused back then.)
>
> This first patch is unrelated to what I'm gonna work later and you can
> accept it or reject it, either way is fine by me, since I don't use
> mu4e and the patches don't conflict. It came about because I fixed
> similar flickering in the notmuch version.

I don't use it either, not can I quickly test it, so we might ask around
if I can find anyone would want to help out.

>  autocrypt-mu4e.el | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/autocrypt-mu4e.el b/autocrypt-mu4e.el
> index 10c6a0b..e5119ac 100644
> --- a/autocrypt-mu4e.el
> +++ b/autocrypt-mu4e.el
> @@ -48,10 +48,12 @@
>  
>  (defun autocrypt-mu4e--get-header (header)
>    "Ask mu4e to return HEADER."
> -  (save-window-excursion
> -    (with-current-buffer (mu4e-view-raw-message)
> -      (prog1 (mail-fetch-field header)
> -        (kill-buffer (current-buffer))))))
> +  (let ((path (mu4e-message-field-at-point :path)))
> +    (unless (and path (file-readable-p path))
> +      (mu4e-error "Not a readable file: %S" path))
> +    (with-temp-buffer
> +      (insert-file-contents path)
> +      (mail-fetch-field header))))
>  
>  (provide 'autocrypt-mu4e)
Reply to thread Export thread (mbox)