* flyspell-mode and two languages @ 2008-10-17 20:02 Memnon Anon 2008-10-17 20:11 ` harven 2008-10-17 21:35 ` Xah 0 siblings, 2 replies; 9+ messages in thread From: Memnon Anon @ 2008-10-17 20:02 UTC (permalink / raw To: help-gnu-emacs Hi! I love flyspell-mode. But I often have to edit files containing 2 languages, in most cases german and english. I was wondering how you solved this. Is there a way to define a main-language, and if the word seems to be misspelled, check a secondary-language? Any hint appreciated... ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: flyspell-mode and two languages 2008-10-17 20:02 flyspell-mode and two languages Memnon Anon @ 2008-10-17 20:11 ` harven 2008-10-17 21:35 ` Xah 1 sibling, 0 replies; 9+ messages in thread From: harven @ 2008-10-17 20:11 UTC (permalink / raw To: help-gnu-emacs Memnon Anon <gegendosenfleisch@googlemail.com> writes: > Hi! > > I love flyspell-mode. But I often have to edit files containing 2 > languages, in most > cases german and english. I was wondering how you solved this. Is > there a way to > define a main-language, and if the word seems to be misspelled, check > a > secondary-language? > > Any hint appreciated... Several solutions have been devised: flyspellbabel, flyspellxmllang, autolangmode,guesslang, guessbufferlanguage. Have a look at the wiki http://www.emacswiki.org/emacs/CategorySpelling I didn't try any of these packages, so I can't provide feedback. Hope that helps ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: flyspell-mode and two languages 2008-10-17 20:02 flyspell-mode and two languages Memnon Anon 2008-10-17 20:11 ` harven @ 2008-10-17 21:35 ` Xah 2008-10-17 22:02 ` Eli Zaretskii 1 sibling, 1 reply; 9+ messages in thread From: Xah @ 2008-10-17 21:35 UTC (permalink / raw To: help-gnu-emacs On Oct 17, 1:02 pm, Memnon Anon <gegendosenflei...@googlemail.com> wrote: > Hi! > > I love flyspell-mode. But I often have to edit files containing 2 > languages, in most > cases german and english. I was wondering how you solved this. Is > there a way to > define a main-language, and if the word seems to be misspelled, check > a > secondary-language? > > Any hint appreciated... no answer to your specific question... but last time i tried flyspell and was extremely dissatisfied with it. For primarily 2 reasons, in order of importance: (1) it doesn't let me right click to select from a list of correct spellings. What i have to do is to go to each word and do ispell-word. (2) its vocabulary is extremely small. Words in modern journalism will typically light it up like neolight show. (e.g. try any article from Time mag (e.g. time.com )) I haven't really spend time to dig solutions on these, but basically abandoned it. What i do is to have a keyboard shortcut that open the current buffer in TextWrangle (aka BBEdit Light), press a button then it highlight all unkown words, then right click on each to fix, then save, close, then back to emacs refresh buffer. However, last week i found • Batch style spell checker http://www.emacswiki.org/cgi-bin/wiki/SpeckMode by Martin Rudalics. which is really wonderful. It does (1) like most word processors. I'm not sure if it does contain good sized vocabulary yet. With respect to your question, possibly you could give it a try and maybe it allows multiple lang vocabs. (i'm guessing it does. For one thing, you could add the unknown word. However, i'm not sure where is the source file it adds to. Did spent few min on it but didn't find it.) Related, if you are a dictionary buff like me, you might also like: ★ http://www.myrkr.in-berlin.de/dictionary/index.html by Torsten Hilbrich↗ . Lookup English word definitions in emacs thru online English dictionary server. There are several others but this is one i tried and sufficiently happy with. Also, most or all emacs dicts are interface to open sourced dicts online. Open sourced dicts are low quality when compared to pro ones. If you work with English in some semi-pro capacity, you'll need access to commercial ones. This i do like this: (defun lookup-word-definition-in-w3m () "Look up the word's definition in a emacs-w3m.\n If a region is active (a phrase), lookup that phrase." (interactive) (let (myword myurl) (setq myword (if (and transient-mark-mode mark-active) (buffer-substring-no-properties (region-beginning) (region-end)) (thing-at-point 'symbol))) (setq myword (replace-regexp-in-string " " "%20" myword)) (setq myurl (concat "http://www.answers.com/main/ntquery?s=" myword)) (w3m-browse-url myurl) )) The url used above is American Heritage Dict, which i find the best among some 4 or so prof dicts that are available free online. See also: A Review of 3 Dictionaries http://xahlee.org/Periodic_dosage_dir/bangu/dict_review.html in my setup, pressing 0 on the numerical keypad gets me to def of the current word or text selection from open sourced dict using Torsten Hilbrich's dict mode. Pressing Shift-0 gets me to American Heritage thru w3m to a website. Pressing Ctrl+0 gets me to Wikipedia in a browser. Xah ∑ http://xahlee.org/ ☄ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: flyspell-mode and two languages 2008-10-17 21:35 ` Xah @ 2008-10-17 22:02 ` Eli Zaretskii 2008-10-18 0:15 ` Nikolaj Schumacher [not found] ` <mailman.1409.1224288908.25473.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 9+ messages in thread From: Eli Zaretskii @ 2008-10-17 22:02 UTC (permalink / raw To: help-gnu-emacs > From: Xah <xahlee@gmail.com> > Date: Fri, 17 Oct 2008 14:35:52 -0700 (PDT) > > no answer to your specific question... but last time i tried flyspell > and was extremely dissatisfied with it. For primarily 2 reasons, in > order of importance: > > (1) it doesn't let me right click to select from a list of correct > spellings. What i have to do is to go to each word and do ispell-word. That is not true for as long as I can remember: nowadays right-clicking on a misspelled word pops up a menu of suggested replacements. How many years ago was that ``last time you tried flyspell''? > (2) its vocabulary is extremely small. Flyspell doesn't have a vocabulary of its own, it invokes either Ispell or Aspell behind the scenes. So it's up to you what speller and which dictionaries to install. Latest versions of both Ispell and Aspell are quite good, actually. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: flyspell-mode and two languages 2008-10-17 22:02 ` Eli Zaretskii @ 2008-10-18 0:15 ` Nikolaj Schumacher 2008-10-18 8:43 ` Eli Zaretskii [not found] ` <mailman.1409.1224288908.25473.help-gnu-emacs@gnu.org> 1 sibling, 1 reply; 9+ messages in thread From: Nikolaj Schumacher @ 2008-10-18 0:15 UTC (permalink / raw To: Eli Zaretskii; +Cc: help-gnu-emacs Eli Zaretskii <eliz@gnu.org> wrote: >> From: Xah <xahlee@gmail.com> >> Date: Fri, 17 Oct 2008 14:35:52 -0700 (PDT) >> > That is not true for as long as I can remember: nowadays > right-clicking on a misspelled word pops up a menu of suggested > replacements. How many years ago was that ``last time you tried > flyspell''? I never use the mouse in Emacs, but now that I check it says "mouse-2: correct word at point" That would be the /middle/ button, right? Since Macs don't have middle buttons, this binds it to secondary click: (define-key flyspell-mouse-map '[(down-mouse-3)] 'flyspell-correct-word) >> (2) its vocabulary is extremely small. > > Flyspell doesn't have a vocabulary of its own, it invokes either > Ispell or Aspell behind the scenes. So it's up to you what speller > and which dictionaries to install. Latest versions of both Ispell and > Aspell are quite good, actually. And doesn't speck use those two as well? regards, Nikolaj Schumacher ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: flyspell-mode and two languages 2008-10-18 0:15 ` Nikolaj Schumacher @ 2008-10-18 8:43 ` Eli Zaretskii 2008-10-18 8:55 ` Teemu Likonen 0 siblings, 1 reply; 9+ messages in thread From: Eli Zaretskii @ 2008-10-18 8:43 UTC (permalink / raw To: help-gnu-emacs > Cc: help-gnu-emacs@gnu.org > From: Nikolaj Schumacher <me@nschum.de> > Date: Sat, 18 Oct 2008 02:15:01 +0200 > > Eli Zaretskii <eliz@gnu.org> wrote: > > >> From: Xah <xahlee@gmail.com> > >> Date: Fri, 17 Oct 2008 14:35:52 -0700 (PDT) > >> > > That is not true for as long as I can remember: nowadays > > right-clicking on a misspelled word pops up a menu of suggested > > replacements. How many years ago was that ``last time you tried > > flyspell''? > > I never use the mouse in Emacs, but now that I check it says > "mouse-2: correct word at point" You can always use the function it runs, "M-x flyspell-correct-word". > That would be the /middle/ button, right? By default, yes. But I always remap them, because it's easier to right-click, especially with a mouse that has a wheel for its middle button. > > Flyspell doesn't have a vocabulary of its own, it invokes either > > Ispell or Aspell behind the scenes. So it's up to you what speller > > and which dictionaries to install. Latest versions of both Ispell and > > Aspell are quite good, actually. > > And doesn't speck use those two as well? What or who is speck? ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: flyspell-mode and two languages 2008-10-18 8:43 ` Eli Zaretskii @ 2008-10-18 8:55 ` Teemu Likonen 2008-10-18 9:24 ` Eli Zaretskii 0 siblings, 1 reply; 9+ messages in thread From: Teemu Likonen @ 2008-10-18 8:55 UTC (permalink / raw To: help-gnu-emacs Eli Zaretskii [2008-10-18 10:43 +0200]: > What or who is speck? Speck mode is an on-the-fly spelling checker: http://www.emacswiki.org/emacs/SpeckMode ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: flyspell-mode and two languages 2008-10-18 8:55 ` Teemu Likonen @ 2008-10-18 9:24 ` Eli Zaretskii 0 siblings, 0 replies; 9+ messages in thread From: Eli Zaretskii @ 2008-10-18 9:24 UTC (permalink / raw To: help-gnu-emacs > From: Teemu Likonen <tlikonen@iki.fi> > Date: Sat, 18 Oct 2008 11:55:27 +0300 > > Eli Zaretskii [2008-10-18 10:43 +0200]: > > > What or who is speck? > > Speck mode is an on-the-fly spelling checker: > > http://www.emacswiki.org/emacs/SpeckMode Thanks. In that case, yes, speck also uses Ispell or Aspell dictionaries. ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <mailman.1409.1224288908.25473.help-gnu-emacs@gnu.org>]
* Re: flyspell-mode and two languages [not found] ` <mailman.1409.1224288908.25473.help-gnu-emacs@gnu.org> @ 2008-10-18 22:59 ` Xah 0 siblings, 0 replies; 9+ messages in thread From: Xah @ 2008-10-18 22:59 UTC (permalink / raw To: help-gnu-emacs On Oct 17, 5:15 pm, Nikolaj Schumacher <m...@nschum.de> wrote: > > flyspell''? > > I never use the mouse in Emacs, but now that I check it says > "mouse-2: correct word at point" > > That would be the /middle/ button, right? Ah, the middle button. Hot damn. > Since Macs don't have middle buttons, this binds it to secondary click: Macs now do have middle button, since Apple introduced its hand- crippling Mighty mouse in 2005. http://en.wikipedia.org/wiki/Apple_Mighty_Mouse i have my might mouse sitting in dust. > (define-key flyspell-mouse-map '[(down-mouse-3)] 'flyspell-correct-word) It needs the hook, else emacs complaints that the map is nil when starting up. For newbies, here's the code: (add-hook 'flyspell-mode-hook (lambda () (define-key flyspell-mouse-map (kbd "<mouse-3>") 'flyspell-correct- word) ) ) Thanks for clearing up the issues. It seems now i don't have much need for speck-mode ... PS when one accumulated good sized vocabs, is there a place one can send the “~/.aspell.en.pws” file to its developers? Xah ∑ http://xahlee.org/ ☄ ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-10-18 22:59 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-10-17 20:02 flyspell-mode and two languages Memnon Anon 2008-10-17 20:11 ` harven 2008-10-17 21:35 ` Xah 2008-10-17 22:02 ` Eli Zaretskii 2008-10-18 0:15 ` Nikolaj Schumacher 2008-10-18 8:43 ` Eli Zaretskii 2008-10-18 8:55 ` Teemu Likonen 2008-10-18 9:24 ` Eli Zaretskii [not found] ` <mailman.1409.1224288908.25473.help-gnu-emacs@gnu.org> 2008-10-18 22:59 ` Xah
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).