Question

In every .tex file, when I type A (shift a) to accept a new word, I get the error message Wrong type argument: sequencep, 1 in the minibuffer or in the message buffer:

ispell-add-per-file-word-list: Wrong type argument: sequencep, 1

If I add, at the bottom of the file, a line similar to the following:

% LocalWords:  hello

I get can (A)ccept a limited number of words, by and large up to 50 characters of new words, that is up to the end of the line. Then I get the same error again. If I add another line like the previous, therefore:

% LocalWords:  hello <words added by ispell ...>
% LocalWords:  again 

I can go on again up to the end of the line. Thereafter the error shows again.

As for my init file, I have these apparently innocent lines:

(setenv "DICPATH" (concat exec-directory "../hunspell/dict"))
(setq-default ispell-program-name
  (concat exec-directory "../hunspell/hunspell.exe"))
(setq ispell-extra-args '("-t"))
(setq ispell-local-dictionary-alist
      '(
        (nil       "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-d" "en_US") nil utf-8)
        ("english" "[A-Za-z]" "[^A-Za-z]" "['.]"    nil ("-d" "en_GB") nil utf-8)

        ("italian"
"[A-Z\300\301\310\311\314\315\322\323\331\332a-z\340\341\350\351\354\355\363\371\372]"
 "[^A-Z\300\301\310\311\314\315\322\323\331\332a-z\340\341\350\351\354\355\363\371\372]"
        "[-.]" nil ("-d" "it_IT") nil iso-8859-1)

        ))

In summary, whenever it is time to start a new line of the local file dictionary, ispell-add-per-file-word-list gets into troubles.

Was it helpful?

Solution

This suggested workaround fixes the problem for me. Excerpting it here for posterity, the workaround is to add the following to your Emacs start-up code:

(add-hook 'TeX-mode-hook #'(lambda ()
                             (setq-local comment-padding " ")))

The root cause is an Emacs bug that has subsequently been fixed. So this problem should go away entirely in Emacs 24.4 and later.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top