unofficial mirror of notmuch@notmuchmail.org
 help / color / Atom feed
* [PATCH] completion: remove "setup" from the list of possible completions
       [not found] <CGME20200619104051eucas1p1d5d63105518817bc80b55cfc9158ce2f@eucas1p1.samsung.com>
@ 2020-06-19 10:40 ` Łukasz Stelmach
  2020-06-20 10:53   ` Reto
  0 siblings, 1 reply; 9+ messages in thread
From: Łukasz Stelmach @ 2020-06-19 10:40 UTC (permalink / raw)
  To: notmuch; +Cc: Łukasz Stelmach

Having "setup" in the set requires entering three instad of two characters
for "search". Since "setup" is rearly used it makes little sense to have
it in the set and cripple UX for much more frequently used "search".
---
 completion/notmuch-completion.bash | 2 +-
 completion/zsh/_notmuch            | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash
index 15425697..c3654a73 100644
--- a/completion/notmuch-completion.bash
+++ b/completion/notmuch-completion.bash
@@ -579,7 +579,7 @@ _notmuch_tag()
 
 _notmuch()
 {
-    local _notmuch_commands="compact config count dump help insert new reply restore reindex search address setup show tag emacs-mua"
+    local _notmuch_commands="compact config count dump help insert new reply restore reindex search address show tag emacs-mua"
     local arg cur prev words cword split
 
     # require bash-completion with _init_completion
diff --git a/completion/zsh/_notmuch b/completion/zsh/_notmuch
index e920f10b..6c0344cc 100644
--- a/completion/zsh/_notmuch
+++ b/completion/zsh/_notmuch
@@ -7,7 +7,6 @@ _notmuch_command() {
   local -a notmuch_commands
   notmuch_commands=(
     'help:display documentation for a subcommand'
-    'setup:interactively configure notmuch'
 
     'address:output addresses from matching messages'
     'compact:compact the notmuch database'
-- 
2.26.2

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] completion: remove "setup" from the list of possible completions
  2020-06-19 10:40 ` [PATCH] completion: remove "setup" from the list of possible completions Łukasz Stelmach
@ 2020-06-20 10:53   ` Reto
  2020-06-20 14:04     ` Tomi Ollila
       [not found]     ` <CGME20200622102303eucas1p2121610b68b1d23705237632706cb06ab@eucas1p2.samsung.com>
  0 siblings, 2 replies; 9+ messages in thread
From: Reto @ 2020-06-20 10:53 UTC (permalink / raw)
  To: Łukasz Stelmach; +Cc: notmuch

On Fri, Jun 19, 2020 at 12:40:49PM +0200, Łukasz Stelmach wrote:
> Having "setup" in the set requires entering three instad of two characters
> for "search". Since "setup" is rearly used it makes little sense to have
> it in the set and cripple UX for much more frequently used "search".

I very much disagree with this patch.
The completions should contain all possible values, saving a single keystroke is
certainly not a valid reason to remove a valid option from the completions.

Write an alias into your bashrc if that bothers you so much... Then you can save
much more keystrokes.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] completion: remove "setup" from the list of possible completions
  2020-06-20 10:53   ` Reto
@ 2020-06-20 14:04     ` Tomi Ollila
  2020-06-20 19:09       ` Ralph Seichter
       [not found]     ` <CGME20200622102303eucas1p2121610b68b1d23705237632706cb06ab@eucas1p2.samsung.com>
  1 sibling, 1 reply; 9+ messages in thread
From: Tomi Ollila @ 2020-06-20 14:04 UTC (permalink / raw)
  To: Reto, Łukasz Stelmach; +Cc: notmuch

On Sat, Jun 20 2020, reto@labrat.space wrote:

> On Fri, Jun 19, 2020 at 12:40:49PM +0200, Łukasz Stelmach wrote:
>> Having "setup" in the set requires entering three instad of two characters
>> for "search". Since "setup" is rearly used it makes little sense to have
>> it in the set and cripple UX for much more frequently used "search".
>
> I very much disagree with this patch.
> The completions should contain all possible values, saving a single keystroke is
> certainly not a valid reason to remove a valid option from the completions.

I disagree your disagreement, and would.be very much favorable to this
change.

imo.the completions should primarily provide convenience to the interactive
user, to see all possible options (also those seldomly.used) one can use
help and namual pages...

Tomi

>
> Writeuuuuuu an alias into your bashrc if that bothers you so much... Then you can save
> much more keystrokes.
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] completion: remove "setup" from the list of possible completions
  2020-06-20 14:04     ` Tomi Ollila
@ 2020-06-20 19:09       ` Ralph Seichter
  2020-06-23 21:04         ` Tomi Ollila
  0 siblings, 1 reply; 9+ messages in thread
From: Ralph Seichter @ 2020-06-20 19:09 UTC (permalink / raw)
  To: notmuch

* Tomi Ollila:

> imo.the completions should primarily provide convenience to the
> interactive user, to see all possible options (also those
> seldomly.used) one can use help and namual pages...

"Can use" being the operative term, not "should have to use". I would
not want completion to omit certain commands, based on somebody else's
notion of what is convenient, which in turn forces me to use other means
of figuring out a seldom-used command I may or may not be aware of.

If this means entering three characters instead of two, then three
characters it is. Alternatively, make it a configurable option, with
"convenient=false" being the default. I vote against the change.

First world problems... ;-)

-Ralph

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] completion: remove "setup" from the list of possible completions
       [not found]     ` <CGME20200622102303eucas1p2121610b68b1d23705237632706cb06ab@eucas1p2.samsung.com>
@ 2020-06-22 10:22       ` Lukasz Stelmach
  2020-06-24 11:44         ` Peter Wang
  0 siblings, 1 reply; 9+ messages in thread
From: Lukasz Stelmach @ 2020-06-22 10:22 UTC (permalink / raw)
  To: notmuch


[-- Attachment #1.1: Type: text/plain, Size: 1020 bytes --]

It was <2020-06-20 sob 12:53>, when Reto wrote:
> On Fri, Jun 19, 2020 at 12:40:49PM +0200, Łukasz Stelmach wrote:
>> Having "setup" in the set requires entering three instad of two characters
>> for "search". Since "setup" is rearly used it makes little sense to have
>> it in the set and cripple UX for much more frequently used "search".
>
> I very much disagree with this patch.
> The completions should contain all possible values, saving a single keystroke is
> certainly not a valid reason to remove a valid option from the completions.
>
> Write an alias into your bashrc if that bothers you so much... Then you can save
> much more keystrokes.

I already have several aliases covering most of my use cases, however, I
still use "notmuch search" from time to time and I came to a conclusion
expressed in this patch. Of course, as a random user, I can only suggest
and by no means insist on applying it.

Kind regards,
-- 
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] completion: remove "setup" from the list of possible completions
  2020-06-20 19:09       ` Ralph Seichter
@ 2020-06-23 21:04         ` Tomi Ollila
  2020-06-23 22:46           ` Ralph Seichter
  0 siblings, 1 reply; 9+ messages in thread
From: Tomi Ollila @ 2020-06-23 21:04 UTC (permalink / raw)
  To: Ralph Seichter, notmuch

On Sat, Jun 20 2020, Ralph Seichter wrote:

> * Tomi Ollila:
>
>> imo.the completions should primarily provide convenience to the
>> interactive user, to see all possible options (also those
>> seldomly.used) one can use help and namual pages...
>
> "Can use" being the operative term, not "should have to use". I would
> not want completion to omit certain commands, based on somebody else's
> notion of what is convenient, which in turn forces me to use other means
> of figuring out a seldom-used command I may or may not be aware of.
>
> If this means entering three characters instead of two, then three
> characters it is. Alternatively, make it a configurable option, with
> "convenient=false" being the default. I vote against the change.
>
> First world problems... ;-)

Indeed! You're wrong and I am right... ;) unfortunately the margin is too
small and status quo (i.e. what we have now) may prevail.

(well, I haven't even installed the completions -- perhaps I write my own
 zsh completions which will expand 'notmuch s' -> 'notmuch search' ;D) --
 note that I also have no notmuch-* commands in my PATH, so 'notm' expands
 to 'notmuch ' ! \o/ FTW ;)

>
> -Ralph

Tomi (one random user like all of us)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] completion: remove "setup" from the list of possible completions
  2020-06-23 21:04         ` Tomi Ollila
@ 2020-06-23 22:46           ` Ralph Seichter
  0 siblings, 0 replies; 9+ messages in thread
From: Ralph Seichter @ 2020-06-23 22:46 UTC (permalink / raw)
  To: notmuch

* Tomi Ollila:

> You're wrong and I am right... ;)

"I'm sorry, if you were right, I would agree with you." (Dr. M. Sayer) :-)

> note that I also have no notmuch-* commands in my PATH, so 'notm'
> expands to 'notmuch ' ! \o/ FTW ;)

I like aliases like "nme" for "Notmuch in Emacs".

-Ralph

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] completion: remove "setup" from the list of possible completions
  2020-06-22 10:22       ` Lukasz Stelmach
@ 2020-06-24 11:44         ` Peter Wang
  2020-07-02 19:55           ` Daniel Kahn Gillmor
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Wang @ 2020-06-24 11:44 UTC (permalink / raw)
  To: Lukasz Stelmach; +Cc: notmuch

On Mon, 22 Jun 2020 12:22:50 +0200 Lukasz Stelmach <l.stelmach@samsung.com> wrote:
> It was <2020-06-20 sob 12:53>, when Reto wrote:
> > On Fri, Jun 19, 2020 at 12:40:49PM +0200, Łukasz Stelmach wrote:
> >> Having "setup" in the set requires entering three instad of two characters
> >> for "search". Since "setup" is rearly used it makes little sense to have
> >> it in the set and cripple UX for much more frequently used "search".
> >
> > I very much disagree with this patch.
> > The completions should contain all possible values, saving a single keystroke is
> > certainly not a valid reason to remove a valid option from the completions.
> >
> > Write an alias into your bashrc if that bothers you so much... Then you can save
> > much more keystrokes.
> 
> I already have several aliases covering most of my use cases, however, I
> still use "notmuch search" from time to time and I came to a conclusion
> expressed in this patch. Of course, as a random user, I can only suggest
> and by no means insist on applying it.

Another possibility may be to rename "notmuch setup" to "notmuch init",
treating "setup" as a deprecated synonym for "init". The completions
would include "init" but not "setup".

(Just an idea, I don't really care.)

Peter

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] completion: remove "setup" from the list of possible completions
  2020-06-24 11:44         ` Peter Wang
@ 2020-07-02 19:55           ` Daniel Kahn Gillmor
  0 siblings, 0 replies; 9+ messages in thread
From: Daniel Kahn Gillmor @ 2020-07-02 19:55 UTC (permalink / raw)
  To: Peter Wang, Lukasz Stelmach; +Cc: notmuch


[-- Attachment #1.1: Type: text/plain, Size: 2872 bytes --]

On Wed 2020-06-24 21:44:01 +1000, Peter Wang wrote:
> On Mon, 22 Jun 2020 12:22:50 +0200 Lukasz Stelmach <l.stelmach@samsung.com> wrote:
>> It was <2020-06-20 sob 12:53>, when Reto wrote:
>> > On Fri, Jun 19, 2020 at 12:40:49PM +0200, Łukasz Stelmach wrote:
>> >> Having "setup" in the set requires entering three instad of two characters
>> >> for "search". Since "setup" is rearly used it makes little sense to have
>> >> it in the set and cripple UX for much more frequently used "search".
>> >
>> > I very much disagree with this patch.
>> > The completions should contain all possible values, saving a single keystroke is
>> > certainly not a valid reason to remove a valid option from the completions.
>> >
>> > Write an alias into your bashrc if that bothers you so much... Then you can save
>> > much more keystrokes.
>> 
>> I already have several aliases covering most of my use cases, however, I
>> still use "notmuch search" from time to time and I came to a conclusion
>> expressed in this patch. Of course, as a random user, I can only suggest
>> and by no means insist on applying it.
>
> Another possibility may be to rename "notmuch setup" to "notmuch init",
> treating "setup" as a deprecated synonym for "init". The completions
> would include "init" but not "setup".

I sympathize with everyone struggling with the first-world problems in
this thread. :P

If i had to choose between the status quo and Lukasz's suggestion of not
completing "notmuch setup", i'd choose the status quo.

I value having all non-deprecated subcommands show up in tab completion.
This is particularly important for someone who is just starting to use
notmuch, and may use tab completion for discoverability.  If they can't
find the very first expected subcommand to be used in tab completion
exploration, that is pretty weird.

That said, i appreciate Peter's clever attempt to thread the needle.

Unfortunately, changing "setup" to "init" moves "notmuch insert" from
"notmuch i<TAB>" to "notmuch in<TAB>", so you're sort of robbing from
Peter to pay Paul.  And I'm having difficulty coming up with another
good subcommand name with an unambiguous prefix to move "setup" to.

I also note that we have no independent manpage for "notmuch-setup",
it's just symlinked from notmuch.1.gz.

Another "clever" approach to assuage the tab-completion-for-conveience
advocates would be to introduce a (non-deprecated) alias for "search"
that itself would be fewer keystrokes before tab completion (e.g. "srch"
is two keystrokes because "sr" is unambiguous, "query" is just one,
because "q" is unambiguous).

Overall, i value consistency and completeness and i would not like to
see the tab completion be either an inconsistent or incomplete
representation of the options available to the user from the command
line.

    --dkg

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

[-- Attachment #2: Type: text/plain, Size: 158 bytes --]

_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, back to index

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20200619104051eucas1p1d5d63105518817bc80b55cfc9158ce2f@eucas1p1.samsung.com>
2020-06-19 10:40 ` [PATCH] completion: remove "setup" from the list of possible completions Łukasz Stelmach
2020-06-20 10:53   ` Reto
2020-06-20 14:04     ` Tomi Ollila
2020-06-20 19:09       ` Ralph Seichter
2020-06-23 21:04         ` Tomi Ollila
2020-06-23 22:46           ` Ralph Seichter
     [not found]     ` <CGME20200622102303eucas1p2121610b68b1d23705237632706cb06ab@eucas1p2.samsung.com>
2020-06-22 10:22       ` Lukasz Stelmach
2020-06-24 11:44         ` Peter Wang
2020-07-02 19:55           ` Daniel Kahn Gillmor

unofficial mirror of notmuch@notmuchmail.org

Archives are clonable:
	git clone --mirror https://yhetil.org/notmuch/0 notmuch/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 notmuch notmuch/ https://yhetil.org/notmuch \
		notmuch@notmuchmail.org
	public-inbox-index notmuch

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.mail.notmuch.general
	nntp://news.gmane.io/gmane.mail.notmuch.general


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git