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 94657431FBC for ; Wed, 18 Nov 2009 06:36:53 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 XsRRfXFzUd6y for ; Wed, 18 Nov 2009 06:36:53 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id D8FDA431FAE for ; Wed, 18 Nov 2009 06:36:52 -0800 (PST) Received: by bwz24 with SMTP id 24so127170bwz.30 for ; Wed, 18 Nov 2009 06:36:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.34.201 with SMTP id m9mr6601936bkd.77.1258555011799; Wed, 18 Nov 2009 06:36:51 -0800 (PST) Date: Wed, 18 Nov 2009 15:36:51 +0100 Message-ID: From: Jan Janak To: notmuch@notmuchmail.org Content-Type: text/plain; charset=UTF-8 Subject: [notmuch] Why is no. of files from count_files reset to 0? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 18 Nov 2009 14:36:53 -0000 Hello, The function count_file returns the total number of files to be processed, the result is then stored in add_files_state.total_files. But that variable is reset back to 0 in notmuch_new_command. When I comment out the following line (before add_files is called): add_files_state.total_files = 0; The progress indicator shows the total number of files to be processed, as well as the time remaining. This is, IMHO, much better, especially if you process a large collection of emails. Is there any reason for having the variable reset to 0 before calling add_files? Thanks! -- Jan