From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ricardo Wurmus Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] [debbugs] Add mu4e support. Date: Sun, 07 May 2017 13:45:30 +0200 Message-ID: <87inlchov9.fsf@elephly.net> References: <87y3ursale.fsf@elephly.net> <87r30cwtty.fsf@detlef> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1494157548 12414 195.159.176.226 (7 May 2017 11:45:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 7 May 2017 11:45:48 +0000 (UTC) User-Agent: mu4e 0.9.18; emacs 25.2.1 Cc: emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 07 13:45:43 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7KdD-00039e-DD for ged-emacs-devel@m.gmane.org; Sun, 07 May 2017 13:45:43 +0200 Original-Received: from localhost ([::1]:54580 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7KdI-0003j4-Tf for ged-emacs-devel@m.gmane.org; Sun, 07 May 2017 07:45:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7KdC-0003il-SZ for emacs-devel@gnu.org; Sun, 07 May 2017 07:45:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7Kd8-0007ah-P9 for emacs-devel@gnu.org; Sun, 07 May 2017 07:45:42 -0400 Original-Received: from sender-of-o51.zoho.com ([135.84.80.216]:21090) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d7Kd8-0007aF-Hf for emacs-devel@gnu.org; Sun, 07 May 2017 07:45:38 -0400 Original-Received: from localhost (port-92-200-17-209.dynamic.qsc.de [92.200.17.209]) by mx.zohomail.com with SMTPS id 1494157533259751.03530949588; Sun, 7 May 2017 04:45:33 -0700 (PDT) In-reply-to: <87r30cwtty.fsf@detlef> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC X-ZohoMailClient: External X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 135.84.80.216 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:214662 Archived-At: Hi Michael, > I've played with this. First of all, I had to install mu 0.9.9.5 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 “debbugs-read-emacs-bug-with-mu4e”. > 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! -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net