Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

flyspell or ispell keyboard shortcuts instead of middle mouse

199 views
Skip to first unread message

DJ

unread,
Dec 18, 2015, 9:46:44 PM12/18/15
to help-gn...@gnu.org
I cannot seem to figure this out. I don't know whether it is flyspell or
ispell that I should be looking at.

I want to be able to add a word to the dictionary or to accept it for
the buffer WITHOUT using the middle mouse button and getting a huge list
of meaningless suggestions.

Are there keyboard shortcuts that would let me add a word without
stopping and grabbing the mouse? I don't mean when spell checking an
entire buffer or region. I mean on the fly whenever a word is
highlighted as misspelled.

Thanks.

Best,

- Jake -

Emanuel Berg

unread,
Dec 18, 2015, 10:03:27 PM12/18/15
to help-gn...@gnu.org
DJ <ja...@arqux.com> writes:

> Are there keyboard shortcuts that would let me add
> a word without stopping and grabbing the mouse?
> I don't mean when spell checking an entire buffer or
> region. I mean on the fly whenever a word is
> highlighted as misspelled.

Flyspell is a good idea but the everyday fail case is
there are so many words that are correct but not in
the dictionaries. So it is very disruptive having to
do that all the time. Better to type and then
spellcheck, *once*.

But to each his own. Yes, most likely you can do what
you want. First, find out what function is invoked
when you hit the mouse way. Second, check the help for
that function to learn its interface. If indeed mouse
only (how now that looks?) - if so, use `apropos' or
auto-complete to find out if there are variations to
that function. My hunch is, if you have point at the
misspelled word, that is enough to interact with it by
means of some `-dwim' or `-at-point' function.

Here is what I do for spelling - once, i.e. right now
before I send this message. OK, as usual, not a single
mistake. Case closed - disruptionless.

http://user.it.uu.se/~embe8573/conf/emacs-init/spell.el

--
underground experts united
http://user.it.uu.se/~embe8573


Dan Espen

unread,
Dec 18, 2015, 11:27:44 PM12/18/15
to
Looking at ^H M with flyspell enabled, I find:

Bindings:
M-$: correct words (using Ispell).
M-x flyspell-auto-correct-word: automatically correct word.
M-x flyspell-auto-correct-previous-word:
automatically correct the last misspelled word.
M-x flyspell-correct-word (or down-mouse-2): popup correct words.

I use M-$.
You might like to create your own bindings for some of the other options.

--
Dan Espen

Eli Zaretskii

unread,
Dec 19, 2015, 2:42:13 AM12/19/15
to help-gn...@gnu.org
> From: DJ <ja...@arqux.com>
> Date: Fri, 18 Dec 2015 19:49:24 -0500
>
> I want to be able to add a word to the dictionary or to accept it for
> the buffer WITHOUT using the middle mouse button and getting a huge list
> of meaningless suggestions.

When you are in the middle of Ispell's spell-checking commands, typing
'a' accepts the words and typing 'i' inserts it into your private
dictionary. So if you are at or after a word you want to accept or
insert, type "M-$", which run the command ispell-word, and then press
'a' or 'i', as you see fit. Since flyspell uses the same dictionary,
the change will affect it as well.

Is this what you wanted?

DJ

unread,
Dec 19, 2015, 1:40:44 PM12/19/15
to help-gn...@gnu.org
Thanks. That's close. When I try that the word in question remains
highlighted, though. Also, this does not give me the option to add the
word to the buffer spelling list. I may have to do some trivial hacking
to get this to work as I want, I guess.

Eli Zaretskii

unread,
Dec 19, 2015, 1:46:54 PM12/19/15
to help-gn...@gnu.org
> From: DJ <ja...@arqux.com>
> Date: Sat, 19 Dec 2015 13:40:31 -0500
>
> > When you are in the middle of Ispell's spell-checking commands, typing
> > 'a' accepts the words and typing 'i' inserts it into your private
> > dictionary. So if you are at or after a word you want to accept or
> > insert, type "M-$", which run the command ispell-word, and then press
> > 'a' or 'i', as you see fit. Since flyspell uses the same dictionary,
> > the change will affect it as well.
> >
> > Is this what you wanted?
> Thanks. That's close. When I try that the word in question remains
> highlighted, though.

Even if you move point across that word?

> Also, this does not give me the option to add the word to the buffer
> spelling list.

What's a "buffer spelling list"?

Charles Millar

unread,
Dec 19, 2015, 8:12:46 PM12/19/15
to help-gn...@gnu.org


On 12/19/2015 01:40 PM, DJ wrote:
>
>
> On 15-12-19 02:42 AM, Eli Zaretskii wrote:
>>> From: DJ <ja...@arqux.com>
>>> Date: Fri, 18 Dec 2015 19:49:24 -0500
>>>
>>> I want to be able to add a word to the dictionary or to accept it for
>>> the buffer WITHOUT using the middle mouse button and getting a huge
>>> list
>>> of meaningless suggestions.
>> When you are in the middle of Ispell's spell-checking commands, typing
>> 'a' accepts the words and typing 'i' inserts it into your private
>> dictionary. So if you are at or after a word you want to accept or
>> insert, type "M-$", which run the command ispell-word, and then press
>> 'a' or 'i', as you see fit. Since flyspell uses the same dictionary,
>> the change will affect it as well.
>>
>> Is this what you wanted?
> Thanks. That's close. When I try that the word in question remains
> highlighted, though. Also, this does not give me the option to add the
> word to the buffer spelling list. I may have to do some trivial
> hacking to get this to work as I want, I guess.
>
>
AFIK Shift-a (capital A) should add the word your buffer, thus

#+LocalWords:

Is this what you are looing for?

Charlie Millar

0 new messages