unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* "Wrong type argument: stringp, nil"??
@ 2006-08-28  6:44 Johs
  2006-08-28  7:09 ` marco.wahl
  0 siblings, 1 reply; 2+ messages in thread
From: Johs @ 2006-08-28  6:44 UTC (permalink / raw)


I have an .emacs file that only contains:

(if(string-match "^app"(getenv "HOSTNAME"))
(add-hook 'text-mode-hook 'flyspell-mode))

But when I start emacs I get the error:

"Wrong type argument: stringp, nil"

If I comment out the above two lines I get no error.

Any ideas?

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

* Re: "Wrong type argument: stringp, nil"??
  2006-08-28  6:44 "Wrong type argument: stringp, nil"?? Johs
@ 2006-08-28  7:09 ` marco.wahl
  0 siblings, 0 replies; 2+ messages in thread
From: marco.wahl @ 2006-08-28  7:09 UTC (permalink / raw)



Johs wrote:
> I have an .emacs file that only contains:
>
> (if(string-match "^app"(getenv "HOSTNAME"))
> (add-hook 'text-mode-hook 'flyspell-mode))
>
> But when I start emacs I get the error:
>
> "Wrong type argument: stringp, nil"
>
> If I comment out the above two lines I get no error.

> Any ideas?

The part

(getenv "HOSTNAME")

seems to return nil.  You can check this by evaluating this part.  I
recommend you to refine your code to handle that nil-case.

Possibly it suffices for your case to set the environment-variable
HOSTNAME to the right value.


Best wishes

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

end of thread, other threads:[~2006-08-28  7:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-28  6:44 "Wrong type argument: stringp, nil"?? Johs
2006-08-28  7:09 ` marco.wahl

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