unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#58150: 29.0.50; parse_tool_bar_item should not usually upcase "and"
@ 2022-09-28 20:02 Sean Whitton
  2022-09-28 20:38 ` Sean Whitton
  0 siblings, 1 reply; 8+ messages in thread
From: Sean Whitton @ 2022-09-28 20:02 UTC (permalink / raw)
  To: 58150

Hello,

In a Gnus summary buffer, there is a toolbar button "Reply And Yank".

It should be labelled "Reply and Yank" (or "Reply and yank").

The call to upcase-initials in parse_tool_bar_item in keyboard.c is
responsible.  How about adding an exception for the word "and"?  It's
pretty jarring to see on the toolbar.

-- 
Sean Whitton





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

* bug#58150: 29.0.50; parse_tool_bar_item should not usually upcase "and"
  2022-09-28 20:02 bug#58150: 29.0.50; parse_tool_bar_item should not usually upcase "and" Sean Whitton
@ 2022-09-28 20:38 ` Sean Whitton
  2022-09-29 11:02   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Sean Whitton @ 2022-09-28 20:38 UTC (permalink / raw)
  To: 58150

Hello,

On Wed 28 Sep 2022 at 01:02PM -07, Sean Whitton wrote:

> In a Gnus summary buffer, there is a toolbar button "Reply And Yank".
>
> It should be labelled "Reply and Yank" (or "Reply and yank").
>
> The call to upcase-initials in parse_tool_bar_item in keyboard.c is
> responsible.  How about adding an exception for the word "and"?  It's
> pretty jarring to see on the toolbar.

There is also "Edit From Gnus" which should be "Exit from Gnus".

One possibility is a defcustom to only upcase the very first character.
Maybe it should even be t by default: this will produce more correct
results than the current scheme.

-- 
Sean Whitton





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

* bug#58150: 29.0.50; parse_tool_bar_item should not usually upcase "and"
  2022-09-28 20:38 ` Sean Whitton
@ 2022-09-29 11:02   ` Lars Ingebrigtsen
  2022-09-29 12:58     ` Eli Zaretskii
  2022-09-29 22:43     ` Sean Whitton
  0 siblings, 2 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-29 11:02 UTC (permalink / raw)
  To: Sean Whitton; +Cc: 58150

Sean Whitton <spwhitton@spwhitton.name> writes:

> One possibility is a defcustom to only upcase the very first character.
> Maybe it should even be t by default: this will produce more correct
> results than the current scheme.

I think the upcasing should be removed, and the tool bar labels should
be capitalised properly to begin with.  That requires somebody to do a
review of this first, and fix the tool bar definitions, though.  Like:

    (define-key map [isearch-occur]
      (list 'menu-item "Show hits" 'isearch-occur
            :help "Show each search hit"
            :image '(isearch-tool-bar-image "index")))

Should be "Show Hits" etc.

Otherwise somebody could, of course, just write a function that
capitalises titles correctly according to one or other of the English
title capitalisation standards -- which isn't difficult, and would be
generally useful.





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

* bug#58150: 29.0.50; parse_tool_bar_item should not usually upcase "and"
  2022-09-29 11:02   ` Lars Ingebrigtsen
@ 2022-09-29 12:58     ` Eli Zaretskii
  2022-09-30 12:34       ` Lars Ingebrigtsen
  2022-09-29 22:43     ` Sean Whitton
  1 sibling, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2022-09-29 12:58 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 58150, spwhitton

> Cc: 58150@debbugs.gnu.org
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Thu, 29 Sep 2022 13:02:01 +0200
> 
> Sean Whitton <spwhitton@spwhitton.name> writes:
> 
> > One possibility is a defcustom to only upcase the very first character.
> > Maybe it should even be t by default: this will produce more correct
> > results than the current scheme.
> 
> I think the upcasing should be removed, and the tool bar labels should
> be capitalised properly to begin with.

Isn't the capitalizing for the likes of tool-bar-add-item-from-menu,
where the symbols are commands that aren't capitalized?





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

* bug#58150: 29.0.50; parse_tool_bar_item should not usually upcase "and"
  2022-09-29 11:02   ` Lars Ingebrigtsen
  2022-09-29 12:58     ` Eli Zaretskii
@ 2022-09-29 22:43     ` Sean Whitton
  2022-09-29 23:00       ` Gregory Heytings
  1 sibling, 1 reply; 8+ messages in thread
From: Sean Whitton @ 2022-09-29 22:43 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 58150

Hello,

On Thu 29 Sep 2022 at 01:02PM +02, Lars Ingebrigtsen wrote:

> Sean Whitton <spwhitton@spwhitton.name> writes:
>
>> One possibility is a defcustom to only upcase the very first character.
>> Maybe it should even be t by default: this will produce more correct
>> results than the current scheme.
>
> I think the upcasing should be removed, and the tool bar labels should
> be capitalised properly to begin with.  That requires somebody to do a
> review of this first, and fix the tool bar definitions, though.  Like:
>
>     (define-key map [isearch-occur]
>       (list 'menu-item "Show hits" 'isearch-occur
>             :help "Show each search hit"
>             :image '(isearch-tool-bar-image "index")))
>
> Should be "Show Hits" etc.
>
> Otherwise somebody could, of course, just write a function that
> capitalises titles correctly according to one or other of the English
> title capitalisation standards -- which isn't difficult, and would be
> generally useful.

I'm not sure it's so simple, actually, and I think your first suggestion
is preferable.  For example, "Go To Node" in the Info toolbar is
probably correct, because it's a whole phrasal verb, but in other
contexts, "to" in titles isn't capitalised.

-- 
Sean Whitton





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

* bug#58150: 29.0.50; parse_tool_bar_item should not usually upcase "and"
  2022-09-29 22:43     ` Sean Whitton
@ 2022-09-29 23:00       ` Gregory Heytings
  2022-09-29 23:09         ` Sean Whitton
  0 siblings, 1 reply; 8+ messages in thread
From: Gregory Heytings @ 2022-09-29 23:00 UTC (permalink / raw)
  To: Sean Whitton; +Cc: Lars Ingebrigtsen, 58150


>> Otherwise somebody could, of course, just write a function that 
>> capitalises titles correctly according to one or other of the English 
>> title capitalisation standards -- which isn't difficult, and would be 
>> generally useful.
>
> I'm not sure it's so simple, actually, and I think your first suggestion 
> is preferable.  For example, "Go To Node" in the Info toolbar is 
> probably correct, because it's a whole phrasal verb, but in other 
> contexts, "to" in titles isn't capitalised.
>

Indeed, it's not easy, and can probably not be mechanized, because whether 
a word should be capitalized or not may depend on its semantics.  The CMOS 
gives the following rules (I removed some parts that are not important in 
the context of Emacs):

1. Capitalize the first and last words in titles and subtitles, and 
capitalize all other major words (nouns, pronouns, verbs, adjectives, 
adverbs, and some conjunctions---but see rule 4) .

2. Lowercase the articles _the_, _a_, and _an_.

3. Lowercase prepositions, regardless of length, except when they are used 
adverbially or adjectivally (_up_ in _Look Up_, _down_ in _Turn Down_, 
_on_ in _The On Button_, _to_ in _Come To_, etc.).

4. Lowercase the common coordinating conjunctions _and_, _but_, _for_, 
_or_, and _nor_.

5. Lowercase _to_ not only as a preposition (rule 3) but also as part of 
an infinitive (_to Run_, _to Hide_, etc.), and lowercase _as_ in any 
grammatical function.





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

* bug#58150: 29.0.50; parse_tool_bar_item should not usually upcase "and"
  2022-09-29 23:00       ` Gregory Heytings
@ 2022-09-29 23:09         ` Sean Whitton
  0 siblings, 0 replies; 8+ messages in thread
From: Sean Whitton @ 2022-09-29 23:09 UTC (permalink / raw)
  To: Gregory Heytings; +Cc: Lars Ingebrigtsen, 58150

Hello,

On Thu 29 Sep 2022 at 11:00PM GMT, Gregory Heytings wrote:

>>> Otherwise somebody could, of course, just write a function that capitalises
>>> titles correctly according to one or other of the English title
>>> capitalisation standards -- which isn't difficult, and would be generally
>>> useful.
>>
>> I'm not sure it's so simple, actually, and I think your first suggestion is
>> preferable.  For example, "Go To Node" in the Info toolbar is probably
>> correct, because it's a whole phrasal verb, but in other contexts, "to" in
>> titles isn't capitalised.
>>
>
> Indeed, it's not easy, and can probably not be mechanized, because whether a
> word should be capitalized or not may depend on its semantics.  The CMOS gives
> the following rules (I removed some parts that are not important in the
> context of Emacs):

The way they are written, they're more like guidelines, not rules, which
only proves the point, I suppose.  Thanks for sharing these.

-- 
Sean Whitton





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

* bug#58150: 29.0.50; parse_tool_bar_item should not usually upcase "and"
  2022-09-29 12:58     ` Eli Zaretskii
@ 2022-09-30 12:34       ` Lars Ingebrigtsen
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-30 12:34 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 58150, spwhitton

Eli Zaretskii <eliz@gnu.org> writes:

> Isn't the capitalizing for the likes of tool-bar-add-item-from-menu,
> where the symbols are commands that aren't capitalized?

In that case, the code is wrong, because it capitalises also in the
normal case (i.e., when not using tool-bar-add-item-from-menu).

Perhaps that's the case, and people got used to it fixing all the names,
and nobody noticed that stuff like

    (define-key map [isearch-occur]
      (list 'menu-item "Show hits" 'isearch-occur
            :help "Show each search hit"
            :image '(isearch-tool-bar-image "index")))

was wrong, because "Show hits" was never displayed "unfixed".





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

end of thread, other threads:[~2022-09-30 12:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-28 20:02 bug#58150: 29.0.50; parse_tool_bar_item should not usually upcase "and" Sean Whitton
2022-09-28 20:38 ` Sean Whitton
2022-09-29 11:02   ` Lars Ingebrigtsen
2022-09-29 12:58     ` Eli Zaretskii
2022-09-30 12:34       ` Lars Ingebrigtsen
2022-09-29 22:43     ` Sean Whitton
2022-09-29 23:00       ` Gregory Heytings
2022-09-29 23:09         ` Sean Whitton

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).