* Auto-spell-checking buffers when I close emacs
@ 2007-02-10 2:31 Kelly Jones
2007-02-10 3:12 ` Matthew Flaschen
0 siblings, 1 reply; 4+ messages in thread
From: Kelly Jones @ 2007-02-10 2:31 UTC (permalink / raw)
To: help-gnu-emacs
Is there any way I can get emacs to auto-spell-check all buffers when
I hit ctrl-x ctrl-c, and only exit if either 1) everything is spelled
correctly, or 2) I complete (or abort) the spellcheck process?
--
We're just a Bunch Of Regular Guys, a collective group that's trying
to understand and assimilate technology. We feel that resistance to
new ideas and technology is unwise and ultimately futile.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Auto-spell-checking buffers when I close emacs
2007-02-10 2:31 Auto-spell-checking buffers when I close emacs Kelly Jones
@ 2007-02-10 3:12 ` Matthew Flaschen
2007-02-10 3:36 ` Kelly Jones
0 siblings, 1 reply; 4+ messages in thread
From: Matthew Flaschen @ 2007-02-10 3:12 UTC (permalink / raw)
To: emacs
[-- Attachment #1.1: Type: text/plain, Size: 856 bytes --]
Kelly Jones wrote:
> Is there any way I can get emacs to auto-spell-check all buffers when
> I hit ctrl-x ctrl-c, and only exit if either 1) everything is spelled
> correctly, or 2) I complete (or abort) the spellcheck process?
>
Here's a start I just cooked up. Add it to your .emacs file. It will
spell-check quite literally every buffer (including internal buffers
like *Messages* and Completions. I'm new to emacs and don't know a way
around that yet. aspell needs to be installed.:
;Spell check
(setq-default ispell-program-name "aspell")
(defun spell-given-buffer (buffer)
"Spell-check a given buffer"
(set-buffer buffer)
(ispell-buffer))
(defun spell-all-buffers ()
"Spell-checks all buffers"
(interactive)
(mapcar 'spell-given-buffer (buffer-list)))
(add-to-list 'kill-emacs-query-functions 'spell-all-buffers)
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Auto-spell-checking buffers when I close emacs
2007-02-10 3:12 ` Matthew Flaschen
@ 2007-02-10 3:36 ` Kelly Jones
2007-02-10 3:51 ` Matthew Flaschen
0 siblings, 1 reply; 4+ messages in thread
From: Kelly Jones @ 2007-02-10 3:36 UTC (permalink / raw)
To: Matthew Flaschen; +Cc: emacs
On 2/9/07, Matthew Flaschen <matthew.flaschen@gatech.edu> wrote:
> Kelly Jones wrote:
> > Is there any way I can get emacs to auto-spell-check all buffers when
> > I hit ctrl-x ctrl-c, and only exit if either 1) everything is spelled
> > correctly, or 2) I complete (or abort) the spellcheck process?
> >
>
> Here's a start I just cooked up. Add it to your .emacs file. It will
> spell-check quite literally every buffer (including internal buffers
> like *Messages* and Completions. I'm new to emacs and don't know a way
> around that yet. aspell needs to be installed.:
>
> ;Spell check
> (setq-default ispell-program-name "aspell")
>
> (defun spell-given-buffer (buffer)
> "Spell-check a given buffer"
> (set-buffer buffer)
> (ispell-buffer))
>
> (defun spell-all-buffers ()
> "Spell-checks all buffers"
> (interactive)
> (mapcar 'spell-given-buffer (buffer-list)))
>
> (add-to-list 'kill-emacs-query-functions 'spell-all-buffers)
Thanks, Matthew. I feel really bad, because, after reading your post, I added:
(add-to-list 'kill-emacs-query-functions 'ispell-buffer)
to ~/.emacs, and that does exactly what I want. The only part I was
missing (until I read your post) was "kill-emacs-query-functions".
I overstated my request: I sometimes use emacs to edit wiki pages and
want emacs to remind me if I try to save w/o spellchecking.
--
We're just a Bunch Of Regular Guys, a collective group that's trying
to understand and assimilate technology. We feel that resistance to
new ideas and technology is unwise and ultimately futile.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Auto-spell-checking buffers when I close emacs
2007-02-10 3:36 ` Kelly Jones
@ 2007-02-10 3:51 ` Matthew Flaschen
0 siblings, 0 replies; 4+ messages in thread
From: Matthew Flaschen @ 2007-02-10 3:51 UTC (permalink / raw)
Cc: emacs
[-- Attachment #1.1: Type: text/plain, Size: 599 bytes --]
Kelly Jones wrote:
> Thanks, Matthew. I feel really bad, because, after reading your post, I
> added:
>
> (add-to-list 'kill-emacs-query-functions 'ispell-buffer)
>
> to ~/.emacs, and that does exactly what I want.
I assume you know that will only spell-check the current buffer.
Don't feel bad. I learned something, and it didn't take that long. :)
> I overstated my request: I sometimes use emacs to edit wiki pages and
> want emacs to remind me if I try to save w/o spellchecking.
Cool, I'm an admin on Wikipedia. I'm glad to help a fellow wikier :)
Matthew Flaschen
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-02-10 3:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-10 2:31 Auto-spell-checking buffers when I close emacs Kelly Jones
2007-02-10 3:12 ` Matthew Flaschen
2007-02-10 3:36 ` Kelly Jones
2007-02-10 3:51 ` Matthew Flaschen
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).