如何获取GNU Emacs拼写检查在OSX上找到用户的个人字典? [英] how to get GNU Emacs spellcheck to find user's personal dictionary on OSX?
问题描述
在GNU Emacs中,我使用的是flyspell-mode与ispell用aspell作为字典。但是我注意到我以前添加到我的字典(例如我的名字)中的单词被标记为拼写错误。
如何让GNU Emacs找到并使用已经建立的个人单词列表?我可以这样做,例如,从源头构建Aquamacs?
以下是我关于设置Aspell for OSX和Windows的注意事项 - 设置用户个人字典的说明在该链接的线程中:
https://stackoverflow.com/ a / 20013202/2112489
Aspell中的个人单词列表是一个平面文本文件,其中包含如下内容,您可以手动插入任何单词 - 包括但不限于从本机OSX拼写检查器〜/ Library / Spelling / LocalDictionary
中复制您的列表的内容:
personal_ws-1.1 zh 79
lawlist
realleges
parte
而且,在我的 .emacs
中,我使用(相应地调整自己的路径)
(set'ispell)
(需要'flyspell')
(setq-default ispell-program -name/Users/HOME/.0.data/.0.emacs/elpa/bin / aspell)
(setq flyspell-default-dictionaryenglish)
(setq ispell-dictionaryenglish)
这是我用来切换西班牙语和英语的功能:
(defun拼写(选择)
在语言字典之间切换
(interactivecChoose:(1)English | (2)Español$)
(cond((eq choice?1)
(setq flyspell-default-dictionaryenglish)
(setq ispell-dictionaryenglish)
(setq ispell-personal-dictionary/Users/HOME/.0.data/.0.emacs/.aspell.en.pws)
(ispell-kill-ispell))
((
(setq flyspell-default-dictionaryspanish)
(setq ispell-dictionaryspanish)
(setq ispell-personal-dictionary/ Users / HOME / .0.data / .0.emacs / .aspell.es.pws)
(ispell-kill-ispell))
(t(消息没有更改。))))
对于Windows,我使用:
(setq-default ispell-program-namec:/ Program Files / Aspell / bin / aspell.exe)
I switched from Aquamacs to GNU Emacs. Before, when Aquamacs thought a word was misspelled, I could right-click to "Learn Spelling." (I also had an option to Ignore Spelling to get it to unflag the word for that buffer only.)
In GNU Emacs, I'm using flyspell-mode with ispell, with aspell as the dictionary. But I notice that the words I previously added to my dictionary (e.g. my name) are getting flagged as misspelled.
How do I get GNU Emacs to find and use the personal word list I've already built up? Can I do this without, for example, building Aquamacs from source?
Here are my notes on setting up Aspell for OSX and Windows -- instructions for setting up the user personal dictionary are set forth in the thread of that link:
https://stackoverflow.com/a/20013202/2112489
The personal word list in Aspell is a flat text file that contains contents that looks like this, and you can insert any word manually -- including, but not limited to copying over the contents of your list from the native OSX spellchecker ~/Library/Spelling/LocalDictionary
:
personal_ws-1.1 en 79
lawlist
realleges
parte
And, in my .emacs
, I use (adjust your own path accordingly):
(require 'ispell)
(require 'flyspell)
(setq-default ispell-program-name "/Users/HOME/.0.data/.0.emacs/elpa/bin/aspell")
(setq flyspell-default-dictionary "english")
(setq ispell-dictionary "english")
This is a function I use to switch between Spanish and English:
(defun spell (choice)
"Switch between language dictionaries."
(interactive "cChoose: (1) English | (2) Español")
(cond ((eq choice ?1)
(setq flyspell-default-dictionary "english")
(setq ispell-dictionary "english")
(setq ispell-personal-dictionary "/Users/HOME/.0.data/.0.emacs/.aspell.en.pws")
(ispell-kill-ispell))
((eq choice ?2)
(setq flyspell-default-dictionary "spanish")
(setq ispell-dictionary "spanish")
(setq ispell-personal-dictionary "/Users/HOME/.0.data/.0.emacs/.aspell.es.pws")
(ispell-kill-ispell))
(t (message "No changes have been made."))) )
For Windows, I use:
(setq-default ispell-program-name "c:/Program Files/Aspell/bin/aspell.exe")
这篇关于如何获取GNU Emacs拼写检查在OSX上找到用户的个人字典?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!