Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spell Check: toggle with just one shortcut #1158

Closed
ralf3u opened this issue Jan 23, 2022 · 22 comments · Fixed by #1161
Closed

Spell Check: toggle with just one shortcut #1158

ralf3u opened this issue Jan 23, 2022 · 22 comments · Fixed by #1161

Comments

@ralf3u
Copy link

ralf3u commented Jan 23, 2022

There is the possibility to turn on "Run Spell Check" with one shortcut. And there is the possibility to turn off Spell Check with the shortcut "Remove Error Markers" (can be found in the Preferences dialog under Keybindings in the "Document" section). But there is no possibility to toggle Spell Check on and off with just one shortcut. To toggle with just one shortcut is more comfortable than to use two different shortcuts.

Comparison
In LibreOffice 7.1.3.2 "Automatic Spell Checking" can be turned on and off with the same shortcut (Shift+F7).

@eht16
Copy link
Member

eht16 commented Jan 23, 2022

I won't implement this as cleaning the findings of a previous check is already implemented by the mentioned "Remove Error Markers" keybinding.

Again, as said in #1156, toggle is not appropriate for the "Run Spell Check" action because it is an action.

I do understand your use case. I think using two different keybindings is not that hard though.

Anyway, if you want to have a one time check of the current document and then remove the markers with one keybinding, just use the "Toggle Check While Typing" keybinding. When toggling the setting to active, spell checking is performed and markers are set. When deactivating the setting again, the markers are removed automatically.

@ralf3u
Copy link
Author

ralf3u commented Jan 23, 2022

To the shortcut "Run Spell Check".

Again, as said in #1156, toggle is not appropriate for the "Run Spell Check" action because it is an action.

OK, now I got it. "Run Spell Check" is a one time action, so if I activate it, and then, if for example I type words, then on the new written words, spell checking will not be performed. But then, I think that "Run Spell Check once" would be better as expression than "Run Spell Check".


Now to the shortcut "Toggle Check While Typing":

Anyway, if you want to have a one time check of the current document and then remove the markers with one keybinding, just use the "Toggle Check While Typing" keybinding. When toggling the setting to active, spell checking is performed and markers are set.

That's not true. When toggling the setting to active, spell checking is performed and markers are set, but only for new written words.

When deactivating the setting again, the markers are removed automatically.

That's not true. When deactivating the setting again, then there will be no markings any more while typing, but the existing markings will not be removed.



If this would be true what you write, then it would be perfect for me:

Anyway, if you want to have a one time check of the current document and then remove the markers with one keybinding, just use the "Toggle Check While Typing" keybinding. When toggling the setting to active, spell checking is performed and markers are set. When deactivating the setting again, the markers are removed automatically.

@eht16
Copy link
Member

eht16 commented Jan 23, 2022

Now to the shortcut "Toggle Check While Typing":

Anyway, if you want to have a one time check of the current document and then remove the markers with one keybinding, just use the "Toggle Check While Typing" keybinding. When toggling the setting to active, spell checking is performed and markers are set.

That's not true. When toggling the setting to active, spell checking is performed and markers are set, but only for new written words.

When deactivating the setting again, the markers are removed automatically.

That's not true. When deactivating the setting again, then there will be no markings any more while typing, but the existing

Oops, sorry for the wrong information. When I was testing this earlier today, at some point I used the toolbar button instead of the keybinding because I was super confident they behave identically and share the same code.
Surprisingly, they don't. While the keybinding really only toggles the setting, the toolbar button also performs a check of the current document resp. clear the markers (as I described above).

This is clearly a bug. I'll prepare a PR to fix this soon.

@eht16 eht16 reopened this Jan 23, 2022
@ralf3u
Copy link
Author

ralf3u commented Jan 24, 2022

This is clearly a bug. I'll prepare a PR to fix this soon.

Thank you so much.


I have three suggestions for improvement:

1
They are different expressions at the moment:
The name of the shortcut is:
"Toggle Check While Typing"
The name of the toolbar button is:
"Toggle spell check while typing"
It would be good if both have the same name in future. I would change both names just to "Toggle Spell Check". In LibreOffice 7.1.3.2 for example it is called "Automatic Spell Checking" and it works exactly like the toolbar button of Geany.

2
I would change the name of the other shortcut "Run Spell Check" to "Run Spell Check once" to make it clear that it is only a one time action when it is pressed. But maybe it is even better to delete the shortcut "Run Spell Check" because I don't see a benefit of that shortcut at all. Even in LibreOffice something like this does not exist because it is not useful. It makes things just complicated.

3
In the configuration of the Plugin, in Behavior, I would delete "Check spelling while typing", because this can be set by the toolbar button or in future by the shortcut. The checkbox "Check spelling while typing" is misleading, because in the moment where I activate it, I don't expect that it can be deactivated by the toolbar button or by a shortcut.

@elextr
Copy link
Member

elextr commented Jan 24, 2022

  1. Good catch on inconsistent naming, the simple "Toggle spell check" seems good.
  2. This was necessary when the keybinding did not do a check/clear markers on toggle on/off respectively, if thats fixed then the only use-case for one shot checks is to perform it and leave the markers without making more while typing/correcting, so the next/previous marker destinations become deterministic. Not sure how important that use-case is. @eht16 did it ever only check the selection? [or I may be remembering some other tool]
  3. this is the default setting to start with, probably it could default to on since its reasonable to expect enabling the plugin to turn checking on

@ralf3u
Copy link
Author

ralf3u commented Jan 24, 2022

@eht16

This is clearly a bug.

Could you please add the bug-label to this issue? Thank you in advance.

@eht16 eht16 added the bug label Jan 25, 2022
@ralf3u
Copy link
Author

ralf3u commented Jan 28, 2022

  1. this is the default setting to start with, probably it could default to on since its reasonable to expect enabling the plugin to turn checking on

I would like to modify a little bit the third point of my comment #1158 (comment):

3
Because "Run Spell Check" is not useful, it could be deleted. If the shortcut "Run Spell Check" is not any more part of the plugin, then there is only one shortcut for the plugin, namely "Toggle Spell Check". In the moment where the plugin is activated in the lists of plugins, "Toggle Spell Check" should be activated automatically. The user has then 4 possibilities to turn off the feature:

  • by the shortcut "Toggle Spell Check"
  • by the tool-bar button
  • by the menu-bar ("Remove Error Markers" in the Document), and
  • by the shortcut "Remove Error Markers".

In the configuration of the Plugin, in Behavior, I would delete the whole line "Check spelling while typing".

@elextr
Copy link
Member

elextr commented Jan 28, 2022

I did not previously understand the effect of the proposed changes.

To check, IIUC it is to have "toggle spelling" when checking is off do a document wide spell check and turn on checking while typing, and when checking is on stop checking whilst typing and remove markers.

The capability to run spell check then once should remain, spell checking during typing can be annoying and distracting, I have it off. But occasionally spell check can be run on the whole document and the markers will stay visible without any distractions whilst correcting or typing new content.

Since the markers are removed when spell checking is toggled off, If the one-shot capability is removed there is no way of checking a document except by having spell checking on continuously with its attendant annoyance.

So that one shot capability needs to stay to allow user controlled checking without constant nagging whilst typing.

Please do not try to remove features just because you personally do not use them.

@eht16
Copy link
Member

eht16 commented Jan 29, 2022 via email

@elextr
Copy link
Member

elextr commented Jan 29, 2022

Actually I forgot to mention that I found out a few days ago that Libreoffice has a manual spell checker as well as automatic spell checking. Tools->Spelling or the toolbar icon with ABC over a tick will find the first error after the current cursor, or in the current selection, see here.

@ralf3u
Copy link
Author

ralf3u commented Feb 8, 2022

@eth16

Even if you do not need the one-time action, don't remove it for other users.

OK, if you think so, but then at least it would be good to change the expression from "Run Spell Check" to something like "Run Spell Check once" or "Run Spell Check one-time", to make it clear that it is a one-time action.

@eht16
Copy link
Member

eht16 commented Feb 9, 2022 via email

@ralf3u
Copy link
Author

ralf3u commented Feb 9, 2022

It would be nice if you could test it.

I would like to. But unfortunately it is not possible. I have no idea how to update Geany. And I use a Geany by a PPA.

@eht16
Copy link
Member

eht16 commented Feb 10, 2022

Ok, if you are https://geany.org/manual/#source-compilation describes how to compile from source (this is for Geany but for Geany-Plugins the steps are pretty much the same).

If not, you could at least read the changed labels in the PR and see if they fit better.

@ralf3u
Copy link
Author

ralf3u commented Feb 11, 2022

Ok, if you are https://geany.org/manual/#source-compilation describes how to compile from source (this is for Geany but for Geany-Plugins the steps are pretty much the same).

In the description that you mentioned, three commands need to be typed in the terminal:

$ ./configure
$ make
% make install

Where is Geany in the command lines?
Do I have to type also the %-symbol?
What will happen to the present Geany I use?
What will happen to my present settings in Geany?
Do I need to unzip first the code after the download on https://github.com/geany/geany?



If not, you could at least read the changed labels in the PR and see if they fit better.

I didn't know that it was possible to look inside the code. Oh, that's cool!

I visited both web-pages:

  • SpellCheck: Rename "Toggle spell check" setting, and
  • SpellCheck: Sync toggle via keybinding and button

I checked the first webpage, because on the second webpage I have no idea what the code means.

I would not write it "Run Spell Check Once", because I don't like when, after the first word, words start with a big letter. Then I get a little bit confused, because I ask myself: Is there a special meaning behind that?
So I would call it "Run spell check once".

Personally I would prefer that even the first word starts with a small letter, because it is not a sentence, it is just an expression. So the best for me would be this:
"run spell check once"
"toggle spell check"
The problem is then that some users will ask themselves why in the Preferences, in Keybindings, some names of shortcut start with a big letter and some with a small letter, and why "Preferences" and "Keybindings" start with a big letter.

I don't understand why you use two different notations for one and the same thing:
228: Toggle Spell Check
333: Toggle spell check

@elextr
Copy link
Member

elextr commented Feb 11, 2022

Where is Geany in the command lines?
Do I have to type also the %-symbol?
What will happen to the present Geany I use?
What will happen to my present settings in Geany?
Do I need to unzip first the code after the download on https://github.com/geany/geany?

@ralf3u don't know what platform you are on, but you also need a bunch of tools that are not normally installed unless you do C software development.

I guess we need to remind ourselves that not everybody is a C coder and knows the technology involved in how to build Geany and thats fine, it will just mean waiting for someone else to test it.

I didn't know that it was possible to look inside the code. Oh, that's cool!

Thats open source 😄

I would not write it "Run Spell Check Once",

Geany isn't terribly consistent with keybinding names, we have Delete Current Line(s) and next to it Delete to line end. AFAIK there is no special meaning for those where each word is capitalised, in fact had never noticed before 😄

Thats also open source, different contributors have different preferences and experience and contribute things in their favourite/experience style.

The Gnome HIG tends towards sentence capitalisation for labels which is what this is. But its not totally prescriptive and allows short non-sentence controls to be heading capitalisation. Sigh, why did I expect something from Gnome to be useful ☹️

I don't understand why you use two different notations for one and the same thing:

One is the label on the keybinding dialog and summary (Help->Keyboard Shortcuts) which as I noted above is inconsistent, but needs to be short, the other is a label in the preferences dialog which is sentence cased fairly consistently and can afford to be longer.

@eht16
Copy link
Member

eht16 commented Feb 12, 2022

I don't mind about the case of "Run spell check once" except that IMO the first word should be capitalised.

@elextr what would you prefer, I'm always in need of your red pencil to correct my English wording :D.

@elextr
Copy link
Member

elextr commented Feb 13, 2022

Personally I also prefer sentence case (ie first word capitalised).

On a language lawyer basis, I do think its a sentence, it has a verb "Run" and object "spell check" and a quantifier "once", thats a sentence to me.

[end purple pencilling]

@ralf3u
Copy link
Author

ralf3u commented Feb 13, 2022

On a language lawyer basis, I do think its a sentence, it has a verb "Run" and object "spell check" and a quantifier "once", thats a sentence to me.

It is not a sentence. "Every sentence must have a capital letter, a verb and punctuation at the end." (https://www.bbc.co.uk/bitesize/articles/zt9pm39). In this case a punctuation is missing, so "Run spell check once" is a sentence, but not written in a correct way. And because there is no exclamation mark or point at the end, there is no need to start with a big letter. But I would not add an exclamation mark or a point at the end, because the name of the shortcut is easier to read without punctuation. And I think that it is better to start capitalized because of my comment above:

The problem is then that some users will ask themselves why in the Preferences, in Keybindings, some names of shortcut start with a big letter and some with a small letter, and why "Preferences" and "Keybindings" start with a big letter.

@eht16
Copy link
Member

eht16 commented Feb 13, 2022

I'm not sure the very exact definition of a sentence applies here at all.
If a randomly look at various menu items and preferences, inluding keybinding labels in a couple of desktop programs currently running on my system, the vast majority uses what @elextr proposed (first word capitalised, the rest in lowercase letters). There are only a few occurrences where all words are capitalised.

But I didn't find a single application running on my system where the first word is in lowercase.

Additionally, introducing such a change a now here would make the keybinding labels even more inconsistent than before.

So, I see no reason for not using "Run spell check once". I've just pushed changes to the PR #1161 to change the keybinding labels accordingly.

@ralf3u
Copy link
Author

ralf3u commented Feb 13, 2022

I've just pushed changes to the PR #1161 to change the keybinding labels accordingly.

I looked at PR 1161. Now it's perfect.

@elextr
Copy link
Member

elextr commented Feb 13, 2022

The definition of a sentence from my education department is: "A sentence is a set of words that is complete in itself. It typically contains a subject, conveys a statement, question, exclamation or command, and consists of a main clause."

In writing, the end of sentences is marked with a full stop or other punctuation mark. But on labels (physical and computer GUI), where there is only one sentence, it is common to omit the ending punctuation.

The Gnome HIG also specifies sentence capitalising for labels on most controls (except buttons as per my previous post), even if they are not sentences, and as the survey by @eht16 found, its the usual way GUIs are labelled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants