* bug#17165: 24.4.50; icomplete-exhibit: (wrong-type-argument number-or-marker-p nil)
@ 2014-04-02 1:59 Drew Adams
2016-04-29 19:52 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2014-04-02 1:59 UTC (permalink / raw)
To: 17165
I have some code that does this:
(when (and (featurep 'icomplete)
(natnump icicle-icomplete-mode-max-candidates))
(if (< nb-cands icicle-icomplete-mode-max-candidates)
(if (not icicle-last-icomplete-mode-value)
(icomplete-mode -1)
(icomplete-mode 1)
(icomplete-exhibit)) ; <==========
(icomplete-tidy)
(icomplete-mode -1)))
Once in a while I have seen this wrong-type-argument error. I suspect,
but I do not know, that it comes from this code in `icomplete-exhibit':
(if (and (or icomplete-show-matches-on-no-input
(> (icomplete--field-end) (icomplete--field-beg)))
...
I see that `icomplete--field-end' and `icomplete--field-beg' are defined
simply in terms of `completion-in-region--data'. And AFAICT, that
variable can be nil, in which case each of `icomplete--field-(end|beg)'
is nil also.
I see too that in minibuffer.el `completion-in-region--data' is
initialized to nil, and the code there takes care to test for a non-nil
value before trying to access its components using `nth':
(and completion-in-region--data
(and (eq (marker-buffer (nth 0 completion-in-region--data))
(current-buffer))
(>= (point) (nth 0 completion-in-region--data))
(<= (point)
(save-excursion
(goto-char (nth 1 completion-in-region--data))
(line-end-position)))
(funcall completion-in-region-mode--predicate)))
A naive guess is that the code in icomplete.el should do likewise:
ensure that `completion-in-region--data' is non-nil before applying
`nth' to it and then using the result in a numeric comparison.
HTH.
In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
of 2014-03-27 on ODIEONE
Bzr revision: 116884 lekktu@gmail.com-20140327173422-cr942b3hn7xjurks
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --prefix=/c/Devel/emacs/snapshot/trunk
--enable-checking=yes,glyphs 'CFLAGS=-O0 -g3'
LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1
-Ic:/Devel/emacs/include''
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#17165: 24.4.50; icomplete-exhibit: (wrong-type-argument number-or-marker-p nil)
2014-04-02 1:59 bug#17165: 24.4.50; icomplete-exhibit: (wrong-type-argument number-or-marker-p nil) Drew Adams
@ 2016-04-29 19:52 ` Lars Ingebrigtsen
2016-04-29 21:52 ` Drew Adams
0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2016-04-29 19:52 UTC (permalink / raw)
To: Drew Adams; +Cc: 17165
Drew Adams <drew.adams@oracle.com> writes:
> I have some code that does this:
>
> (when (and (featurep 'icomplete)
> (natnump icicle-icomplete-mode-max-candidates))
> (if (< nb-cands icicle-icomplete-mode-max-candidates)
> (if (not icicle-last-icomplete-mode-value)
> (icomplete-mode -1)
> (icomplete-mode 1)
> (icomplete-exhibit)) ; <==========
> (icomplete-tidy)
> (icomplete-mode -1)))
>
> Once in a while I have seen this wrong-type-argument error. I suspect,
> but I do not know, that it comes from this code in `icomplete-exhibit':
>
> (if (and (or icomplete-show-matches-on-no-input
> (> (icomplete--field-end) (icomplete--field-beg)))
> ...
Do you have a recipe for this bug?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#17165: 24.4.50; icomplete-exhibit: (wrong-type-argument number-or-marker-p nil)
2016-04-29 19:52 ` Lars Ingebrigtsen
@ 2016-04-29 21:52 ` Drew Adams
2016-12-07 19:58 ` Glenn Morris
0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2016-04-29 21:52 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 17165
> Do you have a recipe for this bug?
No. And I haven't been able to debug it.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#17165: 24.4.50; icomplete-exhibit: (wrong-type-argument number-or-marker-p nil)
2016-04-29 21:52 ` Drew Adams
@ 2016-12-07 19:58 ` Glenn Morris
0 siblings, 0 replies; 4+ messages in thread
From: Glenn Morris @ 2016-12-07 19:58 UTC (permalink / raw)
To: 17165-done
>> Do you have a recipe for this bug?
>
> No. And I haven't been able to debug it.
So it can't lead anywhere; closing.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-12-07 19:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-02 1:59 bug#17165: 24.4.50; icomplete-exhibit: (wrong-type-argument number-or-marker-p nil) Drew Adams
2016-04-29 19:52 ` Lars Ingebrigtsen
2016-04-29 21:52 ` Drew Adams
2016-12-07 19:58 ` Glenn Morris
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).