Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 4451F431FDA for ; Sun, 30 Jun 2013 14:15:17 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.098 X-Spam-Level: X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id naruzOdDOP8y for ; Sun, 30 Jun 2013 14:15:10 -0700 (PDT) Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id F2069431FAF for ; Sun, 30 Jun 2013 14:15:09 -0700 (PDT) Received: from smtp.qmul.ac.uk ([138.37.6.40]) by mail2.qmul.ac.uk with esmtp (Exim 4.71) (envelope-from ) id 1UtOxb-00011D-T4; Sun, 30 Jun 2013 22:15:06 +0100 Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost) by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71) (envelope-from ) id 1UtOxb-0002DO-J6; Sun, 30 Jun 2013 22:15:03 +0100 From: Mark Walters To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH v2 2/3] contrib: pick: remove hack notmuch-pick-show-match-message-with-wait In-Reply-To: <87li5rtvbh.fsf@zancas.localnet> References: <1372582512-10777-1-git-send-email-markwalters1009@gmail.com> <1372582512-10777-3-git-send-email-markwalters1009@gmail.com> <87li5rtvbh.fsf@zancas.localnet> User-Agent: Notmuch/0.15.2+192~g8222af3 (http://notmuchmail.org) Emacs/23.4.1 (x86_64-pc-linux-gnu) Date: Sun, 30 Jun 2013 22:15:01 +0100 Message-ID: <87hagf5mi2.fsf@qmul.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Sender-Host-Address: 93.97.24.31 X-QM-SPAM-Info: Sender has good ham record. :) X-QM-Body-MD5: 38c225b8be9042716392fff3aa01a923 (of first 20000 bytes) X-SpamAssassin-Score: 0.0 X-SpamAssassin-SpamBar: / X-SpamAssassin-Report: The QM spam filters have analysed this message to determine if it is spam. We require at least 5.0 points to mark a message as spam. This message scored 0.0 points. Summary of the scoring: * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (markwalters1009[at]gmail.com) * 0.0 AWL AWL: From: address is in the auto white-list X-QM-Scan-Virus: ClamAV says the message is clean X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jun 2013 21:15:17 -0000 Hi Many thanks for the review! On Sun, 30 Jun 2013, David Bremner wrote: > Mark Walters writes: > >> +(defvar notmuch-pick-open-target nil) >> +(make-variable-buffer-local 'notmuch-pick-open-target) > > What do people think about adding a code style suggestion/requirement > for elisp that all variables have docstrings, even if intended for > internal use? It's true the existing code doesn't really meet this > standard. I think this would be a good idea (but see below): I assume this is anything defined with a defvar? >> (defvar notmuch-pick-buffer-name nil) >> (make-variable-buffer-local 'notmuch-pick-buffer-name) >> ;; This variable is the window used for the message pane. It is set >> @@ -349,8 +351,8 @@ Does NOT change the database." >> (notmuch-pick (notmuch-search-find-thread-id) >> notmuch-search-query-string >> nil >> - (notmuch-prettify-subject (notmuch-search-find-subject))) >> - (notmuch-pick-show-match-message-with-wait)) >> + (notmuch-prettify-subject (notmuch-search-find-subject)) >> + t)) > > I think my previous complaint can be reformulated as (essentially) both > notmuch-pick and notmuch-pick-open-target could use (better) docstrings. I will send a patch to add a docstring to the main notmuch-pick function as a reply to this message. The exact style was unclear (we seem to do different things in different places). I am not sure what the best way to document the variable is: there are several variables that are essentially buffer local versions of the arguments passed to notmuch-pick. Should these duplicate the documentation? Exactly the same situation occurs with notmuch-show in notmuch-show.el and notmuch-search in notmuch.el and in both those cases the functions are well documented but the variables are not documented. Any suggestions? Best wishes Mark > As you say, the hack removed is quite horrible, so I'd be willing to > merge the patches anyway. OTOH, more documentation might make it so that > more than one person can understand the notmuch-pick code. > > d