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 C1928429E28 for ; Wed, 25 May 2011 16:09:50 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 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_LOW=-0.7] 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 04JuEO7UsYVR for ; Wed, 25 May 2011 16:09:49 -0700 (PDT) Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com [209.85.161.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 85ACC431FB6 for ; Wed, 25 May 2011 16:09:49 -0700 (PDT) Received: by fxm8 with SMTP id 8so264400fxm.26 for ; Wed, 25 May 2011 16:09:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-type; bh=p+gpt6TC/zSkqROyprqdZ8Gb1fBI+tFR4ZCXe6RyKK4=; b=vAmfh56pfUjuSqnF7uYCLVgF1HCN9FhkhVxZ/ilGlNx3pFmerJC1hKiV08gs9IycUH IZQ8S85bd7Gw29bkjbTOre/GhuOZ0Ca/kbx5eyaLFJiJA1hDYNq5R7AA6zuNx1l395Qf WzF6BmsEEtNcfKnGKduuv0iVYKnxLYTeP1bXM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version:content-type; b=pNxKqdPav6TCl2bW4sbWNXoZ1HWzvkSf83nhLAWCsZkzGEbB5RDc+tcChqW2ufGlwE rQzM9C0LIUTGSH1Hk90n0vOiTxjsdMFWBJj4K15dD/rMWCwMLc7/9hzCAp0+04KKLOtz o/wgEKSIknA/mWRECpAFUxHkgqGqDeUknBGn4= Received: by 10.223.89.134 with SMTP id e6mr144601fam.147.1306364988231; Wed, 25 May 2011 16:09:48 -0700 (PDT) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id l26sm49839fam.45.2011.05.25.16.09.46 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 May 2011 16:09:47 -0700 (PDT) From: Dmitry Kurochkin To: Carl Worth , notmuch@notmuchmail.org Subject: Re: [PATCH 3/5] Fix hiding a message while some citations are shown in notmuch-show view. In-Reply-To: <87lixu9z5b.fsf@yoom.home.cworth.org> References: <1306361416-5019-1-git-send-email-dmitry.kurochkin@gmail.com> <1306361416-5019-4-git-send-email-dmitry.kurochkin@gmail.com> <87oc2qa07g.fsf@yoom.home.cworth.org> <87k4depfyj.fsf@gmail.com> <87lixu9z5b.fsf@yoom.home.cworth.org> User-Agent: Notmuch/0.5-216-g0104e23 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Thu, 26 May 2011 03:10:11 +0400 Message-ID: <87hb8ipeb0.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Wed, 25 May 2011 23:09:50 -0000 On Wed, 25 May 2011 15:46:40 -0700, Carl Worth wrote: > On Thu, 26 May 2011 02:34:28 +0400, Dmitry Kurochkin wrote: > > I am not sure how it is best to test this. The common `printc' method > > for emacs tests does not work, because it prints invisible parts as > > well. We need either to find a way to print only visible text on the > > console, or test it inside emacs somehow. Any suggestions? > > Unfortunately, I don't have a good plan here. I delayed implementing any > automated testing at all of the emacs interface precisely because of > this problem. It's seems to me that surely emacs must have some built-in > mechanism for copying the visible portion of a block of text, but I've > not been able to find it. > Me too. > We could do something cheesy (and slow) by marching through the buffer > character-by-character in elisp and testing for visibility, but the > emacs tests are already the slowest part of "make test"[*] so that would > be obnoxious. > Indeed. > > Note that this is exactly the patch that hits the isearch emacs bug. Do > > I understand correctly that you are ready to push the series despite of > > it (given that we have a test)? > > Breaking isearch would be really unfortunate. That's a really nice > feature of the emacs frontend currently. > > So I would notice that breakage, (while I've apparently never before > noticed the breakage of having visible citations in a hidden message). > > So no, I'm not saying I'm ready to push the series while emacs is broken. > Well, emacs trunk is not broken :) The bug is in lisp code, so you can fix it in .emacs by redefining `isearch-range-invisible' function. I do that now. I do not think I will make myself work on the test until it is likely to be pushed. I will try to not to forget about it, so sometime later I may be back to it :) Please consider pushing other patches from the series. They do not fix any bug, but do simplify the code. The last patch uses list for invisible overlay property as well. But it does not break isearch because we do not search in hidden messages. BTW would be nice to have a set of known-to-fail tests, i.e. bugs that are not fixed yet. If we had it, the above test could be implemented and committed before we have the fix pushed. > -Carl > > [*] Maybe the performance of the emacs testing could be significantly > improved by sharing a single invocation of emacs? Perhaps this wouldn't > even be hard by just using emacsclient? > This is possible as long as tests do not affect each other. Would be a nice improvement. Regards, Dmitry