unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#36922: [PATCH] Add defalias toolbar-mode for tool-bar-mode
@ 2019-08-04 17:41 Stefan Kangas
  2019-08-05  2:23 ` Drew Adams
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Kangas @ 2019-08-04 17:41 UTC (permalink / raw)
  To: 36922

[-- Attachment #1: Type: text/plain, Size: 482 bytes --]

OK, so this is very minor, but:

I can never remember that it's called tool-bar-mode, and not toolbar-mode.  This
is not often an annoyance, but it hits me every time I'm on "emacs -Q" or
similar.  (I type "M-x toolb TAB TAB TAB", have a revelation and then, "DEL -bar
TAB".)

Both "toolbar" and "tool bar" are valid spellings AFAICT.

I suggest to introduce a new (defalias 'toolbar-mode 'tool-bar-mode) to
accommodate users who are used to either spelling.

Thanks,
Stefan Kangas

[-- Attachment #2: 0001-lisp-tool-bar.el-toolbar-mode-New-alias-for-tool-bar.patch --]
[-- Type: application/x-patch, Size: 666 bytes --]

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

* bug#36922: [PATCH] Add defalias toolbar-mode for tool-bar-mode
  2019-08-04 17:41 bug#36922: [PATCH] Add defalias toolbar-mode for tool-bar-mode Stefan Kangas
@ 2019-08-05  2:23 ` Drew Adams
  2019-08-06 11:38   ` Stefan Kangas
  0 siblings, 1 reply; 10+ messages in thread
From: Drew Adams @ 2019-08-05  2:23 UTC (permalink / raw)
  To: Stefan Kangas, 36922

> OK, so this is very minor, but:
> 
> I can never remember that it's called tool-bar-mode, and not toolbar-
> mode.  This
> is not often an annoyance, but it hits me every time I'm on "emacs -Q"
> or
> similar.  (I type "M-x toolb TAB TAB TAB", have a revelation and then,
> "DEL -bar TAB".)
> 
> Both "toolbar" and "tool bar" are valid spellings AFAICT.
> 
> I suggest to introduce a new (defalias 'toolbar-mode 'tool-bar-mode) to
> accommodate users who are used to either spelling.

FWIW, I disagree that we should do this.

We should pick one name and try to stick with it.

We've picked one, I think (`tool-bar').  A quick
count with stuff I've loaded shows ~4 times as many
functions with `tool-bar' in the name as with `toolbar'
in the name.  So yeah, we have both.

For `filename' vs `file-name' in function names, we
have about twice as many of the latter, but, again,
we have both.

That's bad enough.  Now imagine if we started aliasing
all of those.  And toolbar and filename are just the
tip of the iceberg.

Better to be pretty consistent in our names, and IF
(big if) we end up with some inconsistency then
either (1) fix it (renaming, deprecating old names,
creating aliases for backward-compatibility) or (2)
maybe build some tolerance of different forms into
UI functions (e.g. reading function/variable names,
apropos, help commands).

Just one opinion.





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

* bug#36922: [PATCH] Add defalias toolbar-mode for tool-bar-mode
  2019-08-05  2:23 ` Drew Adams
@ 2019-08-06 11:38   ` Stefan Kangas
  2019-09-08 19:40     ` Stefan Kangas
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Kangas @ 2019-08-06 11:38 UTC (permalink / raw)
  To: Drew Adams; +Cc: 36922

Drew Adams <drew.adams@oracle.com> writes:
> > I suggest to introduce a new (defalias 'toolbar-mode 'tool-bar-mode) to
> > accommodate users who are used to either spelling.
>
> FWIW, I disagree that we should do this.
>
> We should pick one name and try to stick with it.

I agree that we should try to be consistent.

> That's bad enough.  Now imagine if we started aliasing
> all of those.  And toolbar and filename are just the
> tip of the iceberg.

Right.  But I'm not suggesting to alias all of them.  I suggest to
make an alias only for one common command.  There already exists
several such convenience aliases in Emacs.

I guess one could argue that it's a slippery slope, and I think there
is some merit to that.  In my opinion, the solution is to be selective
about where to add such aliases.

> Just one opinion.

Thanks for that.

Best regards,
Stefan Kangas





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

* bug#36922: [PATCH] Add defalias toolbar-mode for tool-bar-mode
  2019-08-06 11:38   ` Stefan Kangas
@ 2019-09-08 19:40     ` Stefan Kangas
  2019-09-08 20:43       ` Juri Linkov
  2019-09-09 16:11       ` Eli Zaretskii
  0 siblings, 2 replies; 10+ messages in thread
From: Stefan Kangas @ 2019-09-08 19:40 UTC (permalink / raw)
  To: Drew Adams; +Cc: 36922

Stefan Kangas <stefan@marxist.se> writes:

> Drew Adams <drew.adams@oracle.com> writes:
> > > I suggest to introduce a new (defalias 'toolbar-mode 'tool-bar-mode) to
> > > accommodate users who are used to either spelling.
> >
> > FWIW, I disagree that we should do this.
> >
> > We should pick one name and try to stick with it.
>
> I agree that we should try to be consistent.
>
> > That's bad enough.  Now imagine if we started aliasing
> > all of those.  And toolbar and filename are just the
> > tip of the iceberg.
>
> Right.  But I'm not suggesting to alias all of them.  I suggest to
> make an alias only for one common command.  There already exists
> several such convenience aliases in Emacs.
>
> I guess one could argue that it's a slippery slope, and I think there
> is some merit to that.  In my opinion, the solution is to be selective
> about where to add such aliases.

That was one month ago.  It would be good if we could clarify what to
do here: apply my patch or close this as wontfix?

It would be a nice addition for my usage, but I'm not married to the
idea if no one else likes it.

Best regards,
Stefan Kangas





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

* bug#36922: [PATCH] Add defalias toolbar-mode for tool-bar-mode
  2019-09-08 19:40     ` Stefan Kangas
@ 2019-09-08 20:43       ` Juri Linkov
  2019-09-08 20:57         ` Stefan Kangas
  2019-09-09 16:11       ` Eli Zaretskii
  1 sibling, 1 reply; 10+ messages in thread
From: Juri Linkov @ 2019-09-08 20:43 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 36922

>> > > I suggest to introduce a new (defalias 'toolbar-mode 'tool-bar-mode) to
>> > > accommodate users who are used to either spelling.
>> >
>> > FWIW, I disagree that we should do this.
>> >
>> > We should pick one name and try to stick with it.
>>
>> I agree that we should try to be consistent.
>>
>> > That's bad enough.  Now imagine if we started aliasing
>> > all of those.  And toolbar and filename are just the
>> > tip of the iceberg.
>>
>> Right.  But I'm not suggesting to alias all of them.  I suggest to
>> make an alias only for one common command.  There already exists
>> several such convenience aliases in Emacs.
>>
>> I guess one could argue that it's a slippery slope, and I think there
>> is some merit to that.  In my opinion, the solution is to be selective
>> about where to add such aliases.
>
> That was one month ago.  It would be good if we could clarify what to
> do here: apply my patch or close this as wontfix?
>
> It would be a nice addition for my usage, but I'm not married to the
> idea if no one else likes it.

Oh, the name of the new feature tab-bar was modeled after tool-bar,
so now it should be renamed to tabbar, this doesn't look too nice.

OTOH, there is a tooltip as one word, but in dictionaries it's one word
as well, this is too confusing.





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

* bug#36922: [PATCH] Add defalias toolbar-mode for tool-bar-mode
  2019-09-08 20:43       ` Juri Linkov
@ 2019-09-08 20:57         ` Stefan Kangas
  2019-09-08 21:58           ` Juri Linkov
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Kangas @ 2019-09-08 20:57 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 36922

Juri Linkov <juri@linkov.net> writes:

> Oh, the name of the new feature tab-bar was modeled after tool-bar,
> so now it should be renamed to tabbar, this doesn't look too nice.

I think that should be "tab-bar", since that seems to be the most
common spelling.

I'm not suggesting a rename of "tool-bar" by the way, only a convenience alias.

Best regards,
Stefan Kangas





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

* bug#36922: [PATCH] Add defalias toolbar-mode for tool-bar-mode
  2019-09-08 20:57         ` Stefan Kangas
@ 2019-09-08 21:58           ` Juri Linkov
  2019-09-08 22:16             ` Stefan Kangas
  0 siblings, 1 reply; 10+ messages in thread
From: Juri Linkov @ 2019-09-08 21:58 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 36922

>> Oh, the name of the new feature tab-bar was modeled after tool-bar,
>> so now it should be renamed to tabbar, this doesn't look too nice.
>
> I think that should be "tab-bar", since that seems to be the most
> common spelling.

Indeed preparing good names for completion makes them easier to type.
For example, recently after adding the "tab-bar-mouse" command made harder to
enable "tab-bar-mode" by typing just "tab-b-mo", it doesn't complete anymore.
Also better would be to group all related commands under one prefix,
such as "tab-next", "tab-previous" for easier completion.

> I'm not suggesting a rename of "tool-bar" by the way, only a convenience alias.

Please try to find evidence that more people have the same problem
with completion.  For example, I have in my init file such aliases
that I often mistype, e.g.:

  (defalias 'comapre-windows 'compare-windows)

because "comapre" is easier to type than "compare" on a qwerty keyboard :)

Another solution is to make completion smarter, like when in bash
mistyping a shell command still find it by correcting its name.





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

* bug#36922: [PATCH] Add defalias toolbar-mode for tool-bar-mode
  2019-09-08 21:58           ` Juri Linkov
@ 2019-09-08 22:16             ` Stefan Kangas
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Kangas @ 2019-09-08 22:16 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 36922

Juri Linkov <juri@linkov.net> writes:

> Please try to find evidence that more people have the same problem
> with completion.

I'd love to, but I'm not sure how to find such evidence.  :-)

> For example, I have in my init file such aliases
> that I often mistype, e.g.:
>
>   (defalias 'comapre-windows 'compare-windows)
>
> because "comapre" is easier to type than "compare" on a qwerty keyboard :)

Indeed, I already have the alias in my init file.

Best regards,
Stefan Kangas





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

* bug#36922: [PATCH] Add defalias toolbar-mode for tool-bar-mode
  2019-09-08 19:40     ` Stefan Kangas
  2019-09-08 20:43       ` Juri Linkov
@ 2019-09-09 16:11       ` Eli Zaretskii
  2019-09-09 17:19         ` Stefan Kangas
  1 sibling, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2019-09-09 16:11 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 36922

> From: Stefan Kangas <stefan@marxist.se>
> Date: Sun, 8 Sep 2019 21:40:41 +0200
> Cc: 36922@debbugs.gnu.org
> 
> > Right.  But I'm not suggesting to alias all of them.  I suggest to
> > make an alias only for one common command.  There already exists
> > several such convenience aliases in Emacs.
> >
> > I guess one could argue that it's a slippery slope, and I think there
> > is some merit to that.  In my opinion, the solution is to be selective
> > about where to add such aliases.
> 
> That was one month ago.  It would be good if we could clarify what to
> do here: apply my patch or close this as wontfix?

FWIW, I don't think it's terribly important to have such an alias.  So
if there are people who object, perhaps we shouldn't.  After all,
those who make this mistake frequently can write their private alias,
right?





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

* bug#36922: [PATCH] Add defalias toolbar-mode for tool-bar-mode
  2019-09-09 16:11       ` Eli Zaretskii
@ 2019-09-09 17:19         ` Stefan Kangas
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Kangas @ 2019-09-09 17:19 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 36922

tags 36922 + wontfix
close 36922
quit

Eli Zaretskii <eliz@gnu.org> writes:

> FWIW, I don't think it's terribly important to have such an alias.  So
> if there are people who object, perhaps we shouldn't.  After all,
> those who make this mistake frequently can write their private alias,
> right?

Thanks for taking a decision about this suggestion.

Best regards,
Stefan Kangas





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

end of thread, other threads:[~2019-09-09 17:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-04 17:41 bug#36922: [PATCH] Add defalias toolbar-mode for tool-bar-mode Stefan Kangas
2019-08-05  2:23 ` Drew Adams
2019-08-06 11:38   ` Stefan Kangas
2019-09-08 19:40     ` Stefan Kangas
2019-09-08 20:43       ` Juri Linkov
2019-09-08 20:57         ` Stefan Kangas
2019-09-08 21:58           ` Juri Linkov
2019-09-08 22:16             ` Stefan Kangas
2019-09-09 16:11       ` Eli Zaretskii
2019-09-09 17:19         ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).