* [PATCH 0/2] Usability improvements to notmuch-hello
@ 2010-07-27 1:48 Kan-Ru Chen
2010-07-27 1:48 ` [PATCH 1/2] emacs: notmuch-hello: Avoid going to end-of-line in search box Kan-Ru Chen
2010-07-27 1:48 ` [PATCH 2/2] emacs: notmuch-hello: Add "n" and "p" to mod map Kan-Ru Chen
0 siblings, 2 replies; 7+ messages in thread
From: Kan-Ru Chen @ 2010-07-27 1:48 UTC (permalink / raw)
To: notmuch
Hello!
Haven't come here for a long time. I'm bring you some patches that are
useful to me, hope they are useful to you too!
- Kanru
Kan-Ru Chen (2):
emacs: notmuch-hello: Avoid going to end-of-line in search box
emacs: notmuch-hello: Add "n" and "p" to mod map
emacs/notmuch-hello.el | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] emacs: notmuch-hello: Avoid going to end-of-line in search box
2010-07-27 1:48 [PATCH 0/2] Usability improvements to notmuch-hello Kan-Ru Chen
@ 2010-07-27 1:48 ` Kan-Ru Chen
2011-04-16 13:07 ` Pieter Praet
2010-07-27 1:48 ` [PATCH 2/2] emacs: notmuch-hello: Add "n" and "p" to mod map Kan-Ru Chen
1 sibling, 1 reply; 7+ messages in thread
From: Kan-Ru Chen @ 2010-07-27 1:48 UTC (permalink / raw)
To: notmuch
widget-end-of-line checks eolp to decide whether C-e in a fixed size
field should go to the end of the text in the field or the end of
the field itself. So put a trailing white space to pad the search
field.
Previous behavior:
Search: [text _]
Now:
Search: [text_ ]
---
emacs/notmuch-hello.el | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index f8ae332..6ef03bb 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -416,10 +416,10 @@ Complete list of currently available key bindings:
;; Leave some space at the start and end of the
;; search boxes.
:size (max 8 (- (window-width) notmuch-hello-indent
- (length "Search: ")))
+ (length "Search: ") 1 ))
:action (lambda (widget &rest ignore)
(notmuch-hello-search (widget-value widget))))
- (widget-insert "\n")
+ (widget-insert " \n")
(when notmuch-hello-recent-searches
(widget-insert "\nRecent searches: ")
--
1.7.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] emacs: notmuch-hello: Avoid going to end-of-line in search box
2010-07-27 1:48 ` [PATCH 1/2] emacs: notmuch-hello: Avoid going to end-of-line in search box Kan-Ru Chen
@ 2011-04-16 13:07 ` Pieter Praet
0 siblings, 0 replies; 7+ messages in thread
From: Pieter Praet @ 2011-04-16 13:07 UTC (permalink / raw)
To: Kan-Ru Chen, notmuch
On Tue, 27 Jul 2010 09:48:44 +0800, Kan-Ru Chen <kanru@kanru.info> wrote:
> widget-end-of-line checks eolp to decide whether C-e in a fixed size
> field should go to the end of the text in the field or the end of
> the field itself. So put a trailing white space to pad the search
> field.
>
> Previous behavior:
>
> Search: [text _]
>
> Now:
>
> Search: [text_ ]
> ---
> emacs/notmuch-hello.el | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
> index f8ae332..6ef03bb 100644
> --- a/emacs/notmuch-hello.el
> +++ b/emacs/notmuch-hello.el
> @@ -416,10 +416,10 @@ Complete list of currently available key bindings:
> ;; Leave some space at the start and end of the
> ;; search boxes.
> :size (max 8 (- (window-width) notmuch-hello-indent
> - (length "Search: ")))
> + (length "Search: ") 1 ))
> :action (lambda (widget &rest ignore)
> (notmuch-hello-search (widget-value widget))))
> - (widget-insert "\n")
> + (widget-insert " \n")
>
> (when notmuch-hello-recent-searches
> (widget-insert "\nRecent searches: ")
> --
> 1.7.1
>
>
+1
Can't imagine how this has been collecting dust for so long.
Very useful, very concise, and still applies cleanly to HEAD.
Peace
-Pieter
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] emacs: notmuch-hello: Add "n" and "p" to mod map
2010-07-27 1:48 [PATCH 0/2] Usability improvements to notmuch-hello Kan-Ru Chen
2010-07-27 1:48 ` [PATCH 1/2] emacs: notmuch-hello: Avoid going to end-of-line in search box Kan-Ru Chen
@ 2010-07-27 1:48 ` Kan-Ru Chen
2011-04-16 13:26 ` Pieter Praet
1 sibling, 1 reply; 7+ messages in thread
From: Kan-Ru Chen @ 2010-07-27 1:48 UTC (permalink / raw)
To: notmuch
Bind "n" to widget-forward and "p" to widget-backward to unify the
interface since other notmuch major mode also accept "n" and "p" to
navigation.
---
emacs/notmuch-hello.el | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 6ef03bb..7def241 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -294,6 +294,8 @@ should be. Returns a cons cell `(tags-per-line width)'."
(define-key map "=" 'notmuch-hello-update)
(define-key map "G" 'notmuch-hello-poll-and-update)
(define-key map (kbd "<C-tab>") 'widget-backward)
+ (define-key map "n" 'widget-forward)
+ (define-key map "p" 'widget-backward)
(define-key map "m" 'notmuch-mua-mail)
(define-key map "s" 'notmuch-hello-goto-search)
map)
--
1.7.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] emacs: notmuch-hello: Add "n" and "p" to mod map
2010-07-27 1:48 ` [PATCH 2/2] emacs: notmuch-hello: Add "n" and "p" to mod map Kan-Ru Chen
@ 2011-04-16 13:26 ` Pieter Praet
2011-04-18 7:36 ` Xavier Maillard
0 siblings, 1 reply; 7+ messages in thread
From: Pieter Praet @ 2011-04-16 13:26 UTC (permalink / raw)
To: Kan-Ru Chen, notmuch
On Tue, 27 Jul 2010 09:48:45 +0800, Kan-Ru Chen <kanru@kanru.info> wrote:
> Bind "n" to widget-forward and "p" to widget-backward to unify the
> interface since other notmuch major mode also accept "n" and "p" to
> navigation.
> ---
> emacs/notmuch-hello.el | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
> index 6ef03bb..7def241 100644
> --- a/emacs/notmuch-hello.el
> +++ b/emacs/notmuch-hello.el
> @@ -294,6 +294,8 @@ should be. Returns a cons cell `(tags-per-line width)'."
> (define-key map "=" 'notmuch-hello-update)
> (define-key map "G" 'notmuch-hello-poll-and-update)
> (define-key map (kbd "<C-tab>") 'widget-backward)
> + (define-key map "n" 'widget-forward)
> + (define-key map "p" 'widget-backward)
> (define-key map "m" 'notmuch-mua-mail)
> (define-key map "s" 'notmuch-hello-goto-search)
> map)
> --
> 1.7.1
>
>
Sounds logical in theory, but in practice, you'll soon get stuck
spamming "nnnnnpppnwtf" in the search field.
That, and TAB/S-TAB feels more natural.
Thanks to this patch, however, I did stumble upon a bug:
id:"87ei522v4t.fsf@A7GMS.i-did-not-set--mail-host-address--so-tickle-me"
Peace
-Pieter
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] emacs: notmuch-hello: Add "n" and "p" to mod map
2011-04-16 13:26 ` Pieter Praet
@ 2011-04-18 7:36 ` Xavier Maillard
2011-04-18 9:55 ` Pieter Praet
0 siblings, 1 reply; 7+ messages in thread
From: Xavier Maillard @ 2011-04-18 7:36 UTC (permalink / raw)
To: Pieter Praet, Kan-Ru Chen, notmuch
Hi Pieter,
On Sat, 16 Apr 2011 15:26:11 +0200, Pieter Praet <pieter@praet.org> wrote:
> On Tue, 27 Jul 2010 09:48:45 +0800, Kan-Ru Chen <kanru@kanru.info> wrote:
> > Bind "n" to widget-forward and "p" to widget-backward to unify the
> > interface since other notmuch major mode also accept "n" and "p" to
> > navigation.
> > ---
> > emacs/notmuch-hello.el | 2 ++
> > 1 files changed, 2 insertions(+), 0 deletions(-)
> >
> > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
> > index 6ef03bb..7def241 100644
> > --- a/emacs/notmuch-hello.el
> > +++ b/emacs/notmuch-hello.el
> > @@ -294,6 +294,8 @@ should be. Returns a cons cell `(tags-per-line width)'."
> > (define-key map "=" 'notmuch-hello-update)
> > (define-key map "G" 'notmuch-hello-poll-and-update)
> > (define-key map (kbd "<C-tab>") 'widget-backward)
> > + (define-key map "n" 'widget-forward)
> > + (define-key map "p" 'widget-backward)
> > (define-key map "m" 'notmuch-mua-mail)
> > (define-key map "s" 'notmuch-hello-goto-search)
> > map)
> > --
> > 1.7.1
> >
> >
>
>
> Sounds logical in theory, but in practice, you'll soon get stuck
> spamming "nnnnnpppnwtf" in the search field.
>
> That, and TAB/S-TAB feels more natural.
More natural than what exactly ? Anyway, that would not hurt to add 'n'
and 'p' as another way to navigate through widgets in my opinion
(whatsmore that's how customize also works -i.e navigation done both
with TAB/S-TAB and n/p)
/Xavier
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] emacs: notmuch-hello: Add "n" and "p" to mod map
2011-04-18 7:36 ` Xavier Maillard
@ 2011-04-18 9:55 ` Pieter Praet
0 siblings, 0 replies; 7+ messages in thread
From: Pieter Praet @ 2011-04-18 9:55 UTC (permalink / raw)
To: Xavier Maillard, Kan-Ru Chen, notmuch
On Mon, 18 Apr 2011 09:36:45 +0200, Xavier Maillard <xavier@maillard.im> wrote:
> > Sounds logical in theory, but in practice, you'll soon get stuck
> > spamming "nnnnnpppnwtf" in the search field.
> >
> > That, and TAB/S-TAB feels more natural.
>
> More natural than what exactly ? [...]
More natural than n/p (as is the subject of the patch), but that's a
matter of opinion.
> [...] Anyway, that would not hurt to add 'n'
> and 'p' as another way to navigate through widgets in my opinion
> (whatsmore that's how customize also works -i.e navigation done both
> with TAB/S-TAB and n/p)
>
> /Xavier
Again a matter of opinion, but customize isn't exactly a shining example
of a UI, is it ? Not surprising though, considering a general lack of UI
is one of Emacs' most prominent selling points.
And let's face it: Once you get stuck in a text widget, you'll have to
revert to using TAB/S-TAB anyway.
Aside from all that, you're right in that it wouldn't hurt to add them.
Not unless you subscribe to the Suck Less Philosophy [1].
I'd say we've thoroughly established that today's keyword is "opinion",
and I have no reason to disrespect yours, so let's leave it at that :D
Peace
-Pieter
[1] http://suckless.org/manifest/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-04-18 9:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-27 1:48 [PATCH 0/2] Usability improvements to notmuch-hello Kan-Ru Chen
2010-07-27 1:48 ` [PATCH 1/2] emacs: notmuch-hello: Avoid going to end-of-line in search box Kan-Ru Chen
2011-04-16 13:07 ` Pieter Praet
2010-07-27 1:48 ` [PATCH 2/2] emacs: notmuch-hello: Add "n" and "p" to mod map Kan-Ru Chen
2011-04-16 13:26 ` Pieter Praet
2011-04-18 7:36 ` Xavier Maillard
2011-04-18 9:55 ` Pieter Praet
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).