From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id A77616DE0AF4 for ; Thu, 20 Oct 2016 23:39:05 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.103 X-Spam-Level: X-Spam-Status: No, score=-0.103 tagged_above=-999 required=5 tests=[AWL=0.017, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id guyurkpTTMIR for ; Thu, 20 Oct 2016 23:39:04 -0700 (PDT) Received: from mail-lf0-f47.google.com (mail-lf0-f47.google.com [209.85.215.47]) by arlo.cworth.org (Postfix) with ESMTPS id F20636DE0173 for ; Thu, 20 Oct 2016 23:39:03 -0700 (PDT) Received: by mail-lf0-f47.google.com with SMTP id b81so123170902lfe.1 for ; Thu, 20 Oct 2016 23:39:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:cc:references:in-reply-to:mime-version:date :message-id; bh=E0cate2sRmK6sMx8mLXPQJgR7AqP60nGipC8rbQm8oY=; b=fIWGdvhYddf+hqNVhYHvLNJba/DjHUZEGhPaUXwgqVAdzduZwxZD+RI5XOGrvyq/Sz KVr16dcOtl6DpQeAED723qlG1OsfkQK+lAtQUOBddkN1xPO9XOE9fkLB8KIsAADzhik/ RzSLy1eUrQMSyyvXarenkjO32Su7fy+if/Pk+u4ufZNSB/AxBMnVz8+h1EyKnmPH/AAS zlGYom+wBgweyBXKICzD88dHpAlu6erYqSarrBWUF9R6NStJ/ZDTfvFcSlitegRWU9ja JA8C3zzLL4zFcSmm39M6sUpDdWEX5ECTCGB9fK19UDGD52knP+toWizmBpmQSIcmOBMF bsiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:cc:references:in-reply-to :mime-version:date:message-id; bh=E0cate2sRmK6sMx8mLXPQJgR7AqP60nGipC8rbQm8oY=; b=Lol+lvw7wruxDbUt8n2kfqm6ibykj3EKIkoSXho1nW6W4fFh2A1kD1rMsEsoOXKNQ/ K7amOCJsyCE9EQPlq1m8PY0xYPlMdIrWnvFCXnuDz9P98ndLwqV2kexS7RvNH3xZm22M H4TNnTbD8mgZhJS5p+VkjOi4V+w7FM4K8/9n391TL4DLHB8aPH0Hqm3CaB+JMQiLs9VD 5QLaqUJ++BxZ+2b56FV7s40Si9a1QhfPKqW84fx6SI0pS9+fgcTzNSXaXT/GSUnZ7kiA vDxzyHR8RRbSfEtrzOvRn+UnEm5HZ5FbFc0kwldXCAok+Hj3BL1l6n1cjz9pESTmBRhb snDg== X-Gm-Message-State: AA6/9Rn0vIrVmZWuGZNWqsuXnU0qZ4o+qWzIJeLz0vfOXPSlyqWxk8P9Xa3KxU00ev+d4g== X-Received: by 10.28.135.84 with SMTP id j81mr1415421wmd.127.1477031935927; Thu, 20 Oct 2016 23:38:55 -0700 (PDT) Received: from localhost (p579BAAAF.dip0.t-ipconnect.de. [87.155.170.175]) by smtp.gmail.com with ESMTPSA id v4sm2468446wmd.17.2016.10.20.23.38.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Oct 2016 23:38:55 -0700 (PDT) From: Franz Fellner Subject: Re: [PATCH] lib/database.cc: fix misleading indentation To: David Bremner , Tomi Ollila , notmuch@notmuchmail.org Cc: tomi.ollila@iki.fi References: <1474988812-21365-1-git-send-email-tomi.ollila@iki.fi> <1.476.968.079-ner-1.779@TP_L520> <87funrrmqb.fsf@tesseract.cs.unb.ca> <1.476.988.252-ner-1.022@TP_L520> <87h986k2kj.fsf@tethera.net> In-Reply-To: <87h986k2kj.fsf@tethera.net> MIME-Version: 1.0 Date: Fri, 21 Oct 2016 06:42:37 +0000 Message-Id: <1.477.032.157-ner-5.771@TP_L520> Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 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: Fri, 21 Oct 2016 06:39:05 -0000 On Thu, 20 Oct 2016 20:45:00 -0300, David Bremner wrote: > Franz Fellner writes: > > > From a quick visual scan at least half the indented lines start with 4 spaces > > instead of TABS. As I understand the quoted paragraph that should be wrong. > > > > Can you be specific what what lines in what file? I have the feeling > you're misinterpreting something, or looking at a different file. This is from lib/database.cc: const char * _find_prefix (const char *name) { unsigned int i; for (i = 0; i < ARRAY_SIZE (BOOLEAN_PREFIX_INTERNAL); i++) { if (strcmp (name, BOOLEAN_PREFIX_INTERNAL[i].name) == 0) return BOOLEAN_PREFIX_INTERNAL[i].prefix; } for (i = 0; i < ARRAY_SIZE (BOOLEAN_PREFIX_EXTERNAL); i++) { if (strcmp (name, BOOLEAN_PREFIX_EXTERNAL[i].name) == 0) return BOOLEAN_PREFIX_EXTERNAL[i].prefix; } for (i = 0; i < ARRAY_SIZE (PROBABILISTIC_PREFIX); i++) { if (strcmp (name, PROBABILISTIC_PREFIX[i].name) == 0) return PROBABILISTIC_PREFIX[i].prefix; } INTERNAL_ERROR ("No prefix exists for '%s'\n", name); return ""; } I set ":set list" and ":set listchars=tab:>-" to visualize tabs in vim. This shows me * the first two codelines (leaving out empty lines) are indented by 4 spaces * the first line in the first for loop is indented by only one TAB (IMHO should be two, because it is one leven down): this is a pattern you can find throughout the codebase. * the next two lines are indented by four spaces * the first line of the second for-loop is indented by one TAB. * and so on... Am I misinterpreting something here? Is this intended to be done that way? I also get confused by the different lengths of TAB/space-indenting. But probably that's because I never used it...