* [PATCH] emacs: Usability improvements for `notmuch-hello'.
@ 2010-04-28 11:18 David Edmondson
2010-06-03 23:57 ` Carl Worth
0 siblings, 1 reply; 2+ messages in thread
From: David Edmondson @ 2010-04-28 11:18 UTC (permalink / raw)
To: notmuch
- If no saved searches exist or are displayed, don't signal an error,
- If no saved searches exist or are displayed, leave the cursor in the
search bar,
- Minor layout improvements.
---
emacs/notmuch-hello.el | 36 +++++++++++++++++++-----------------
1 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 6a1c56e..1358387 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -273,7 +273,7 @@ diagonal."
(notmuch-hello-update))
:help-echo "Refresh"
(car (process-lines notmuch-command "count")))
- (widget-insert " messages (that's not much mail).\n\n"))
+ (widget-insert " messages (that's not much mail).\n"))
(let ((found-target-pos nil)
(final-target-pos nil))
@@ -292,7 +292,7 @@ diagonal."
(widest (max saved-widest alltags-widest)))
(when saved-alist
- (widget-insert "Saved searches: ")
+ (widget-insert "\nSaved searches: ")
(widget-create 'push-button
:notify (lambda (&rest ignore)
(customize-variable 'notmuch-saved-searches))
@@ -305,18 +305,16 @@ diagonal."
(setq final-target-pos found-target-pos))
(indent-rigidly start (point) notmuch-hello-indent)))
- (let ((start (point)))
- (widget-insert "\nSearch: ")
- (setq notmuch-hello-search-bar-marker (point-marker))
- (widget-create 'editable-field
- ;; Leave some space at the start and end of the
- ;; search boxes.
- :size (max 8 (- (window-width) (* 2 notmuch-hello-indent)
- (length "Search: ")))
- :action (lambda (widget &rest ignore)
- (notmuch-hello-search (widget-value widget))))
- (widget-insert "\n")
- (indent-rigidly start (point) notmuch-hello-indent))
+ (widget-insert "\nSearch: ")
+ (setq notmuch-hello-search-bar-marker (point-marker))
+ (widget-create 'editable-field
+ ;; Leave some space at the start and end of the
+ ;; search boxes.
+ :size (max 8 (- (window-width) notmuch-hello-indent
+ (length "Search: ")))
+ :action (lambda (widget &rest ignore)
+ (notmuch-hello-search (widget-value widget))))
+ (widget-insert "\n")
(when notmuch-hello-recent-searches
(widget-insert "\nRecent searches: ")
@@ -408,9 +406,13 @@ diagonal."
(widget-setup)
- (goto-char final-target-pos)
- (if (not (widget-at))
- (widget-forward 1)))))
+ (when final-target-pos
+ (goto-char final-target-pos)
+ (unless (widget-at)
+ (widget-forward 1)))
+
+ (unless (widget-at)
+ (notmuch-hello-goto-search)))))
;;;###autoload
(defun notmuch-folder ()
--
1.7.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] emacs: Usability improvements for `notmuch-hello'.
2010-04-28 11:18 [PATCH] emacs: Usability improvements for `notmuch-hello' David Edmondson
@ 2010-06-03 23:57 ` Carl Worth
0 siblings, 0 replies; 2+ messages in thread
From: Carl Worth @ 2010-06-03 23:57 UTC (permalink / raw)
To: David Edmondson, notmuch
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
On Wed, 28 Apr 2010 12:18:32 +0100, David Edmondson <dme@dme.org> wrote:
> - If no saved searches exist or are displayed, don't signal an error,
> - If no saved searches exist or are displayed, leave the cursor in the
> search bar,
> - Minor layout improvements.
Thanks. I've just committed this locally, and unless something shows up
in testing, I plan to push this out soon.
-Carl
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-03 23:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-28 11:18 [PATCH] emacs: Usability improvements for `notmuch-hello' David Edmondson
2010-06-03 23:57 ` Carl Worth
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).