all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Keith David Bershatsky <esq@lawlist.com>
Cc: 17775@debbugs.gnu.org
Subject: bug#17775: 24.4.50; `ispell-command-loop` -- portion of code occasionally returns `nil`.
Date: Sat, 14 Jun 2014 11:13:28 +0300	[thread overview]
Message-ID: <837g4jx61j.fsf@gnu.org> (raw)
In-Reply-To: <m2tx7oa0rk.wl%esq@lawlist.com>

> Date: Fri, 13 Jun 2014 15:43:43 -0700
> From: Keith David Bershatsky <esq@lawlist.com>
> 
> I believe that the following code snippet from `ispell.el` (which I commented out) is responsible for sporadically returning `nil` and causing the function `ispell-command-loop` to fail.  Because the issue is sporadic, I have not yet been able to catch it when running Emacs -Q.  Commenting out the code and replacing it with just `choices` appears to resolve the issue, but I'm not certain what negative affect that might have.
> 
>       (while choices
>          ;; EXPERIMENTAL WITHOUT THESE CONDITIONS ***
>       ;; (and choices
>       ;; (< (if (> (+ 7 (current-column) (length (car choices))
>       ;;        (if (> count ?~) 3 0))
>       ;;     (window-width))
>       ;;  (progn
>       ;;    (insert "\n")
>       ;;    (setq line (1+ line)))
>       ;;      line)
>       ;;    max-lines))

Do you have any evidence that this is the offending code, besides the
(maybe) fact that commenting it out makes the problem go away?  If so,
please show that evidence, because I see nothing in this snippet that
could attempt to treat nil as a number or a marker.

If there's no specific evidence that this snippet is the root cause,
then we need additional information to be able to fix this.  The code
you commented out is important (it handles the case that the number of
possible corrections of a word is more than a single line of the
window could hold), so removing it is not an option.

Here are some ways of providing the additional information:

  . provide a reproducible recipe, starting with "emacs -Q", that can
    be used to reliably reproduce the problem

  . run Emacs under GDB, set a breakpoint at xsignal2, load ispell.el
    (the source, not the .elc byte-compiled file), reproduce the
    error, then type "source /path/to/.gdbinit" at GDB prompt, and
    finally type "xbacktrace" to show the Lisp backtrace which will
    pinpoint the locus of the problem more accurately.

Thanks.

Btw, what was the width of the window when this problem happened?

> Here is a thread I opened a couple of weeks ago on Stackoverflow regarding this issue:
> 
> http://stackoverflow.com/questions/23820002/emacs-debugging-an-ispell-error

Please in the future reproduce the important part of your report here,
instead of pointing to some URL.  (I actually encourage you to report
any such problems directly here, not on Stackoverflow.  It's not like
Emacs lacks dedicated places where to report bugs.)

Here is the important part, for the benefit of others and for the
record:

> A few times each day, I receive an ispell error (like the following) that is corrected by restarting Emacs. Any ideas on how to further troubleshoot this type of error would be greatly appreciated.

> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>   ispell-command-loop(("Brae" "Br ea" "Br-ea" "Bra" "Bread" "Break" "Bream"
>     "Brew" "Bret" "Bred" "Area" "Urea") nil "Brea" 2229 2233)
>   ispell-process-line("^Brea, CA ~ 92821\n" nil)
>   ispell-region(1 6771)
>   ispell-buffer()
>   ispell()
>   call-interactively(ispell nil nil)
>   command-execute(ispell)

> The document being spell-checked is in tex-mode (built-in -- i.e., not using AUCTeX). The error (today) comes form a simple address at flush-left:

> 242 S. Orange Avenue\\
> Brea, CA ~ 92821

Thanks.





  reply	other threads:[~2014-06-14  8:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-13 22:43 bug#17775: 24.4.50; `ispell-command-loop` -- portion of code occasionally returns `nil` Keith David Bershatsky
2014-06-14  8:13 ` Eli Zaretskii [this message]
2014-06-14 16:54   ` Keith David Bershatsky
2015-12-26 15:28     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=837g4jx61j.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=17775@debbugs.gnu.org \
    --cc=esq@lawlist.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.