unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Spelling and spell-checking
@ 2016-03-11 11:53 Sharon Kimble
  2016-03-11 14:31 ` Thorsten Grothe
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Sharon Kimble @ 2016-03-11 11:53 UTC (permalink / raw)
  To: help-emacs

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


How can I have words that I type be auto-corrected to what I want
please? I'm specifically thinking of words like these -

--8<---------------cut here---------------start------------->8---
im = I'm
ive = I've
thats = that's
Thats = That's
cant = can't
monday = Monday
tuesday = Tuesday, etc
--8<---------------cut here---------------end--------------->8---

and other specific words.

I'm using the default flyspell, and 'flyspell-popup' but I haven't found
a way of getting my corrected words to 'stick'. After restarting emacs
exactly the same words show up again as either not being auto-corrected
or just plain ignored, even if there is a very optically visible
spelling mistake!

Any ideas please?

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.3, fluxbox 1.3.7, emacs 25.0.92

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

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

* Re: Spelling and spell-checking
  2016-03-11 11:53 Spelling and spell-checking Sharon Kimble
@ 2016-03-11 14:31 ` Thorsten Grothe
  2016-03-25 18:40   ` Sharon Kimble
  2016-03-11 14:42 ` Eli Zaretskii
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Thorsten Grothe @ 2016-03-11 14:31 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

Am 11.03.2016 um 12:53 schrieb Sharon Kimble:
> How can I have words that I type be auto-corrected to what I want
> please? I'm specifically thinking of words like these -
>
> --8<---------------cut here---------------start------------->8---
> im = I'm
> ive = I've
> thats = that's
> Thats = That's
> cant = can't
> monday = Monday
> tuesday = Tuesday, etc
> --8<---------------cut here---------------end--------------->8---
>
> and other specific words.

I have configured flyspell like this:

(setq flyspell-abbrev-p t)
(setq flyspell-use-global-abbrev-table-p t)

I'm german, when I have a word like "autobaahn" flyspell suggests 
"Autobahn", when I accept the suggestion, flyspell puts the word in the 
global-abbrev-table and saves it. Next time I write "autobaahn" the word 
is corrected automatically to "Autobahn"

P.S. You can edit the abbrev-table and set your preferred 
auto-corrections per hand if you like.

Regards
Thorsten




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

* Re: Spelling and spell-checking
  2016-03-11 11:53 Spelling and spell-checking Sharon Kimble
  2016-03-11 14:31 ` Thorsten Grothe
@ 2016-03-11 14:42 ` Eli Zaretskii
  2016-03-12 20:08 ` Charles Millar
  2016-03-16 18:57 ` Emanuel Berg
  3 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2016-03-11 14:42 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Sharon Kimble <boudiccas@skimble.plus.com>
> Date: Fri, 11 Mar 2016 11:53:40 +0000
> 
> How can I have words that I type be auto-corrected to what I want
> please? I'm specifically thinking of words like these -
> 
> --8<---------------cut here---------------start------------->8---
> im = I'm
> ive = I've
> thats = that's
> Thats = That's
> cant = can't
> monday = Monday
> tuesday = Tuesday, etc
> --8<---------------cut here---------------end--------------->8---
> 
> and other specific words.

Read about abbrev-mode.  That's one way.



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

* Re: Spelling and spell-checking
  2016-03-11 11:53 Spelling and spell-checking Sharon Kimble
  2016-03-11 14:31 ` Thorsten Grothe
  2016-03-11 14:42 ` Eli Zaretskii
@ 2016-03-12 20:08 ` Charles Millar
  2016-03-16 18:57 ` Emanuel Berg
  3 siblings, 0 replies; 8+ messages in thread
From: Charles Millar @ 2016-03-12 20:08 UTC (permalink / raw)
  To: help-gnu-emacs

On 03/11/2016 06:53 AM, Sharon Kimble wrote:
> How can I have words that I type be auto-corrected to what I want
> please? I'm specifically thinking of words like these -
>
> --8<---------------cut here---------------start------------->8---
> im = I'm
> ive = I've
> thats = that's
> Thats = That's
> cant = can't
> monday = Monday
> tuesday = Tuesday, etc
> --8<---------------cut here---------------end--------------->8---
>
> and other specific words.
>
> I'm using the default flyspell, and 'flyspell-popup' but I haven't found
> a way of getting my corrected words to 'stick'. After restarting emacs
> exactly the same words show up again as either not being auto-corrected
> or just plain ignored, even if there is a very optically visible
> spelling mistake!
>
> Any ideas please?
>
> Thanks
> Sharon.
Sasha Chua, in emacs news, recently posted a link to

https://www.youtube.com/watch?v=fhI_riv_6HM

which demonstrates the code at

http://endlessparentheses.com/ispell-and-abbrev-the-perfect-auto-correct.html



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

* Re: Spelling and spell-checking
  2016-03-11 11:53 Spelling and spell-checking Sharon Kimble
                   ` (2 preceding siblings ...)
  2016-03-12 20:08 ` Charles Millar
@ 2016-03-16 18:57 ` Emanuel Berg
  3 siblings, 0 replies; 8+ messages in thread
From: Emanuel Berg @ 2016-03-16 18:57 UTC (permalink / raw)
  To: help-gnu-emacs

Sharon Kimble <boudiccas@skimble.plus.com> writes:

> How can I have words that I type be auto-corrected
> to what I want please? I'm specifically thinking of
> words like these -
>
> im = I'm ive = I've thats = that's Thats = That's
> cant = can't monday = Monday tuesday = Tuesday, etc
>
> and other specific words.

This is not a spelling issue or at least it doesn't
have to be, as there is a better way to do it, namely
using aliases.

Here is a couple of examples what you can do with it.
It is actually what I use only with many entries
removed in an attempt to have each entry
qualitatively different.

Examples are: a nickname expanded to bulky long name
(I added that when I wrote an article on the Kon-Tiki
expedition as to not have to spell out his name every
time); data from aliases (the URL, residence, and
phone number - N.B. not just a shorthand, but also
more safe as not error-prone due to boredom when
typing mechanically); and the most interesting case:
the misspelling of "length", which I always get wrong
(even now!) as every super-skilled typist has a couple
of such words which they always get wrong no matter
what... And last, the function that gets executed to
insert the date. Here, when I type "thedate":

   19:50    Mar 16    Wednesday: week 11    month 3 (31 days)    2016     up    4° C

("up" refers to the Internet being up :))

Here is the Elisp:

;; (kill-all-abbrevs)
(let*((write
       (list
         '("watz"           "Watzinger")
         '("hp"             "http://user.it.uu.se/~embe8573")
         '("lenght"         "length")
         '("address"        "Emanuel Berg\nDalgatan 8\n752 18 Uppsala\nSweden")
         '("phonenumber"    "070-254 15 22")
         '("thedate"        "" (lambda () (interactive) (show-time-and-date t))) ; INSERT
         ))
      (groups (list
                '("ctt" "comp.text.tex")
                '("geg" "gmane.emacs.gnus")
                '("geh" "gmane.emacs.help")
                '("rbt" "rec.bicycles.tech")
                ))
      (both (nconc write groups)))
  (define-abbrev-table 'global-abbrev-table both) )

> Any ideas please?

Yes: don't do it. Typing "'" only requires minimal
hand movement (right hand little finger one key to the
right). Capitalizing things we do all the time.

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




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

* Re: Spelling and spell-checking
  2016-03-11 14:31 ` Thorsten Grothe
@ 2016-03-25 18:40   ` Sharon Kimble
  2016-03-25 18:48     ` Thorsten Grothe
       [not found]     ` <56F67CC4.8000303@mousecar.com>
  0 siblings, 2 replies; 8+ messages in thread
From: Sharon Kimble @ 2016-03-25 18:40 UTC (permalink / raw)
  To: Thorsten Grothe; +Cc: help-gnu-emacs

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

Thorsten Grothe <grothe_news@e.mail.de> writes:

> Hi,
>
> Am 11.03.2016 um 12:53 schrieb Sharon Kimble:
>> How can I have words that I type be auto-corrected to what I want
>> please? I'm specifically thinking of words like these -
>>
>> --8<---------------cut here---------------start------------->8---
>> im = I'm
>> ive = I've
>> thats = that's
>> Thats = That's
>> cant = can't
>> monday = Monday
>> tuesday = Tuesday, etc
>> --8<---------------cut here---------------end--------------->8---
>>
>> and other specific words.
>
> I have configured flyspell like this:
>
> (setq flyspell-abbrev-p t)
> (setq flyspell-use-global-abbrev-table-p t)
>
> I'm german, when I have a word like "autobaahn" flyspell suggests "Autobahn", when I accept the
> suggestion, flyspell puts the word in the global-abbrev-table and saves it. Next time I write
> "autobaahn" the word is corrected automatically to "Autobahn"
>
> P.S. You can edit the abbrev-table and set your preferred auto-corrections per hand if you like.
>


Thanks Thorsten, this is along the right lines. This is what I now do, I
edit them 'M-x edit-abbrevs' and when done, save them 'C-c C-c'. And
then they're ready for action.

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.3, fluxbox 1.3.7, emacs 25.0.92

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

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

* Re: Spelling and spell-checking
  2016-03-25 18:40   ` Sharon Kimble
@ 2016-03-25 18:48     ` Thorsten Grothe
       [not found]     ` <56F67CC4.8000303@mousecar.com>
  1 sibling, 0 replies; 8+ messages in thread
From: Thorsten Grothe @ 2016-03-25 18:48 UTC (permalink / raw)
  To: help-gnu-emacs

Hi Sharon,

Am 25.03.2016 um 19:40 schrieb Sharon Kimble:

> Thanks Thorsten, this is along the right lines. This is what I now do, I
> edit them 'M-x edit-abbrevs' and when done, save them 'C-c C-c'. And
> then they're ready for action.

fine, I'm glad that it works for you!


Regards
Thorsten




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

* Re: Spelling and spell-checking
       [not found]       ` <878u15f719.fsf@skimble.plus.com>
@ 2016-03-27 19:46         ` ken
  0 siblings, 0 replies; 8+ messages in thread
From: ken @ 2016-03-27 19:46 UTC (permalink / raw)
  To: GNU Emacs List

On 03/26/2016 02:06 PM, Sharon Kimble wrote:
> ken <gebser@mousecar.com> writes:
>
>> On 03/25/2016 02:40 PM, Sharon Kimble wrote:
>>> Thorsten Grothe <grothe_news@e.mail.de> writes:
>>>
>>>> Hi,
>>>>
>>>> Am 11.03.2016 um 12:53 schrieb Sharon Kimble:
>>>>> How can I have words that I type be auto-corrected to what I want
>>>>> please? I'm specifically thinking of words like these -
>>>>>
>>>>> --8<---------------cut here---------------start------------->8---
>>>>> im = I'm
>>>>> ive = I've
>>>>> thats = that's
>>>>> Thats = That's
>>>>> cant = can't
>>>>> monday = Monday
>>>>> tuesday = Tuesday, etc
>>>>> --8<---------------cut here---------------end--------------->8---
>>>>>
>>>>> and other specific words.
>>>> I have configured flyspell like this:
>>>>
>>>> (setq flyspell-abbrev-p t)
>>>> (setq flyspell-use-global-abbrev-table-p t)
>>>>
>>>> I'm german, when I have a word like "autobaahn" flyspell suggests "Autobahn", when I accept the
>>>> suggestion, flyspell puts the word in the global-abbrev-table and saves it. Next time I write
>>>> "autobaahn" the word is corrected automatically to "Autobahn"
>>>>
>>>> P.S. You can edit the abbrev-table and set your preferred auto-corrections per hand if you like.
>>>>
>>> Thanks Thorsten, this is along the right lines. This is what I now do, I
>>> edit them 'M-x edit-abbrevs' and when done, save them 'C-c C-c'. And
>>> then they're ready for action.
>>>
>>> Thanks
>>> Sharon.
>> Yeah, abbrev mode is really handy.  I use it a lot.  A long time ago it used to be even better.
>>
>> "int he" -> "in the"
>>
>> and similar used to work.  But no more (a long time ago).  Too bad. Any way to bring that
>> functionality back?
>>
> Have you tried putting it in to the abbrev_devs file manually? I've
> found that it works when they've not been accepted through the spell
> checker.
>
> Sharon.

I don't know what you mean by the "abbrev_devs file"... I'm prompted for 
directory and file every time I do a M-x write-abbrev-file; I always 
save to ~/.abbrevs; I'm guessing that's what you mean... approximately.

When I do M-x list-abbrevs, one of the lines I've had in my ~/.abbrevs 
file going back more than ten years under (global-abbrev-table) is this:

"int eh"       0    "in the"

It worked for years, but after some upgrade-- I don't remember when-- it 
stopped working.  Other abbrevs in the same file and in the same table 
work though.  Puzzling.




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

end of thread, other threads:[~2016-03-27 19:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-11 11:53 Spelling and spell-checking Sharon Kimble
2016-03-11 14:31 ` Thorsten Grothe
2016-03-25 18:40   ` Sharon Kimble
2016-03-25 18:48     ` Thorsten Grothe
     [not found]     ` <56F67CC4.8000303@mousecar.com>
     [not found]       ` <878u15f719.fsf@skimble.plus.com>
2016-03-27 19:46         ` ken
2016-03-11 14:42 ` Eli Zaretskii
2016-03-12 20:08 ` Charles Millar
2016-03-16 18:57 ` Emanuel Berg

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