[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] [debbugs] Add mu4e support.

From: Ricardo Wurmus
Subject: Re: [PATCH] [debbugs] Add mu4e support.
Date: Sun, 07 May 2017 13:45:30 +0200
User-agent: mu4e 0.9.18; emacs 25.2.1

Hi Michael,

> I've played with this. First of all, I had to install mu from
> the source tarball; I didn't find it as package. I've compiled it, there
> were errors in compiling mu and warnings in compiling mu4e. Well, I
> don't care too much; I don't want to use it myself.

I’m using mu 0.9.18 from Guix.

> After applying your patch to debbugs-gnu.el, there are further warnings:
> --8<---------------cut here---------------start------------->8---
> In toplevel form:
> packages/debbugs/debbugs-gnu.el:1346:1:Warning: Unused lexical argument
>     ‘merged’

That’s because “debbugs-read-emacs-bug-with-mu4e” doesn't yet handle
merged bugs.  It will only download messages for the given bug id.

> In debbugs-read-emacs-bug-with-mu4e:
> packages/debbugs/debbugs-gnu.el:1354:27:Warning: reference to free variable
>     ‘mu4e-maildir’

This is defined in mu4e-vars.  How would I mark this as coming from
there without adding a dependency on mu4e?

> packages/debbugs/debbugs-gnu.el:1366:13:Warning: assignment to free variable
>     ‘start’
> packages/debbugs/debbugs-gnu.el:1369:15:Warning: assignment to free variable
>     ‘end’
> packages/debbugs/debbugs-gnu.el:1374:57:Warning: reference to free variable
>     ‘start’
> packages/debbugs/debbugs-gnu.el:1371:21:Warning: reference to free variable
>     ‘end’

I fixed this by defining these variables in the let binding of

> So I've loaded mu4e.el. Now I get the error
> debbugs-read-emacs-bug-with-mu4e: Wrong number of arguments: #[(&optional 
> expr prompt edit ignore-history) "Ä
> The rest of the backtrace cannot be added to this email due to non-ASCII
> characters.

I cannot reproduce this.  What did you do to get this error?

> Some comments to your code:
>> +(defun debbugs-read-emacs-bug-with-mu4e (id status merged)
>> +  "Read email exchange for debbugs bug ID.
>> +STATUS is the bug's status list.
>> +MERGED is the list of bugs merged with this one."
>> +  (let* ((bug-str (number-to-string id))
>> +         (tmpdir  "/tmp")
> Pls use temporary-file-directory.

I’ve replaced this with “make-temp-file”, as per Stefan’s suggestion.

>> +         (mbox    (concat tmpdir "/bug-" bug-str ".mbox"))
>> +         (subdir  (concat "/emacs-debbugs." bug-str))
>> +         (maildir (concat mu4e-maildir subdir)))
>> +    ;; Create temporary maildir structure
>> +    (dolist (dir '("cur" "new" "tmp"))
>> +      (make-directory (concat maildir "/" dir) t))
> Please use expand-file-name where appropriate.

Okay, I’ve made that change.

> Could you, pls, try to fix these problems? And don't forget the
> contribution to debbugs-ug.texi.

I’ve extended the documentation a little.  Before resending the patch,
I’d like to know more about the “wrong number of arguments” bug you got
with “debbugs-read-emacs-bug-with-mu4e”.

Thanks for taking the time to review this!


GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC

reply via email to

[Prev in Thread] Current Thread [Next in Thread]