From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#17165: 24.4.50; icomplete-exhibit: (wrong-type-argument number-or-marker-p nil) Date: Tue, 1 Apr 2014 18:59:18 -0700 (PDT) Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1396520414 25281 80.91.229.3 (3 Apr 2014 10:20:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Apr 2014 10:20:14 +0000 (UTC) To: 17165@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 03 12:20:07 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WVeLm-00030j-Mg for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Apr 2014 11:54:22 +0200 Original-Received: from localhost ([::1]:35302 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVATe-0003GT-Ry for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Apr 2014 22:00:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVATO-0002sl-Cb for bug-gnu-emacs@gnu.org; Tue, 01 Apr 2014 22:00:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVATD-0005SX-U1 for bug-gnu-emacs@gnu.org; Tue, 01 Apr 2014 22:00:14 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58720) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVATD-0005SA-RS for bug-gnu-emacs@gnu.org; Tue, 01 Apr 2014 22:00:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WVATC-0002gg-TO for bug-gnu-emacs@gnu.org; Tue, 01 Apr 2014 22:00:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Apr 2014 02:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17165 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.139640399310279 (code B ref -1); Wed, 02 Apr 2014 02:00:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Apr 2014 01:59:53 +0000 Original-Received: from localhost ([127.0.0.1]:59901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WVAT2-0002fi-Hm for submit@debbugs.gnu.org; Tue, 01 Apr 2014 21:59:52 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59755) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WVAT0-0002fa-DJ for submit@debbugs.gnu.org; Tue, 01 Apr 2014 21:59:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVASp-0005I3-PX for submit@debbugs.gnu.org; Tue, 01 Apr 2014 21:59:50 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:35932) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVASp-0005Hz-Mt for submit@debbugs.gnu.org; Tue, 01 Apr 2014 21:59:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVASg-0002fN-Vx for bug-gnu-emacs@gnu.org; Tue, 01 Apr 2014 21:59:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVASY-0005F5-8Y for bug-gnu-emacs@gnu.org; Tue, 01 Apr 2014 21:59:30 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:28885) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVASY-0005Ez-1m for bug-gnu-emacs@gnu.org; Tue, 01 Apr 2014 21:59:22 -0400 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s321xKwZ001425 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 2 Apr 2014 01:59:20 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s321xJaM011829 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Wed, 2 Apr 2014 01:59:20 GMT Original-Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s321xJ6r024958 for ; Wed, 2 Apr 2014 01:59:19 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:87618 Archived-At: 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)) ; <=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (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)) (>=3D (point) (nth 0 completion-in-region--data)) (<=3D (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=3D/c/Devel/emacs/snapshot/trunk --enable-checking=3Dyes,glyphs 'CFLAGS=3D-O0 -g3' LDFLAGS=3D-Lc:/Devel/emacs/lib 'CPPFLAGS=3D-DGC_MCHECK=3D1 -Ic:/Devel/emacs/include''