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#14153: 24.3.50; regression: `crm--choose-completion-string' expects wrong args Date: Sat, 6 Apr 2013 14:25:34 -0700 Message-ID: <9A0D74D4FB64407CB482839873E8B61D@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1365283630 14284 80.91.229.3 (6 Apr 2013 21:27:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Apr 2013 21:27:10 +0000 (UTC) To: 14153@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 06 23:27:12 2013 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 1UOadL-0007kQ-Sg for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Apr 2013 23:26:48 +0200 Original-Received: from localhost ([::1]:51833 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOadL-0000t2-EC for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Apr 2013 17:26:47 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOadG-0000sm-WC for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2013 17:26:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UOadE-0002nn-Hj for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2013 17:26:42 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33239) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOadE-0002ni-EH for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2013 17:26:40 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UOagU-0004v3-PR for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2013 17:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Apr 2013 21:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14153 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.136528376318828 (code B ref -1); Sat, 06 Apr 2013 21:30:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Apr 2013 21:29:23 +0000 Original-Received: from localhost ([127.0.0.1]:37348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UOafr-0004tc-0Q for submit@debbugs.gnu.org; Sat, 06 Apr 2013 17:29:23 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36002) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UOafl-0004tP-6D for submit@debbugs.gnu.org; Sat, 06 Apr 2013 17:29:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UOacQ-0002g7-KY for submit@debbugs.gnu.org; Sat, 06 Apr 2013 17:25:53 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:60864) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOacQ-0002g1-Hm for submit@debbugs.gnu.org; Sat, 06 Apr 2013 17:25:50 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOacO-0000Xx-2c for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2013 17:25:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UOacM-0002fZ-Ui for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2013 17:25:48 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:46025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOacM-0002fT-GT for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2013 17:25:46 -0400 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r36LPiJ2007460 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 6 Apr 2013 21:25:45 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r36LPh2P021856 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Sat, 6 Apr 2013 21:25:44 GMT Original-Received: from abhmt112.oracle.com (abhmt112.oracle.com [141.146.116.64]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r36LPhjd024310 for ; Sat, 6 Apr 2013 21:25:43 GMT Original-Received: from dradamslap1 (/71.202.147.44) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 06 Apr 2013 14:25:43 -0700 X-Mailer: Microsoft Office Outlook 11 Thread-Index: Ac4zDUZRvSIjQX0kQfWzxVksBExGjA== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 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: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:73226 Archived-At: A regression introduced in Emacs 23. There is no problem before 23. `completing-read-multiple' adds `crm--choose-completion-string' to `choose-completion-string-functions'. But `crm--choose-completion-string' has the wrong signature for a function on `choose-completion-string-functions'. Each such function should accept 4 args, as follows: CHOICE - the string to insert in the buffer, BUFFER - the buffer in which the choice should be inserted, MINI-P - non-nil if BUFFER is a minibuffer, and BASE-SIZE - the number of characters in BUFFER before the string being completed. But `crm--choose-completion-string' expects these args: (CHOICE BUFFER BASE-POSITION &rest IGNORED) In particular, it expects the third arg to be a position, not a Boolean indicator of whether BUFFER is a minibuffer. If the BUFFER is a minibuffer, so that MINI-P is non-nil (e.g. `t'), then `crm--choose-completion-string' mistakenly interprets that value as the BASE-POSITION. In code that I have this leads to this kind of error: Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p t) choose-completion-string("mode-line" # t) crm--choose-completion-string("mode-line" # t nil) run-hook-with-args-until-success(crm--choose-completion-string "mode-line" # t nil) Presumably no one has run into this because their code hasn't passed t as the value of MINI-P (?). In GNU Emacs 24.3.50.1 (i386-mingw-nt5.1.2600) of 2013-04-02 on ODIEONE Bzr revision: 112212 cyd@gnu.org-20130402033331-sqegwhqh7u1o0ars Windowing system distributor `Microsoft Corp.', version 5.1.2600 Configured using: `configure --with-gcc (4.7) --no-opt --enable-checking --cflags -IC:/Devel/emacs/build/include --ldflags -LC:/Devel/emacs/build/lib'