Path: utzoo!utgpu!attcan!uunet!yale!Ram-Ashwin From: Ram-Ashwin@cs.yale.edu (Ashwin Ram) Newsgroups: comp.emacs Subject: Re: ispell.el Message-ID: <40487@yale-celray.yale.UUCP> Date: 17 Oct 88 13:41:40 GMT References: <1988Oct14.195628.2611@radio.uucp> Sender: root@yale.UUCP Reply-To: Ram-Ashwin@cs.yale.edu (Ashwin Ram) Organization: Computer Science, Yale University, New Haven, CT 06520-2158 Lines: 45 In-reply-to: brian@radio.uucp (Brian Glendenning) In article <1988Oct14.195628.2611@radio.uucp>, brian@radio.uucp (Brian Glendenning) writes: > I have recently gotten a copy of ispell and ispell.el (from different sources). > When I try to ispell-buffer or ispell-region I initially get an "Args out of > range" error, with the point and mark positions listed. If I ignore the error > message and try again everything works fine. Turns out that the first time you run ispell, it creates a working buffer using get-buffer-create which, although it isn't set-buffer'd to as yet, screws up Emacs's idea of which the current buffer is. (If you message the (current-buffer) after the "Prefobnicating" message, it prints out a buffer that isn't the buffer you're currently in, nor the newly created buffer. I don't really know why.) Anyway, the easy fix to this problem is to manually ensure that Emacs is in the current buffer by adding a set-buffer call. Use the following diff to add a (set-buffer this-buf) line before the (narrow-to-region start end) in ispell-region: *** ispell.el~ Mon Oct 17 09:20:10 1988 --- ispell.el Mon Oct 17 09:20:11 1988 *************** *** 393,398 (save-excursion (save-restriction (message "Prefrobnicating...") (narrow-to-region start end) (sit-for 0) (set-syntax-table ispell-syntax-table) --- 393,399 ----- (save-excursion (save-restriction (message "Prefrobnicating...") + (set-buffer this-buf) (narrow-to-region start end) (sit-for 0) (set-syntax-table ispell-syntax-table) Hope this helps. -- Ashwin. ARPA: Ram-Ashwin@cs.yale.edu UUCP: {decvax,ucbvax,harvard,cmcl2,...}!yale!Ram-Ashwin BITNET: Ram@yalecs