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 C1F21431FB6 for ; Sat, 27 Apr 2013 19:00:48 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.099 X-Spam-Level: X-Spam-Status: No, score=-0.099 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001] 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 ajwqkkMv58fC for ; Sat, 27 Apr 2013 19:00:46 -0700 (PDT) Received: from mail-pd0-f180.google.com (mail-pd0-f180.google.com [209.85.192.180]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id B8C25431FAF for ; Sat, 27 Apr 2013 19:00:46 -0700 (PDT) Received: by mail-pd0-f180.google.com with SMTP id u10so3062894pdi.39 for ; Sat, 27 Apr 2013 19:00:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:message-id:from:to:cc:subject:in-reply-to :references:mime-version:content-type:content-disposition :content-transfer-encoding; bh=WxGbjGl445yJHmaVcqGL+UgZ5ZZm+x1K0DugwLzJ9K8=; b=XAgFpXmeR1COynrIgXp1mipQT7EJEiN8HctCunMjzcqPVrge49YlYBk7rAkwxMU37E Rx+hHY8fPnT9MicfszPlKhaQ02zFF6xfA1Jx4pFkyFot5GsXUtLjJQ4IKK/Uap1W0p8L E9zR8po+YlUG7XVtqK+reNfu1M8rAsmRwd0R0Juz7RIn1YztbnCWzOFcAMqqJhNKHOrt LJ+dAwutvqhQiB0J2prnTIUAsFdG2x1P1tMbUm+3z4Nu/CAkpRHMgDIrt+1W7EORPKYF ia9HAj8hOYrWIN6oIN9DSB2AuJ/i78/+Wp0zz/RdT0G3g+0lLwJXCQKYfkJ0TfTrDTip GFLg== X-Received: by 10.66.192.195 with SMTP id hi3mr36535004pac.61.1367114444750; Sat, 27 Apr 2013 19:00:44 -0700 (PDT) Received: from localhost (215.42.233.220.static.exetel.com.au. [220.233.42.215]) by mx.google.com with ESMTPSA id sg4sm146755pbc.7.2013.04.27.19.00.41 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 27 Apr 2013 19:00:43 -0700 (PDT) Date: Sun, 28 Apr 2013 12:00:38 +1000 Message-ID: <20130428120038.GA2154@hili.localdomain> From: Peter Wang To: Jani Nikula Subject: Re: [PATCH v5 07/12] insert: add --folder option In-Reply-To: <87zjwjpslc.fsf@nikula.org> References: <1364942517-6982-1-git-send-email-novalazy@gmail.com> <1364942517-6982-8-git-send-email-novalazy@gmail.com> <87zjwjpslc.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Cc: notmuch@notmuchmail.org 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, 28 Apr 2013 02:00:48 -0000 On Sun, 28 Apr 2013 00:32:47 +0300, Jani Nikula wrote: > > + notmuch_opt_desc_t options[] = { > > + { NOTMUCH_OPT_STRING, &folder, "folder", 0, 0 }, > > + { NOTMUCH_OPT_END, 0, 0, 0, 0 } > > + }; > > + > > + opt_index = parse_arguments (argc, argv, options, 1); > > + > > + if (opt_index < 0) { > > + fprintf (stderr, "Error: bad argument to notmuch insert: %s\n", > > + argv[-opt_index]); > > I'm too tired to check what's correct, but argv[-opt_index] isn't. Nice catch. I'll just delete that message as parse_arguments already prints a message, like other callers. Peter