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 2D2B0416372 for ; Fri, 24 Feb 2012 15:34:49 -0800 (PST) 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 TK2lRSMiuQ0v for ; Fri, 24 Feb 2012 15:34:48 -0800 (PST) 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 2CC29415E5E for ; Fri, 24 Feb 2012 15:34:48 -0800 (PST) Received: from smtp.qmul.ac.uk ([138.37.6.40]) by mail2.qmul.ac.uk with esmtp (Exim 4.71) (envelope-from ) id 1S14ex-00006a-Kl; Fri, 24 Feb 2012 23:34:44 +0000 Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223] helo=localhost) by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1S14ex-0003DS-7Y; Fri, 24 Feb 2012 23:34:43 +0000 From: Mark Walters To: Tomi Ollila , notmuch@notmuchmail.org Subject: Re: [RFC PATCH 1/3] emacs: selection-menu.el In-Reply-To: <1330009817-24148-1-git-send-email-tomi.ollila@iki.fi> References: <1330009817-24148-1-git-send-email-tomi.ollila@iki.fi> User-Agent: Notmuch/0.11.1+229~g7cd7c51 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu) Date: Fri, 24 Feb 2012 23:36:23 +0000 Message-ID: <874nufx0qw.fsf@qmul.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Sender-Host-Address: 94.192.233.223 X-QM-SPAM-Info: Sender has good ham record. :) X-QM-Body-MD5: 254baf6701727128a9dc47f10bc6b86b (of first 20000 bytes) X-SpamAssassin-Score: -1.8 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 -1.8 points. Summary of the scoring: * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [138.37.6.40 listed in list.dnswl.org] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (markwalters1009[at]gmail.com) * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * 0.5 AWL AWL: From: address is in the auto white-list X-QM-Scan-Virus: ClamAV says the message is clean Cc: Tomi Ollila 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: Fri, 24 Feb 2012 23:34:49 -0000 On Thu, 23 Feb 2012 17:10:15 +0200, Tomi Ollila wrote: > RFC/Idea for "improving" some selections made (in notmuch or elsewhere) > In the hope that this will be useful, and to get some improvement advice. > > I've found it somewhat difficult to use completing-read (i also tried ido-) > to complete email addresses for mail recipients (not only due to the > large selection of choises provided by nottoomuch-addresses.sh ;) > and have tried to find alternatives. > > The buffer selection systems (electric-buffer-list, bs-show, etc) have been > pretty useful but I haven't found anything general. > > After some 3 iterations I've come up with something like those but for > arbitraty strings and so-far named that tool 'selection-menu' > > This works by popping up buffer with all the choices shown in separate > lines. arrow keys (and c-p/c-n) can be used to choose string and > RET/SPC to select that. Any other key will abort the selection (ESC > mentioned spesifically as it never "unreads" any events). > > If requested user not choosing anything but pressing some key that > key is "unread" so that the parent buffer will get it. I did that > as in first tests I wanted to continue writing If I did not choose > anything... More tests will show If really didn't want to loose that > event). Hi I have played with this and I like the feel of it: it is much more informative than completing-read and much less cluttered than ido-completing-read. I have some queries though: In some uses the user might want to choose something that is not offered (not relevant for this particular use, but maybe relevant for other notmuch uses like selecting a from address). Is this a design choice? I think I would like to be able to type in the buffer it shows, e.g. page down to page through lots of addresses, maybe ctrl-s for searching. Another possibility would be for the selection to narrow as extra characters are typed. Though in fact maybe your choice of leaving the character is exactly right: then the caller can take the extra character and call selection-menu again. (I had something which almost worked and it seemed quite nice). Finally, does this solution mean there is no "history" available? Best wishes Mark