* bug#17775: 24.4.50; `ispell-command-loop` -- portion of code occasionally returns `nil`.
@ 2014-06-13 22:43 Keith David Bershatsky
2014-06-14 8:13 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Keith David Bershatsky @ 2014-06-13 22:43 UTC (permalink / raw
To: 17775
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))
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
Thanks,
Keith
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
In GNU Emacs 24.4.50.1 (x86_64-apple-darwin10.8.0, NS appkit-1038.36 Version 10.6.8 (Build 10K549))
of 2014-06-01 on MP.local
Repository revision: 117215 lekktu@gmail.com-20140601162519-4dacx2w0ak528z2r
Windowing system distributor `Apple', version 10.3.1038
Configured using:
`configure --with-ns'
Configured features:
ACL LIBXML2 ZLIB
Important settings:
locale-coding-system: utf-8-unix
Major mode: TeX
Minor modes in effect:
bc-mode: t
as-mode: t
ds-mode: t
ml-mode: t
sb-mode: t
lawlist-linum-mode: t
vl-mode: t
vr-mode: t
hr-mode: t
fs-mode: t
yas-minor-mode: t
sd-mode: t
tb-mode: t
font-lock-mode: t
Recent input:
o i n t l y SPC d e s i g n <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> s l
<backspace> e l e c t e d SPC l i c e n s e d SPC r
e a l SPC e s t a t e SPC b r o k e r SPC ( s u p r
a ) <left> <M-S-left> <tab> i s <s-right> , SPC t h
e SPC p a r t i e s SPC s h a l l SPC d e c i d e SPC
w h a t SPC " f i x t u r e s " SPC s h a l l SPC r
e m a i n SPC i n SPC t h e SPC f a m i l l y SPC r
e s i d e <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
C h e r o k e e SPC P r o <backspace> <backspace> p
<backspace> <backspace> p r o p e r t y SPC a s SPC
p a r t SPC o f SPC t h SPC s a l e . <M-left> <left>
<left> <left> <left> <left> e s-s <M-left> <M-left>
<M-left> <M-left> a n d SPC i n c l u d e d SPC <down>
<up> <s-right> <left> SPC o f SPC t h e SPC h o e <backspace>
m e s-s s-: a a a a a a <left> s-N s-w k <escape> x
e m a c s SPC b u g SPC <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> r e p o r t - e m a c s - b u g <retur
n>
Recent messages:
Ispell process killed
Starting new Ispell process /Users/HOME/.0.data/.0.emacs/elpa/bin/aspell with english dictionary...
Turned ON `fs-mode`.
Turned ON `vl-mode`.
Type C-c C-x C-z to exit MIME mode, and type C-c C-x ? to get help.
Saving...done
Mark set
[k]ill or [s]ave draft?
Loading msgdb for +/Users/HOME/.0.data/.0.emacs/.0.mail/msgdb/imap/mail.lawlist.com/lawlist/INBOX.Drafts/spool...done
*beep*
Load-path shadows:
/Users/HOME/.0.data/.0.emacs/.0.flim/md4 hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/md4
/Users/HOME/.0.data/.0.emacs/.0.flim/hex-util hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/hex-util
/Users/HOME/.0.data/.0.emacs/.0.flim/sasl hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/net/sasl
/Users/HOME/.0.data/.0.emacs/.0.flim/sasl-ntlm hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/net/sasl-ntlm
/Users/HOME/.0.data/.0.emacs/.0.flim/sasl-digest hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/net/sasl-digest
/Users/HOME/.0.data/.0.emacs/.0.flim/sasl-cram hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/net/sasl-cram
/Users/HOME/.0.data/.0.emacs/.0.flim/ntlm hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/net/ntlm
/Users/HOME/.0.data/.0.emacs/.0.flim/hmac-md5 hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/net/hmac-md5
/Users/HOME/.0.data/.0.emacs/.0.flim/hmac-def hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/net/hmac-def
/Users/HOME/.0.data/.0.emacs/.0.wl/rfc2368 hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/mail/rfc2368
/Users/HOME/.0.data/.0.emacs/.0.wl/utf7 hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/gnus/utf7
/Users/HOME/.0.data/.0.emacs/.0.simi/smime hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/gnus/smime
/Users/HOME/.0.data/.0.emacs/.0.simi/pgg hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/obsolete/pgg
/Users/HOME/.0.data/.0.emacs/.0.simi/pgg-pgp5 hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/obsolete/pgg-pgp5
/Users/HOME/.0.data/.0.emacs/.0.simi/pgg-pgp hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/obsolete/pgg-pgp
/Users/HOME/.0.data/.0.emacs/.0.simi/pgg-parse hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/obsolete/pgg-parse
/Users/HOME/.0.data/.0.emacs/.0.simi/pgg-gpg hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/obsolete/pgg-gpg
/Users/HOME/.0.data/.0.emacs/.0.simi/pgg-def hides /Users/HOME/.0.data/.0.emacs/Emacs_06_01_2014.app/Contents/Resources/lisp/obsolete/pgg-def
Features:
(shadow emacsbug modb-legacy wl-mime mime-edit pgg-parse pccl pccl-20
signature mime-setup mail-mime-setup semi-setup mime-pgp pgg-def
mime-play filename mime-image modb-standard elmo-imap4 mule-util
disp-table bbdb-autoloads lawlist-wl wl-demo wl-draft eword-encode
wl-template sendmail elmo-net elmo-cache elmo-map elmo-dop wl-news
wl-address wl-thread wl-folder wl wl-e21 wl-spam wl-action wl-summary
wl-refile wl-util pp elmo-flag elmo-localdir wl-message elmo-mime
mmelmo-buffer mmelmo-imap mime-view mime-conf calist semi-def mmimap
mime-parse mmbuffer mmgeneric elmo-filter elmo-multi elmo-spam
elsp-header elsp-generic elmo elmo-signal wl-highlight wl-vars
wl-version elmo-msgdb modb modb-generic modb-entity luna mime
elmo-util emu invisible inv-23 poem poem-e20 poem-e20_3 eword-decode
std11 elmo-date elmo-vars elmo-version w3m-load mime-w3m w3m
browse-url doc-view jka-compr image-mode w3m-hist w3m-fb bookmark-w3m
w3m-ems w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util smiley
gnus-art mm-uu mml2015 mm-view mml-smime smime savehist lawlist-vr-hr
lawlist-whitespace lawlist-github conf-mode log-edit add-log find-lisp
package esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg eldoc
esh-groups eshell esh-module esh-mode esh-util dired-x view tramp
tramp-compat tramp-loaddefs trampver server grep epa epg epg-config
diff-mode autorevert filenotify log-view pcvs-util ido time-stamp
vc-git vc vc-dispatcher ediff-merg ediff-wind ediff-diff ediff-mult
ediff-help ediff-init ediff-util ediff rx ert ewoc debug eieio-base
lawlist-calculator ps-print ps-def lpr lawlist-flyspell bbdb timezone
find-func dired-aux lawlist-yasnippet help-mode multiple-cursors
mc-separate-operations rectangular-region-mode mc-mark-more thingatpt
mc-cycle-cursors mc-edit-lines multiple-cursors-core rect saveplace
lawlist-tex-mode pcase compile shell pcomplete comint ansi-color ring
skeleton compare-w lawlist-text-mode lawlist-desktop frameset
lawlist-tabbar lawlist-org lawlist-calendar edmacro kmacro derived
lawlist-toodledo advice url-http url-auth url-gw url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util url-parse auth-source eieio byte-opt bytecomp byte-compile
cconv eieio-core password-cache url-vars mailcap json xml noutline
outline easy-mmode gnus-sum gnus-group gnus-undo gnus-start gnus-cloud
nnimap nnmail mail-source tls utf7 mel path-util mime-def alist
mcharset mcs-20 mcs-e20 pcustom pces pces-e20 pces-20 broken poe pym
static apel-ver product netrc nnoo parse-time gnus-spec gnus-int
gnus-range message cl-macs dired format-spec rfc822 mml easymenu
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus
gnus-ems nnheader gnus-util mail-utils mm-util help-fns mail-prsvr
wid-edit cl gv cl-loaddefs cl-lib time-date tooltip electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode
register page menu-bar rfn-eshadow timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
cocoa ns multi-tty emacs)
Memory information:
((conses 16 824704 112213)
(symbols 48 56845 0)
(miscs 40 1185 3008)
(strings 32 118918 16273)
(string-bytes 1 3964814)
(vectors 16 46183)
(vector-slots 8 1207819 82679)
(floats 8 1222 56)
(intervals 56 5794 716)
(buffers 960 20))
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#17775: 24.4.50; `ispell-command-loop` -- portion of code occasionally returns `nil`.
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
2014-06-14 16:54 ` Keith David Bershatsky
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2014-06-14 8:13 UTC (permalink / raw
To: Keith David Bershatsky; +Cc: 17775
> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#17775: 24.4.50; `ispell-command-loop` -- portion of code occasionally returns `nil`.
2014-06-14 8:13 ` Eli Zaretskii
@ 2014-06-14 16:54 ` Keith David Bershatsky
2015-12-26 15:28 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Keith David Bershatsky @ 2014-06-14 16:54 UTC (permalink / raw
To: Eli Zaretskii; +Cc: 17775
My average `(window-width)` is 168 with `linum-mode` active. I have `visual-line-mode` active. As to the first frame that is generated by Emacs, scroll bars are removed with code when Emacs starts -- `(modify-all-frames-parameters (list (cons 'vertical-scroll-bars nil)))` -- this ensures that my initial calling of `toggle-frame-maximized` (when Emacs loads) expands the frame to the full screen width. As to each new frame, scroll bars are not initially present -- `(add-to-list 'default-frame-alist '(vertical-scroll-bars . nil))`. Scroll bars are added or removed with a minor mode that calculates whether the the text is longer than the visual window -- `(set-window-scroll-bars selected-window 0 'right nil)` or `(set-window-scroll-bars selected-window 0 'right nil)`. Scroll bar mode is now on an idle timer, but was previously on the `post-command-hook` -- the spell check error occurs sporadically in either circumstance.
My linum-mode is using a modified version of something I borrowed from Stackoverflow:
http://stackoverflow.com/a/10593165/2112489
(defun my-lawlist-linum-get-format-string ()
(let* ((width (length (number-to-string
(count-lines (point-min) (point-max)))))
(format (concat "%" (number-to-string width) "d")))
(setq my-lawlist-linum-format-string format)))
I apologize for not writing up a better initial bug report and I'll update this bug report when I have more useful information. You are correct in your assumption that the only evidence I have (that the code snippet caused the problem) iss that the error seems to go away by commenting it out.
Keith
---------------------------------------
On Jun 14, 2014, at 1:13 AM, Eli Zaretskii wrote:
>
> Btw, what was the width of the window when this problem happened?
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#17775: 24.4.50; `ispell-command-loop` -- portion of code occasionally returns `nil`.
2014-06-14 16:54 ` Keith David Bershatsky
@ 2015-12-26 15:28 ` Lars Ingebrigtsen
0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2015-12-26 15:28 UTC (permalink / raw
To: Keith David Bershatsky; +Cc: 17775
Keith David Bershatsky <esq@lawlist.com> writes:
> I apologize for not writing up a better initial bug report and I'll
> update this bug report when I have more useful information. You are
> correct in your assumption that the only evidence I have (that the
> code snippet caused the problem) iss that the error seems to go away
> by commenting it out.
More information was requested, but no response was given within a few
months, so I'm closing this bug report. If the problem still exists,
please reopen this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-12-26 15:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2014-06-14 16:54 ` Keith David Bershatsky
2015-12-26 15:28 ` Lars Ingebrigtsen
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.