From 22dfe717c37d393783d40f57e23aa133a54c6c69 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Fri, 30 Nov 2012 08:21:26 +0000 Subject: [PATCH] [PATCH 0/5] emacs: make tab completion use visible tags --- 14/f58e93dcea1c99e1ca2ea2389f57bccdc19725 | 102 ++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 14/f58e93dcea1c99e1ca2ea2389f57bccdc19725 diff --git a/14/f58e93dcea1c99e1ca2ea2389f57bccdc19725 b/14/f58e93dcea1c99e1ca2ea2389f57bccdc19725 new file mode 100644 index 000000000..a6893c44d --- /dev/null +++ b/14/f58e93dcea1c99e1ca2ea2389f57bccdc19725 @@ -0,0 +1,102 @@ +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 96112431FBC + for ; Fri, 30 Nov 2012 00:23:18 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 2.7 +X-Spam-Level: ** +X-Spam-Status: No, score=2.7 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, + FREEMAIL_REPLY=2.499, 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 v2Uq5cT9PeQY for ; + Fri, 30 Nov 2012 00:23:18 -0800 (PST) +Received: from mail-we0-f181.google.com (mail-we0-f181.google.com + [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id F4038431FAF + for ; Fri, 30 Nov 2012 00:23:17 -0800 (PST) +Received: by mail-we0-f181.google.com with SMTP id t11so77850wey.26 + for ; Fri, 30 Nov 2012 00:23:15 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id:x-mailer; + bh=71VN7hjCim4P1dYPNDWY6YWGiRiSOlQc1A1jfQSjZrE=; + b=zysjz7DxcT5vxHOB3DqFSCD0rR12eFgQBs6W9oArbNBDDy3jzoGnc/hdyfyItDbfbv + yVGNwmVGRJTsZ6/ANU4qg70LyJyqJdfCuix4ovKeo+nwIHCtPsV8lgnwoRF++UJxh5AR + ol3ZkFP2d/3KHmwS3pwF5pqndm0v8zDSc8QCEndz8hiV2kRr95ljdSCvjvM2Md8L/hsy + lWE4eBiSvj62uuuxTtjdpSULMaFRTVyjUhL0Eg6ObLj1K4DT4H34aJZArB9xfbX0mAf1 + EPJmvB2T/HCtQuAh1vmVHR+6EmB432WsoW5f4wquwCH98FQmF3RIgmLkV1PZ7RUp8zl6 + TtWA== +Received: by 10.216.28.8 with SMTP id f8mr151196wea.162.1354263795462; + Fri, 30 Nov 2012 00:23:15 -0800 (PST) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPS id d9sm14727234wiw.0.2012.11.30.00.23.13 + (version=TLSv1/SSLv3 cipher=OTHER); + Fri, 30 Nov 2012 00:23:14 -0800 (PST) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH 0/5] emacs: make tab completion use visible tags +Date: Fri, 30 Nov 2012 08:21:26 +0000 +Message-Id: <1354263691-19715-1-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +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, 30 Nov 2012 08:23:18 -0000 + +Currently when doing tab completion emacs queries the database and +completes to any tag when adding but only completes to tags that are +present in the message/thread/region when removing. However, since it +queries the database it does this based on the current tags in the +database not the current tags shown in the search view. + +This means that tag completion is not predictable and this seems +undesirable. This series modifies it so that the tag caller can +specify the possible completions (typically based on the tags that it +believes are present). This means that the user know that -un +will complete to -unread if he can see unread in the messages +tags. (unread is a common stale tag as when you quit from a show +buffer back to the search buffer the unread has often been removed). + +One side effect is that it solves the `large search' problem when +doing tag completion on the very large queries that will be generated +by the move to tagging by message-id rather than thread-id. +id:1353763256-32336-1-git-send-email-markwalters1009@gmail.com +(The tagging can use the batch tagging when that goes in). + +I think this makes the user interface more predictable/consistent but +whether it is worth the change is less clear. + +Best wishes + +Mark + +markwalters1009 (5): + emacs: move tag.el utility functions from lists to strings + emacs: allow the tag caller to specify possible completions. + emacs: notmuch.el remove duplicate tags from get-tags-region + emacs: make search tag completion use the tags it believes are there + emacs: show tag completion + + emacs/notmuch-show.el | 32 +++++++++++++++++++++++++------- + emacs/notmuch-tag.el | 38 +++++++++++++++++++++++++++----------- + emacs/notmuch.el | 10 ++++++---- + 3 files changed, 58 insertions(+), 22 deletions(-) + +-- +1.7.9.1 + -- 2.26.2