From: Jani Nikula Date: Tue, 28 Oct 2014 17:08:53 +0000 (+0200) Subject: Re: [RFC][PATCH v1] emacs: Improve the behaviour of the 'q' binding. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b316252389cf96247e9113ef1319c939288ac7c5;p=notmuch-archives.git Re: [RFC][PATCH v1] emacs: Improve the behaviour of the 'q' binding. --- diff --git a/65/e4d9842c56eb2da8d9b75c5f9c3ff0648c4bd2 b/65/e4d9842c56eb2da8d9b75c5f9c3ff0648c4bd2 new file mode 100644 index 000000000..04b3ac899 --- /dev/null +++ b/65/e4d9842c56eb2da8d9b75c5f9c3ff0648c4bd2 @@ -0,0 +1,116 @@ +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 1BD9B431FB6 + for ; Tue, 28 Oct 2014 10:09:06 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[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 9flM-YsPu7DS for ; + Tue, 28 Oct 2014 10:08:58 -0700 (PDT) +Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com + [74.125.82.47]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + 3B0F7431FAE for ; Tue, 28 Oct 2014 10:08:58 -0700 + (PDT) +Received: by mail-wg0-f47.google.com with SMTP id a1so1383157wgh.6 + for ; Tue, 28 Oct 2014 10:08:55 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:subject:in-reply-to:references + :user-agent:date:message-id:mime-version:content-type; + bh=ggwORSy8GlNEyGPevIRvfinFNScvO5GPo8s3tywb/XU=; + b=eIUTb+gJvJCvhOUtZf7VVWOZLCdFmU4UgPTrUsP2akCChIC1Yx+N7TFFGi0rC+K42a + C2uUWus48jfU6PcX3fXcuFIWx6ytREXXbtYgomla92VMIxDTA2kkOTwC6TC8AS1kz9Rl + WWQajqmsVNQZx17eCEMgP2kY4qFiy6j4AnenDyN6bxteD3X4QreugDHQzQVQAm4O3Fec + UNpnQThABMWlW2rw8fScwC6KFNO65A2ti1X+Ss6o3xy8O4Inlqg7HEN+gaEArnQ2gn70 + dEBP2r8/66c8R/vThKLNmTKe1r+J2yP0/XxZ2HYh9kpxs1fwobeCq/no767Xxs2wS9Da + VOyA== +X-Gm-Message-State: + ALoCoQnLG2zpI4IASndKU2KGwH51Efc5/EQETDSnsdldqKDSeTgnc9a8MEikDWKYGRolYfpnSiOq +X-Received: by 10.194.205.132 with SMTP id lg4mr5800017wjc.84.1414516135664; + Tue, 28 Oct 2014 10:08:55 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw2-58c36d-48.dhcp.inet.fi. + [88.195.109.48]) + by mx.google.com with ESMTPSA id b6sm2834355wiy.22.2014.10.28.10.08.54 + for + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Tue, 28 Oct 2014 10:08:54 -0700 (PDT) +From: Jani Nikula +To: David Edmondson , notmuch@notmuchmail.org +Subject: Re: [RFC][PATCH v1] emacs: Improve the behaviour of the 'q' binding. +In-Reply-To: +References: +User-Agent: Notmuch/0.18.2+148~g0318cd3 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Tue, 28 Oct 2014 19:08:53 +0200 +Message-ID: <87sii8nmu2.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain +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: Tue, 28 Oct 2014 17:09:06 -0000 + +On Thu, 16 Oct 2014, David Edmondson wrote: +> When a user hits 'q' in a notmuch buffer, kill the buffer only if +> there are no other windows currently showing it. +> --- +> +> This arose from a discussion in #notmuch. Please try it and see if you +> like the new behaviour. + +Yes, very much, thank you. In most cases I want 'q' to only affect the +current window. I like to be able to 'C-x 2' a search view, and have the +two windows work more or less independently. + +BR, +Jani. + + +> +> emacs/notmuch-lib.el | 8 ++++++-- +> 1 file changed, 6 insertions(+), 2 deletions(-) +> +> diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el +> index 1e166c6..bc6f119 100644 +> --- a/emacs/notmuch-lib.el +> +++ b/emacs/notmuch-lib.el +> @@ -240,9 +240,13 @@ depending on the value of `notmuch-poll-script'." +> (call-process notmuch-command nil nil nil "new"))) +> +> (defun notmuch-kill-this-buffer () +> - "Kill the current buffer." +> + "Undisplay the current buffer." +> (interactive) +> - (kill-buffer (current-buffer))) +> + ;; If more than one window is showing this buffer, bury rather than +> + ;; kill it. +> + (if (> (length (get-buffer-window-list nil nil t)) 1) +> + (bury-buffer) +> + (kill-buffer))) +> +> (defun notmuch-documentation-first-line (symbol) +> "Return the first line of the documentation string for SYMBOL." +> -- +> 2.1.1 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch