[arch-general] Spell Checking in Emacs
I have emacs 23.2 running in a normal text console and am trying to spell check using the ispell.el facility in the emacs lisp libraries. I also installed aspell and espell-en packages to resolve the binary program to be used by the emacs ispell function. When I do any of the emacs commands like ispell-buffer or ispell-region and the like, I keep getting a message in the prompt line of emacs saying "Text is read-only" The buffer where I am testing this is most definitely not a read-only buffer. I tested aspell out in a normal terminal on a test text file and that seemed to work OK. Do I have to do anything else to get this working right? I did not set up any config files for aspell; I'm not sure if I have to or not. Can anyone help me out?
Hi Steve,
When I do any of the emacs commands like ispell-buffer or ispell-region and the like, I keep getting a message in the prompt line of emacs saying "Text is read-only"
That only concerns the contents auf the mini-buffer (where you enter commands). Do you use backspace in the mini-buffer? Do you do 'M-x ispell-change-dictionary' and select a dictionary, and then 'M-x ispell-buffer'? HTH, Mathias
On Tue, Sep 14, 2010 at 06:24:11PM +0200, Mathias Huber wrote:
Hi Steve,
When I do any of the emacs commands like ispell-buffer or ispell-region and the like, I keep getting a message in the prompt line of emacs saying "Text is read-only"
That only concerns the contents auf the mini-buffer (where you enter commands). Do you use backspace in the mini-buffer?
No, I type m-x followed by the commands I listed above. Right now, I've been trying ispell-buffer where the buffer is a plain text file with some text including intentionally miss-spelled words.
Do you do 'M-x ispell-change-dictionary' and select a dictionary, and then 'M-x ispell-buffer'?
I usually just do the ispell-buffer or whatever. Once I tried the change-dictionary command and hit enter to accept the current default. I just tried to ispell-region on this very message I'm typing right now and I still got the Text is read-only message. I've used ispell a long time ago without these problems but now I can't use it at all! I can use aspell out in the text console with no problem but it just won't work in emacs! I don't understand what you mean about the error applying to the mini buffer; I'm trying to spell check the main body, the text; not the prompt. Any other ideas why this isn't working?
Do I have to set up anything in advance in order to use ispell in emacs with the aspell program? See the message below for the full story. I can't get past this read-only problem. On Tue, Sep 14, 2010 at 09:50:22AM -0700, Steve Holmes wrote:
On Tue, Sep 14, 2010 at 06:24:11PM +0200, Mathias Huber wrote:
Hi Steve,
When I do any of the emacs commands like ispell-buffer or ispell-region and the like, I keep getting a message in the prompt line of emacs saying "Text is read-only"
That only concerns the contents auf the mini-buffer (where you enter commands). Do you use backspace in the mini-buffer?
No, I type m-x followed by the commands I listed above. Right now, I've been trying ispell-buffer where the buffer is a plain text file with some text including intentionally miss-spelled words.
Do you do 'M-x ispell-change-dictionary' and select a dictionary, and then 'M-x ispell-buffer'?
I usually just do the ispell-buffer or whatever. Once I tried the change-dictionary command and hit enter to accept the current default.
I just tried to ispell-region on this very message I'm typing right now and I still got the Text is read-only message. I've used ispell a long time ago without these problems but now I can't use it at all! I can use aspell out in the text console with no problem but it just won't work in emacs!
I don't understand what you mean about the error applying to the mini buffer; I'm trying to spell check the main body, the text; not the prompt.
Any other ideas why this isn't working?
I found some more information concerning the ispell problem with emacs. It seems that if I do ispell-buffer, region, or word on clean data (correctly spelled), I don't get any errors in the mini buffer and in fact, ispell-word even tells me the word is correct. Fine - that works as it should. However, as soon as there is a miss-spelled word to report, then is when I get the error in the mini-buffer saying that the text is read-only. It would appear that maybe ispell can't open a buffer to display the word choices. I don't know emacs lisp well enough to try and debug this thing but it's beginning to look like nobody else here is getting the problem or doesn't use this combination with emacs. Any other ideas out there?
Steve Holmes writes:
I found some more information concerning the ispell problem with emacs. It seems that if I do ispell-buffer, region, or word on clean data (correctly spelled), I don't get any errors in the mini buffer and in fact, ispell-word even tells me the word is correct. Fine - that works as it should. However, as soon as there is a miss-spelled word to report, then is when I get the error in the mini-buffer saying that the text is read-only. It would appear that maybe ispell can't open a buffer to display the word choices. I don't know emacs lisp well enough to try and debug this thing but it's beginning to look like nobody else here is getting the problem or doesn't use this combination with emacs. Any other ideas out there?
Try flyspell-mode[1]. AFAIK, it's bundled with Emacs 23 or later. References: [1] http://www.emacswiki.org/emacs/FlySpell HTH -- Ashish SHUKLA | GPG: F682 CDCC 39DC 0FEA E116 20B6 C746 CFA9 E74F A4B0 freebsd.org!ashish | http://people.freebsd.org/~ashish/ Avoid Success At All Costs !!
Steve Holmes writes:
Do I have to set up anything in advance in order to use ispell in emacs with the aspell program? See the message below for the full story. I can't get past this read-only problem.
(setq ispell-program-name (executable-find "aspell")) HTH -- Ashish SHUKLA | GPG: F682 CDCC 39DC 0FEA E116 20B6 C746 CFA9 E74F A4B0 freebsd.org!ashish | http://people.freebsd.org/~ashish/ Avoid Success At All Costs !!
On Fri, Sep 17, 2010 at 05:02:24AM +0530, Ashish SHUKLA wrote:
Steve Holmes writes:
Do I have to set up anything in advance in order to use ispell in emacs with the aspell program? See the message below for the full story. I can't get past this read-only problem.
(setq ispell-program-name (executable-find "aspell"))
That fixed it! It seems that the documentation I followed, suggested a different setting to specify the aspell binary but this setting you gave me enables it to work properly now. Thanks and sorry for the repeated queries to the list; I thought there might have been a problem with how it was implemented with Arch. So Now i'm off to write those perfectly spelled e-mails. <smile>
Steve Holmes writes:
On Fri, Sep 17, 2010 at 05:02:24AM +0530, Ashish SHUKLA wrote:
Steve Holmes writes:
Do I have to set up anything in advance in order to use ispell in emacs with the aspell program? See the message below for the full story. I can't get past this read-only problem.
(setq ispell-program-name (executable-find "aspell"))
That fixed it! It seems that the documentation I followed, suggested a different setting to specify the aspell binary but this setting you gave me enables it to work properly now. Thanks and sorry for the repeated queries to the list; I thought there might have been a problem with how it was implemented with Arch.
So Now i'm off to write those perfectly spelled e-mails. <smile>
Use flyspell to make it comfortable :). -- Ashish SHUKLA | GPG: F682 CDCC 39DC 0FEA E116 20B6 C746 CFA9 E74F A4B0 freebsd.org!ashish | http://people.freebsd.org/~ashish/ Avoid Success At All Costs !!
wahjava.ml@gmail.com (Ashish SHUKLA) writes:
Steve Holmes writes:
On Fri, Sep 17, 2010 at 05:02:24AM +0530, Ashish SHUKLA wrote:
Steve Holmes writes:
Do I have to set up anything in advance in order to use ispell in emacs with the aspell program? See the message below for the full story. I can't get past this read-only problem.
(setq ispell-program-name (executable-find "aspell"))
That fixed it! It seems that the documentation I followed, suggested a different setting to specify the aspell binary but this setting you gave me enables it to work properly now. Thanks and sorry for the repeated queries to the list; I thought there might have been a problem with how it was implemented with Arch.
So Now i'm off to write those perfectly spelled e-mails. <smile>
Use flyspell to make it comfortable :).
As some people know using flyspell with some modes are not fully supported. I know that flyspell with enriched mode used to give people problems but I believe that has been fixed. What would be ideal is to get Hunspell working if you follow the emacswiki I still do not have a valid Hunspell working on two operating systems. One being Arch, the other OpenIndiana so I had to resort back to aspell for both. A little while ago I was thinking about filing a bug report against emacs and Hunspell for that very reason but haven't had the time to do so. Rthoreau
Le mercredi 20 à 22:47, Rthoreau a écrit :
What would be ideal is to get Hunspell working if you follow the emacswiki I still do not have a valid Hunspell working on two operating systems. One being Arch, the other OpenIndiana so I had to resort back to aspell for both.
Is the problem that you are sharing you .emacs between the two OSs, but Hunspell is available on only one? In that case, what about: (if (string-match "-ARCH" operating-system-release) (use hunspell) (fallback to aspell)) Or: (if (executable-find "hunspell") (use hunspell...) (fallback to aspell)) -- Fred
Frédéric Perrin <frederic.perrin@resel.fr> writes:
Le mercredi 20 à 22:47, Rthoreau a écrit :
What would be ideal is to get Hunspell working if you follow the emacswiki I still do not have a valid Hunspell working on two operating systems. One being Arch, the other OpenIndiana so I had to resort back to aspell for both.
Is the problem that you are sharing you .emacs between the two OSs, but Hunspell is available on only one? In that case, what about:
(if (string-match "-ARCH" operating-system-release) (use hunspell) (fallback to aspell))
Or:
(if (executable-find "hunspell") (use hunspell...) (fallback to aspell))
Here is the link I was referring too, I actually have two spell checkers one is Hunspell the other is Aspell. Hunspell works great on the command line but is still borked in emacs. Of course I get a similar problem in Arch, but with function unfound if I copy the examples out of the emacswiki my .emacs file will not even run due to errors, not to mention even if it is tweaked to my configuration. http://opensolaris.org/jive/thread.jspa?threadID=107384 If you try to spell check a word by using "M-x ispell-word", you get the error message "ispell-get-word: Wrong type argument: stringp, nil". "M-x ispell-buffer" produces Spell checking test-buffer using hunspell with en-US dictionary... Spell-checking using hunspell with en-US dictionary done ispell-get-line: Wrong type argument: stringp, nil So if anyone has a valid .emacs hunspell under Arch let me know as of yet I have no idea as to why Hunspell won't work. That is why I use Aspell at the moment. Rthoreau
participants (5)
-
Frédéric Perrin
-
Mathias Huber
-
Rthoreau
-
Steve Holmes
-
wahjava.ml@gmail.com