Control: -1 patch

Joerg Jaspert <[email protected]> writes:

> Package: notmuch-emacs
> Version: 0.28-2~bpo9+1
> Severity: normal
>
> Dear Maintainer,
>
>      (setq notmuch-print-mechanism 'notmuch-print-muttprint/evince)
>
> and then pressing # while having a mail displayed leads to an evince
> that displays a plenty unhelpful message about not being allowed to open
> the file file:///tmp/dir/notmuch$RANDOM
>
> Looking at the file, it has nice rights so i am allowed to open it. file
> on it reports it as postscript. But silly evince hates it. mv to the
> rescue: Put a ".ps" at the end and boo, evince opens it all fine.
>
> Guess you want to adjust the tempfile name...

Hi Ganneff;

Thanks for the detailed report. I think the following fixes it. I want to
take a look for similar problems in the other print methods, then I'll
do an upload.  If you have the unpacked source, you can test by applying
this patch, and run ./devel/try-emacs-mua

diff --git a/emacs/notmuch-print.el b/emacs/notmuch-print.el
index bca759fa..fbc60ce5 100644
--- a/emacs/notmuch-print.el
+++ b/emacs/notmuch-print.el
@@ -82,7 +82,7 @@ Optional OUTPUT allows passing a list of flags to muttprint."
 
 (defun notmuch-print-muttprint/evince (msg)
   "Preview a message buffer using muttprint and evince."
-  (let ((ps-file (make-temp-file "notmuch")))
+  (let ((ps-file (make-temp-file "notmuch" nil ".ps")))
     (notmuch-print-run-muttprint (list "--printer" (concat "TO_FILE:" 
ps-file)))
     (notmuch-print-run-evince ps-file)))
 

Reply via email to