unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* ispell gives "Wrong type argument: stringp, nil"
@ 2005-10-13  6:42 Jeff D. Hamann
  2005-10-13  8:50 ` Peter Dyballa
       [not found] ` <mailman.11175.1129195674.20277.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 11+ messages in thread
From: Jeff D. Hamann @ 2005-10-13  6:42 UTC (permalink / raw)


I'm setting up a new installation of emacs+auctex+ispell+balh, blah,blah. 
FLyspell mode turns on and when I attempt  and when I attempt to either 
spell check the document or simply check a word I get the following error in 
the minibuffer:

Wrong type argument: stringp, nil

I've added the following lines to my .emacs file:

; set some reftex modes
(setq reftex-extra-bindings t)
(setq reftex-plug-info-AUCTeX t)
(setq bib-cite-use-reftex-view-crossref t)
(setq reftex-cite-format 'natbib)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)    ; with AUCTeX LaTeX mode
(add-hook 'latex-mode-hook 'turn-on-reftex)    ; with Emacs latex mode

;; to make auctex aware of style files and multi-file docs
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)

(require 'tex-site)

;;; try the flyspell stuff..
(add-hook 'tex-mode-hook (function (lambda () (setq ispell-parser 'tex))))
(setq ispell-dictionary "C:/ispell/dic/american.hash")
(add-hook 'text-mode-hook (lambda () (flyspell-mode 1)))

So I'm not sure what's going wrong. I've got an old installation on another 
machine (not sure the versions on the old machine) and it works just fine. 
I'm running emacs 21.3.1 with the ispell-3.2.06 downloaded from

http://www.fsci.fuk.kindai.ac.jp/aftp/pub/ptex/utils/

Any help?

Jeff.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ispell gives "Wrong type argument: stringp, nil"
  2005-10-13  6:42 ispell gives "Wrong type argument: stringp, nil" Jeff D. Hamann
@ 2005-10-13  8:50 ` Peter Dyballa
       [not found] ` <mailman.11175.1129195674.20277.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 11+ messages in thread
From: Peter Dyballa @ 2005-10-13  8:50 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 13.10.2005 um 08:42 schrieb Jeff D. Hamann:

> Any help?
>

Try to launch GNU Emacs with the option '--debug-init' -- it will open 
a new buffer *Backtrace* that will particularly contain a number, which 
will be the character position of the occurence of this bug. You then 
open .emacs and type: M-x goto-char <that number> RET. And there you'll 
be!

--
Greetings

   Pete

   Basic, n.:
	A programming language.  Related to certain social diseases in
that those who have it will not admit it in polite company.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ispell gives "Wrong type argument: stringp, nil"
       [not found] ` <mailman.11175.1129195674.20277.help-gnu-emacs@gnu.org>
@ 2005-10-13 16:42   ` Jeff D. Hamann
  2005-10-13 23:11     ` Peter Dyballa
  2005-12-27  6:55   ` Jeff D. Hamann
  1 sibling, 1 reply; 11+ messages in thread
From: Jeff D. Hamann @ 2005-10-13 16:42 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1035 bytes --]

I didn't get the results you described, so I tried simply using the 
"options->enter debugg on error..." option and then got the following 
results,

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  re-search-forward(nil 3 t)
  ispell-get-line(2 3 3)
  byte-code("\bb^[,HF Ç^[(B È \nÆ^[\x1c\x1d\x1e\x18\x19\x1e\x19\x0e\x1aÉ=§

I'm not sure where to go from here...

Jeff.



"Peter Dyballa" <Peter_Dyballa@Web.DE> wrote in message 
news:mailman.11175.1129195674.20277.help-gnu-emacs@gnu.org...
>
> Am 13.10.2005 um 08:42 schrieb Jeff D. Hamann:
>
>> Any help?
>>
>
> Try to launch GNU Emacs with the option '--debug-init' -- it will open a 
> new buffer *Backtrace* that will particularly contain a number, which will 
> be the character position of the occurence of this bug. You then

> open .emacs and type: M-x goto-char <that number> RET. And there you'll 
> be!
>
> --
> Greetings
>
>   Pete
>
>   Basic, n.:
> A programming language.  Related to certain social diseases in
> that those who have it will not admit it in polite company.
>
>
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ispell gives "Wrong type argument: stringp, nil"
  2005-10-13 16:42   ` Jeff D. Hamann
@ 2005-10-13 23:11     ` Peter Dyballa
  0 siblings, 0 replies; 11+ messages in thread
From: Peter Dyballa @ 2005-10-13 23:11 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 13.10.2005 um 18:42 schrieb Jeff D. Hamann:

> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>   re-search-forward(nil 3 t)
>   ispell-get-line(2 3 3)
>   byte-code("\bb^[,HF Ç^[(B È \nÆ^[\x1c\x1d\x1e\x18\x19\x1e\x19\x0e\x1aÉ=§
>
> I'm not sure where to go from here...
>

Me too! I remember that I've seen this myself recently -- and I think 
this only happens when ispell-program-name is aspell, the new standard 
in GNU Emacs 22.

Are sure that

	(setq ispell-dictionary "C:/ispell/dic/american.hash")

is correct? What values do you see when go 'Tools menu -> Spell 
Checking -> Change Dictionary' and then press space? I think you should 
use a name without path component and without extension, just one of 
the elements in that list of *Completions*, which should reflect what 
your system offers.

In theory aspell should know where its dictionaries are on disk (if 
not, then there's ispell-aspell-dict-dir). The dictionary's name isn't 
the technical thing with an extension, it's rather its purpose.

--
Greetings

   Pete

Bake Pizza not war!

^ permalink raw reply	[flat|nested] 11+ messages in thread

* ispell gives "Wrong type argument: stringp, nil"
@ 2005-12-27  6:49 Jeff D. Hamann
  0 siblings, 0 replies; 11+ messages in thread
From: Jeff D. Hamann @ 2005-12-27  6:49 UTC (permalink / raw)


I finally got the debugging information I needed....The *Backtrace* buffer 
yields the following when I attempt to run ispell...

I'n running ntemacs 21.3 on windows xp.

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  looking-at(nil)
  ispell-get-word(nil)
  ispell-word(nil nil nil)
  call-interactively(ispell-word)

Since I'm not about to start learning how to code in yet another langauge 
and I've got to get some work done, can someone lend a debugging hand?

I forgot to mention emacs is the biz!

Help?

Jeff.



"Peter Dyballa" <Peter_Dyballa@Web.DE> wrote in message 
news:mailman.11175.1129195674.20277.help-gnu-emacs@gnu.org...
>
> Am 13.10.2005 um 08:42 schrieb Jeff D. Hamann:
>
>> Any help?
>>
>
> Try to launch GNU Emacs with the option '--debug-init' -- it will open
> a new buffer *Backtrace* that will particularly contain a number, which
> will be the character position of the occurence of this bug. You then
> open .emacs and type: M-x goto-char <that number> RET. And there you'll
> be!
>
> --
> Greetings
>
>   Pete
>
>   Basic, n.:
> A programming language.  Related to certain social diseases in
> that those who have it will not admit it in polite company.
>
>
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ispell gives "Wrong type argument: stringp, nil"
       [not found] ` <mailman.11175.1129195674.20277.help-gnu-emacs@gnu.org>
  2005-10-13 16:42   ` Jeff D. Hamann
@ 2005-12-27  6:55   ` Jeff D. Hamann
  2005-12-27 12:26     ` Peter Dyballa
  1 sibling, 1 reply; 11+ messages in thread
From: Jeff D. Hamann @ 2005-12-27  6:55 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 870 bytes --]

I finally got the debugging information I needed....The *Backtrace* buffer 
yields the following when I attempt to run ispell...

I'n running ntemacs 21.3 on windows xp.

With ispell (3.2.02 from 
http://www.fsci.fuk.kindai.ac.jp/aftp/pub/ptex/utils/ ) yields,

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  looking-at(nil)
  ispell-get-word(nil)
  ispell-word(nil nil nil)
  call-interactively(ispell-word)

and version 3.1.20 yields


Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  re-search-forward(nil 77 t)
  ispell-get-line(1 77 133)
  byte-code("\bb^[,HF Ç^[(B È \nÆ^[\x1c\x1d\x1e\x18\x19\x1e\x19\x0e\x1aÉ=§

when I attempt to spell check the scratch buffer....

Since I'm not about to start learning how to code in yet another langauge 
and I've got to get some work done, can someone lend a debugging hand?

I forgot to mention emacs is the biz!

Jeff.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ispell gives "Wrong type argument: stringp, nil"
  2005-12-27  6:55   ` Jeff D. Hamann
@ 2005-12-27 12:26     ` Peter Dyballa
  2005-12-28 18:30       ` Kevin Rodgers
       [not found]       ` <mailman.20694.1135794740.20277.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 11+ messages in thread
From: Peter Dyballa @ 2005-12-27 12:26 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 27.12.2005 um 07:55 schrieb Jeff D. Hamann:

> With ispell (3.2.02 from
> http://www.fsci.fuk.kindai.ac.jp/aftp/pub/ptex/utils/ ) yields,
>
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>   looking-at(nil)
>   ispell-get-word(nil)
>   ispell-word(nil nil nil)
>   call-interactively(ispell-word)

Here obviously the function looking-at() receives something bad:

	looking-at is a built-in function in `C source code'.
	(looking-at regexp)
	
	Return t if text after point matches regular expression regexp.
	This function modifies the match data that `match-beginning',
	`match-end' and `match-data' access; save and restore the match
	data if you want to preserve them.

Could be you did not set up ispell-dictionary, ispell-program-name, 
ispell-extra-args, or ispell-local-dictionary-alist in case 
ispell-dictionary-alist is not sufficient? Entries in it like

	 ("british" "[A-Za-z]" "[^A-Za-z]" "[']" nil
	  ("-B")
	  nil iso-8859-1)

have at least regular expressions.

>
> and version 3.1.20 yields
>
>
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>   re-search-forward(nil 77 t)
>   ispell-get-line(1 77 133)
>   byte-code("\bb^[,HF Ç^[(B È \nÆ^[\x1c\x1d\x1e\x18\x19\x1e\x19\x0e\x1aÉ=§
>

Here something similiar takes place:

	re-search-forward is an interactive built-in function in `C source 
code'.
	(re-search-forward regexp &optional bound noerror count)
	
	Search forward from point for regular expression regexp.
	Set point to the end of the occurrence found, and return point.
	An optional second argument bounds the search; it is a buffer position.
	The match found must not extend after that position.
	Optional third argument, if t, means if fail just return nil (no 
error).
	  If not nil and not t, move to limit of search and return nil.
	Optional fourth argument is repeat count--search for successive 
occurrences.
	See also the functions `match-beginning', `match-end', `match-string',
	and `replace-match'.

Again no regexp is supplied.


In general it's the line below 'Debugger entered' that has caused the 
Lisp error. The lines below this one just reflect the function calls 
before this final one. So in both cases it's the nil in place of a 
(regexp) string that causes the Lisp error.

--
Greetings

   Pete

 From error to error, one discovers the entire truth.
                                                             -Sigmund 
Freud

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ispell gives "Wrong type argument: stringp, nil"
  2005-12-27 12:26     ` Peter Dyballa
@ 2005-12-28 18:30       ` Kevin Rodgers
       [not found]       ` <mailman.20694.1135794740.20277.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 11+ messages in thread
From: Kevin Rodgers @ 2005-12-28 18:30 UTC (permalink / raw)


Peter Dyballa wrote:
 > Am 27.12.2005 um 07:55 schrieb Jeff D. Hamann:
 >
 >> With ispell (3.2.02 from
 >> http://www.fsci.fuk.kindai.ac.jp/aftp/pub/ptex/utils/ ) yields,
 >>
 >> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
 >>   looking-at(nil)
 >>   ispell-get-word(nil)
 >>   ispell-word(nil nil nil)
 >>   call-interactively(ispell-word)
 >
 >
 > Here obviously the function looking-at() receives something bad:
 >
 >     looking-at is a built-in function in `C source code'.
 >     (looking-at regexp)
 >
 >     Return t if text after point matches regular expression regexp.
 >     This function modifies the match data that `match-beginning',
 >     `match-end' and `match-data' access; save and restore the match
 >     data if you want to preserve them.
 >
 > Could be you did not set up ispell-dictionary, ispell-program-name,
 > ispell-extra-args, or ispell-local-dictionary-alist in case
 > ispell-dictionary-alist is not sufficient?

That seems likely: ispell-get-word calls looking-at several times, with
the result of calling ispell-get-casechars and ispell-get-otherchars as
the REGEXP.  Those functions in turn depend on ispell-dictionary having
been set:  (assoc ispell-dictionary ispell-dictionary-alist)

-- 
Kevin

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ispell gives "Wrong type argument: stringp, nil"
       [not found]       ` <mailman.20694.1135794740.20277.help-gnu-emacs@gnu.org>
@ 2005-12-29 18:36         ` Jeff D. Hamann
  2005-12-29 23:03           ` Peter Dyballa
  2005-12-30 22:16           ` Kevin Rodgers
  0 siblings, 2 replies; 11+ messages in thread
From: Jeff D. Hamann @ 2005-12-29 18:36 UTC (permalink / raw)


So when I added (and I rarely mess with my .emacs file) the following line:

(add-hook 'tex-mode-hook (function (lambda () (setq ispell-parser 'tex))))
(setq ispell-dictionary "C:/ispell/dic/american.hash")
(add-hook 'text-mode-hook (lambda () (flyspell-mode 1)))

;; set something...
(assoc ispell-dictionary ispell-dictionary-alist)


I still got the same results...

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  looking-at(nil)
  ispell-get-word(nil)
  ispell-word(nil nil nil)
* call-interactively(ispell-word)

ugh..... am I doing something totally lame-o or is this a bug?

Jeff.


"Kevin Rodgers" <> wrote in message 
news:mailman.20694.1135794740.20277.help-gnu-emacs@gnu.org...
> Peter Dyballa wrote:
> > Am 27.12.2005 um 07:55 schrieb Jeff D. Hamann:
> >
> >> With ispell (3.2.02 from
> >> http://www.fsci.fuk.kindai.ac.jp/aftp/pub/ptex/utils/ ) yields,
> >>
> >> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
> >>   looking-at(nil)
> >>   ispell-get-word(nil)
> >>   ispell-word(nil nil nil)
> >>   call-interactively(ispell-word)
> >
> >
> > Here obviously the function looking-at() receives something bad:
> >
> >     looking-at is a built-in function in `C source code'.
> >     (looking-at regexp)
> >
> >     Return t if text after point matches regular expression regexp.
> >     This function modifies the match data that `match-beginning',
> >     `match-end' and `match-data' access; save and restore the match
> >     data if you want to preserve them.
> >
> > Could be you did not set up ispell-dictionary, ispell-program-name,
> > ispell-extra-args, or ispell-local-dictionary-alist in case
> > ispell-dictionary-alist is not sufficient?
>
> That seems likely: ispell-get-word calls looking-at several times, with
> the result of calling ispell-get-casechars and ispell-get-otherchars as
> the REGEXP.  Those functions in turn depend on ispell-dictionary having
> been set:  (assoc ispell-dictionary ispell-dictionary-alist)
>
> -- 
> Kevin
>
>
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ispell gives "Wrong type argument: stringp, nil"
  2005-12-29 18:36         ` Jeff D. Hamann
@ 2005-12-29 23:03           ` Peter Dyballa
  2005-12-30 22:16           ` Kevin Rodgers
  1 sibling, 0 replies; 11+ messages in thread
From: Peter Dyballa @ 2005-12-29 23:03 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 29.12.2005 um 19:36 schrieb Jeff D. Hamann:

> (add-hook 'tex-mode-hook (function (lambda () (setq ispell-parser 
> 'tex))))
> (setq ispell-dictionary "C:/ispell/dic/american.hash")
> (add-hook 'text-mode-hook (lambda () (flyspell-mode 1)))
>
> ;; set something...
> (assoc ispell-dictionary ispell-dictionary-alist)
>

You're doing much more than's needed. Why introduce trouble with 
flyspell? First make ispell work, then you can make your life 
complicated!

I wouldn't use the .hash extension -- but I always worked on UNIX with 
ispell.

A reasonable approach would be to unset (comment) all these. In Emacs 
you can find in the Tools menu the item 'Spell Checking' which leads to 
another menu. It contains 'Change Dictionary...'. Press it. In 
minibuffer you will asked to enter a name, better press <SPC>. A 
*Completions* buffer will open. There you'll find the names of the 
dictionaries known on your system. Choose one, maybe the right one. 
Change to the *Messages* buffer. You will find your choice there too. 
All you need to record in .emacs is this dictionary's name.

If you don't see anything in the *Completions* buffer you will have to 
set some options to tell the ispell programme where to find these 
dictionaries. But I think you're behind this stage ...


Make it simple! Go one step after the after! Once ispell works you can 
start debugging flyspell ...


My settings are:

	(setq ispell-dictionary "german8")
	(setq ispell-program-name "ispell")
;	(setq ispell-program-name "aspell")
	(if (string= "aspell" ispell-program-name)
	  (progn
;	    (setq ispell-extra-args "--norm-form=comp --norm-required 
--run-together")
	    (setq ispell-dictionary "deutsch")
	    (set-default 'ispell-local-dictionary ispell-dictionary);"deutsch")
	    (add-hook 'TeX-language-en-hook (function (lambda () 
(ispell-change-dictionary "british"))))
	    (add-hook 'TeX-language-de-hook (function (lambda () 
(ispell-change-dictionary ispell-dictionary))));"deutsch"))))
	    (message "Alles für «a»spell")
	    )
	    (setq ispell-dictionary "german8")
	    (add-hook 'TeX-language-en-hook (function (lambda () 
(ispell-change-dictionary "british"))))
	    (add-hook 'TeX-language-de-hook (function (lambda () 
(ispell-change-dictionary "deutsch8"))))
	    (message "Alles für »i«spell")
	)


--
Greetings

   Pete

"A lot of people mistake a short memory for a clear conscience."
Doug Larson

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ispell gives "Wrong type argument: stringp, nil"
  2005-12-29 18:36         ` Jeff D. Hamann
  2005-12-29 23:03           ` Peter Dyballa
@ 2005-12-30 22:16           ` Kevin Rodgers
  1 sibling, 0 replies; 11+ messages in thread
From: Kevin Rodgers @ 2005-12-30 22:16 UTC (permalink / raw)


Jeff D. Hamann wrote:
 > (setq ispell-dictionary "C:/ispell/dic/american.hash")

That is not a valid value for ispell-dictionary.  `M-x
ispell-change-dictionary' followed by `?' lists these options in the
*Completions* buffer:

american                           brasileiro
british                            castellano
castellano8                        czech
dansk                              default
deutsch                            deutsch8
english                            esperanto
esperanto-tex                      francais
francais-tex                       francais7
german                             german8
italiano                           nederlands
nederlands8                        norsk
norsk7-tex                         polish
portugues                          russian
slovak                             svenska

 > ;; set something...
 > (assoc ispell-dictionary ispell-dictionary-alist)

That has no effect whatsoever, so leave it out.

-- 
Kevin

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-12-30 22:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-13  6:42 ispell gives "Wrong type argument: stringp, nil" Jeff D. Hamann
2005-10-13  8:50 ` Peter Dyballa
     [not found] ` <mailman.11175.1129195674.20277.help-gnu-emacs@gnu.org>
2005-10-13 16:42   ` Jeff D. Hamann
2005-10-13 23:11     ` Peter Dyballa
2005-12-27  6:55   ` Jeff D. Hamann
2005-12-27 12:26     ` Peter Dyballa
2005-12-28 18:30       ` Kevin Rodgers
     [not found]       ` <mailman.20694.1135794740.20277.help-gnu-emacs@gnu.org>
2005-12-29 18:36         ` Jeff D. Hamann
2005-12-29 23:03           ` Peter Dyballa
2005-12-30 22:16           ` Kevin Rodgers
  -- strict thread matches above, loose matches on Subject: below --
2005-12-27  6:49 Jeff D. Hamann

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).