Re: [PATCH 1/3] emacs: bind "s" to `notmuch-search' in notmuch-hello buffer
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Tue, 17 Jan 2012 21:29:36 +0000 (01:29 +0400)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:42:30 +0000 (09:42 -0800)
70/d1bb3ac3e72f83b71b26288bb6134dbb02edb0 [new file with mode: 0644]

diff --git a/70/d1bb3ac3e72f83b71b26288bb6134dbb02edb0 b/70/d1bb3ac3e72f83b71b26288bb6134dbb02edb0
new file mode 100644 (file)
index 0000000..c090212
--- /dev/null
@@ -0,0 +1,182 @@
+Return-Path: <dmitry.kurochkin@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 0996F42119B\r
+       for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 13:30:34 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id Wd+KwU1j+yKp for <notmuch@notmuchmail.org>;\r
+       Tue, 17 Jan 2012 13:30:33 -0800 (PST)\r
+Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com\r
+       [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id DE4E9421192\r
+       for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 13:30:32 -0800 (PST)\r
+Received: by bkty12 with SMTP id y12so996579bkt.26\r
+       for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 13:30:31 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
+       :mime-version:content-type;\r
+       bh=wJX0rmKqD8TmKETlndtWRe+e763RvPtwGs4fyo20GeQ=;\r
+       b=r2aQq7zdUvL2d3XB1mTtDACcMdz0HTJIxCs+FAbCjQCH0JgbI9oFMdsiGM579m8Sou\r
+       Q1oJ10IobBRSAJzhYiA/WP6z7eFW348jOUvudYT0Osc59bW/0eDO0kjvUOaQsUzaMZAl\r
+       nLlOO69tn8qgBcqzw4JPOnTM9h2JJEjcMfAOo=\r
+Received: by 10.204.10.65 with SMTP id o1mr7341616bko.19.1326835831639;\r
+       Tue, 17 Jan 2012 13:30:31 -0800 (PST)\r
+Received: from localhost ([91.144.186.21])\r
+       by mx.google.com with ESMTPS id d23sm49807712bkw.15.2012.01.17.13.30.30\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Tue, 17 Jan 2012 13:30:31 -0800 (PST)\r
+From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 1/3] emacs: bind "s" to `notmuch-search' in notmuch-hello\r
+       buffer\r
+In-Reply-To: <874nvukort.fsf@nikula.org>\r
+References: <1326828850-8519-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+       <874nvukort.fsf@nikula.org>\r
+User-Agent: Notmuch/0.11+73~g8a5402e (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Wed, 18 Jan 2012 01:29:36 +0400\r
+Message-ID: <87mx9mvwzj.fsf@gmail.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 17 Jan 2012 21:30:34 -0000\r
+\r
+[of course I sent this email privately, sorry for duplicates]\r
+\r
+On Tue, 17 Jan 2012 23:22:30 +0200, Jani Nikula <jani@nikula.org> wrote:\r
+> On Tue, 17 Jan 2012 23:34:08 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:\r
+> > Before the change, "s" in notmuch-hello buffer would jump to the\r
+> > search box.  The patch changes the binding to `notmuch-search' which\r
+> > is consistent with all other notmuch buffers.\r
+> > ---\r
+> >  emacs/notmuch-hello.el |   19 ++++++-------------\r
+> >  1 files changed, 6 insertions(+), 13 deletions(-)\r
+> > \r
+> > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
+> > index 02017ce..08fcd22 100644\r
+> > --- a/emacs/notmuch-hello.el\r
+> > +++ b/emacs/notmuch-hello.el\r
+> > @@ -29,9 +29,6 @@\r
+> >  (declare-function notmuch-search "notmuch" (query &optional oldest-first target-thread target-line continuation))\r
+> >  (declare-function notmuch-poll "notmuch" ())\r
+> >  \r
+> > -(defvar notmuch-hello-search-bar-marker nil\r
+> > -  "The position of the search bar within the notmuch-hello buffer.")\r
+> > -\r
+> >  (defcustom notmuch-recent-searches-max 10\r
+> >    "The number of recent searches to store and display."\r
+> >    :type 'integer\r
+> > @@ -321,11 +318,6 @@ should be. Returns a cons cell `(tags-per-line width)'."\r
+> >    (widget-insert "\n"))\r
+> >      found-target-pos))\r
+> >  \r
+> > -(defun notmuch-hello-goto-search ()\r
+> > -  "Put point inside the `search' widget."\r
+> > -  (interactive)\r
+> > -  (goto-char notmuch-hello-search-bar-marker))\r
+> \r
+> After this, what would the user have to do to bind some key to put the\r
+> point in the search box? If someone wants to restore old behaviour for\r
+> themselves.\r
+> \r
+\r
+There is no way to do that.  From the previous discussions, I do not\r
+remember anyone wanted the current "s" jumping behavior.  Let's wait for\r
+some feedback and see if anyone wants that.  I would prefer to remove\r
+this function and the global variable it uses.\r
+\r
+> Also, it's perhaps out of scope for this patch, but it will become more\r
+> evident now that notmuch-search does not respect\r
+> notmuch-search-oldest-first when called without parameters like the new\r
+> 's' keybinding does. This is the same in search view.\r
+> \r
+\r
+I agree that this is an issue.  But it is outisde of the scope of this\r
+patch series.\r
+\r
+Regards,\r
+  Dmitry\r
+\r
+> \r
+> BR,\r
+> Jani.\r
+> \r
+> \r
+> > -\r
+> >  (defimage notmuch-hello-logo ((:type png :file "notmuch-logo.png")))\r
+> >  \r
+> >  (defun notmuch-hello-search-continuation()\r
+> > @@ -355,7 +347,7 @@ should be. Returns a cons cell `(tags-per-line width)'."\r
+> >      (define-key map "G" 'notmuch-hello-poll-and-update)\r
+> >      (define-key map (kbd "<C-tab>") 'widget-backward)\r
+> >      (define-key map "m" 'notmuch-mua-new-mail)\r
+> > -    (define-key map "s" 'notmuch-hello-goto-search)\r
+> > +    (define-key map "s" 'notmuch-search)\r
+> >      map)\r
+> >    "Keymap for \"notmuch hello\" buffers.")\r
+> >  (fset 'notmuch-hello-mode-map notmuch-hello-mode-map)\r
+> > @@ -468,7 +460,8 @@ Complete list of currently available key bindings:\r
+> >        (widget-insert " messages.\n"))\r
+> >  \r
+> >      (let ((found-target-pos nil)\r
+> > -    (final-target-pos nil))\r
+> > +    (final-target-pos nil)\r
+> > +    (search-bar-pos))\r
+> >        (let* ((saved-alist\r
+> >          ;; Filter out empty saved searches if required.\r
+> >          (if notmuch-show-empty-saved-searches\r
+> > @@ -500,7 +493,7 @@ Complete list of currently available key bindings:\r
+> >        (indent-rigidly start (point) notmuch-hello-indent)))\r
+> >  \r
+> >    (widget-insert "\nSearch: ")\r
+> > -  (setq notmuch-hello-search-bar-marker (point-marker))\r
+> > +  (setq search-bar-pos (point-marker))\r
+> >    (widget-create 'editable-field\r
+> >                   ;; Leave some space at the start and end of the\r
+> >                   ;; search boxes.\r
+> > @@ -589,7 +582,7 @@ Complete list of currently available key bindings:\r
+> >    (when notmuch-saved-searches\r
+> >      (widget-insert "Edit saved searches with the `edit' button.\n"))\r
+> >    (widget-insert "Hit RET or click on a saved search or tag name to view matching threads.\n")\r
+> > -  (widget-insert "`=' refreshes this screen. `s' jumps to the search box. `q' to quit.\n")\r
+> > +  (widget-insert "`=' refreshes this screen. `s' to search messages. `q' to quit.\n")\r
+> >    (let ((fill-column (- (window-width) notmuch-hello-indent)))\r
+> >      (center-region start (point))))\r
+> >  \r
+> > @@ -601,7 +594,7 @@ Complete list of currently available key bindings:\r
+> >      (widget-forward 1)))\r
+> >  \r
+> >        (unless (widget-at)\r
+> > -  (notmuch-hello-goto-search))))\r
+> > +  (goto-char search-bar-pos))))\r
+> >  \r
+> >    (run-hooks 'notmuch-hello-refresh-hook))\r
+> >  \r
+> > -- \r
+> > 1.7.8.3\r
+> > \r
+> > _______________________________________________\r
+> > notmuch mailing list\r
+> > notmuch@notmuchmail.org\r
+> > http://notmuchmail.org/mailman/listinfo/notmuch\r