From unknown Thu Aug 21 22:59:58 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#11715 <11715@debbugs.gnu.org> To: bug#11715 <11715@debbugs.gnu.org> Subject: Status: 24.1; Error in post-command-hook: wrong-number-of-arguments - read-file-internal Reply-To: bug#11715 <11715@debbugs.gnu.org> Date: Fri, 22 Aug 2025 05:59:58 +0000 retitle 11715 24.1; Error in post-command-hook: wrong-number-of-arguments -= read-file-internal reassign 11715 emacs submitter 11715 "Drew Adams" severity 11715 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 15 11:40:02 2012 Received: (at submit) by debbugs.gnu.org; 15 Jun 2012 15:40:02 +0000 Received: from localhost ([127.0.0.1]:44147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SfYcz-0007Um-H4 for submit@debbugs.gnu.org; Fri, 15 Jun 2012 11:40:02 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53060) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SfYcx-0007UU-BC for submit@debbugs.gnu.org; Fri, 15 Jun 2012 11:40:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SfYa2-0003Gf-9K for submit@debbugs.gnu.org; Fri, 15 Jun 2012 11:36:59 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:49755) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfYa2-0003Ga-5e for submit@debbugs.gnu.org; Fri, 15 Jun 2012 11:36:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfYa0-0000Gr-Dj for bug-gnu-emacs@gnu.org; Fri, 15 Jun 2012 11:36:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SfYZy-0003G3-GI for bug-gnu-emacs@gnu.org; Fri, 15 Jun 2012 11:36:55 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]:51268) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfYZy-0003Fd-AY for bug-gnu-emacs@gnu.org; Fri, 15 Jun 2012 11:36:54 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q5FFanwV030530 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 15 Jun 2012 15:36:50 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q5FFam1W000080 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 15 Jun 2012 15:36:49 GMT Received: from abhmt117.oracle.com (abhmt117.oracle.com [141.146.116.69]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q5FFamLU025099 for ; Fri, 15 Jun 2012 10:36:48 -0500 Received: from dradamslap1 (/10.159.184.218) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 15 Jun 2012 08:36:48 -0700 From: "Drew Adams" To: Subject: 24.1; Error in post-command-hook: wrong-number-of-arguments - read-file-internal Date: Fri, 15 Jun 2012 08:36:45 -0700 Message-ID: <0E81BDF53A444380B270F0D1522840B8@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Ac1LDKt0x7sE7kvzR72HLcMMDXfamg== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) Not in emacs -Q, and I do not know how to reproduce it. I get this sometimes: Error in post-command-hook (#[nil \300\301!\207 [run-hooks icomplete-post-command-hook] 2]): (wrong-number-of-arguments (lambda nil (let ((minibuffer-completing-file-name t)) (completion-table-in-turn (quote completion--embedded-envvar-table) (quote completion--file-name-table)))) 3) That looks like someone (Icicles? Icomplete?) put this function on post-command-hook: (lambda () (let ((minibuffer-completing-file-name t)) (completion-table-in-turn (quote completion--embedded-envvar-table) (quote completion--file-name-table)))) FWIW, I'm not aware of Icicles doing anything like that - I don't see any code that is similar. But I cannot say that it doesn't do something that leads to that. The `let' body in that sexp is just the definition of `read-file-name-internal': (defalias 'read-file-name-internal (completion-table-in-turn 'completion--embedded-envvar-table 'completion--file-name-table) "Internal subroutine for `read-file-name'. Do not call this.") This is that definition (symbol-function), un-byte-compiled: (closure ((tables completion--embedded-envvar-table completion--file-name-table) t) (string pred action) (completion--some (lambda (table) (complete-with-action action table string pred)) tables)) Hoping some of this info might ring a bell for Stefan. It means little to me. (I also do not recall whether this occurred in the release itself or in a (post|parallel-to)-release development build. If I had to guess I'd say it occurs in both.) In GNU Emacs 24.1.1 (i386-mingw-nt5.1.2600) of 2012-06-10 on MARVIN Windowing system distributor `Microsoft Corp.', version 5.1.2600 Configured using: `configure --with-gcc (4.6) --cflags -ID:/devel/emacs/libs/libXpm-3.5.8/include -ID:/devel/emacs/libs/libXpm-3.5.8/src -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include -ID:/devel/emacs/libs/giflib-4.1.4-1/include -ID:/devel/emacs/libs/jpeg-6b-4/include -ID:/devel/emacs/libs/tiff-3.8.2-1/include -ID:/devel/emacs/libs/gnutls-3.0.9/include' From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 23 00:34:32 2012 Received: (at 11715) by debbugs.gnu.org; 23 Jun 2012 04:34:32 +0000 Received: from localhost ([127.0.0.1]:53439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiI3M-0005Va-8p for submit@debbugs.gnu.org; Sat, 23 Jun 2012 00:34:32 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:34523) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiI3L-0005VS-0r for 11715@debbugs.gnu.org; Sat, 23 Jun 2012 00:34:31 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09MCrYj/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLNBIUGA0kiBwFugmQRAOjM4FYgwU X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="191968392" Received: from 76-10-182-35.dsl.teksavvy.com (HELO ceviche.home) ([76.10.182.35]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 23 Jun 2012 00:30:48 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 17758660C9; Sat, 23 Jun 2012 00:30:48 -0400 (EDT) From: Stefan Monnier To: "Drew Adams" Subject: Re: bug#11715: 24.1; Error in post-command-hook: wrong-number-of-arguments - read-file-internal Message-ID: References: <0E81BDF53A444380B270F0D1522840B8@us.oracle.com> Date: Sat, 23 Jun 2012 00:30:48 -0400 In-Reply-To: <0E81BDF53A444380B270F0D1522840B8@us.oracle.com> (Drew Adams's message of "Fri, 15 Jun 2012 08:36:45 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11715 Cc: 11715@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Error in post-command-hook (#[nil \300\301!\207 [run-hooks > icomplete-post-command-hook] 2]): (wrong-number-of-arguments (lambda > nil (let ((minibuffer-completing-file-name t)) > (completion-table-in-turn (quote completion--embedded-envvar-table) > (quote completion--file-name-table)))) 3) This says that while running icomplete's post-command-hook, someone tried to call: > (lambda () (let ((minibuffer-completing-file-name t)) > (completion-table-in-turn (quote completion--embedded-envvar-table) > (quote completion--file-name-table)))) with 3 arguments. Now, grepping for minibuffer-completing-file-name, I don't see anywhere where we could build such a function. Could it come from some unbundled Elisp code (e.g. Icicles)? Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 23 09:43:55 2012 Received: (at 11715) by debbugs.gnu.org; 23 Jun 2012 13:43:55 +0000 Received: from localhost ([127.0.0.1]:53738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiQd0-0002wm-RT for submit@debbugs.gnu.org; Sat, 23 Jun 2012 09:43:55 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]:27106) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiQcy-0002wf-Ac for 11715@debbugs.gnu.org; Sat, 23 Jun 2012 09:43:53 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q5NDe5S8014557 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 23 Jun 2012 13:40:06 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q5NDe4dH004664 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 23 Jun 2012 13:40:05 GMT Received: from abhmt111.oracle.com (abhmt111.oracle.com [141.146.116.63]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q5NDe45q019235; Sat, 23 Jun 2012 08:40:04 -0500 Received: from dradamslap1 (/10.159.222.104) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 23 Jun 2012 06:40:04 -0700 From: "Drew Adams" To: "'Stefan Monnier'" References: <0E81BDF53A444380B270F0D1522840B8@us.oracle.com> Subject: RE: bug#11715: 24.1; Error in post-command-hook: wrong-number-of-arguments - read-file-internal Date: Sat, 23 Jun 2012 06:39:32 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Ac1Q+Pg1szoqFtZsRS2RQlN7/jF/lAASXrzA In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 11715 Cc: 11715@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) > > Error in post-command-hook (#[nil \300\301!\207 [run-hooks > > icomplete-post-command-hook] 2]): (wrong-number-of-arguments (lambda > > nil (let ((minibuffer-completing-file-name t)) > > (completion-table-in-turn (quote completion--embedded-envvar-table) > > (quote completion--file-name-table)))) 3) > > This says that while running icomplete's post-command-hook, someone > tried to call: > > > (lambda () (let ((minibuffer-completing-file-name t)) > > (completion-table-in-turn (quote completion--embedded-envvar-table) > > (quote completion--file-name-table)))) > > with 3 arguments. > Now, grepping for minibuffer-completing-file-name, I don't > see anywhere where we could build such a function. Could it come from > some unbundled Elisp code (e.g. Icicles)? Possibly, but I don't see how/where. The code inside the `let' is the defalias of `read-file-name-internal'. That should be some hint to who constructs that function. Grepping the Icicles (and other 3rd-party code I use) for `minibuffer-completing-file-name', I do not see anywhere that such a function (or even something similar) is built. And grepping for `read-file-name-internal' finds nothing that seems related. The only place Icicles binds `minibuffer-completing-file-name' to t is in `icicle-read-file-name', which, after doing some unrelated stuff just binds `read-file-name-function' to nil and calls `read-file-name' (thus using the default behavior for `read-file-name'). Icomplete runs only `icomplete-exhibit' on `icomplete-post-command-hook' (hence on `post-command-hook') AFAICT. I checked all of this code before filing the bug report, and checked it again just now. Any idea? What would construct a function of no args that is essentially `read-file-name-internal' and put it on `post-command-hook' (and apparently in or around icompletion, since I see the error only in that context)? From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 23 10:08:21 2012 Received: (at 11715) by debbugs.gnu.org; 23 Jun 2012 14:08:21 +0000 Received: from localhost ([127.0.0.1]:54077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiR0f-0004N6-0K for submit@debbugs.gnu.org; Sat, 23 Jun 2012 10:08:21 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:28876) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiR0e-0004N0-BS for 11715@debbugs.gnu.org; Sat, 23 Jun 2012 10:08:20 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09FxLSN/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLNBIUGA0kiBwFugmQRAOjM4FYgwU X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="191979732" Received: from 69-196-180-141.dsl.teksavvy.com (HELO pastel.home) ([69.196.180.141]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 23 Jun 2012 10:04:35 -0400 Received: by pastel.home (Postfix, from userid 20848) id 2FDB54E242; Sat, 23 Jun 2012 10:04:35 -0400 (EDT) From: Stefan Monnier To: "Drew Adams" Subject: Re: bug#11715: 24.1; Error in post-command-hook: wrong-number-of-arguments - read-file-internal Message-ID: References: <0E81BDF53A444380B270F0D1522840B8@us.oracle.com> Date: Sat, 23 Jun 2012 10:04:35 -0400 In-Reply-To: (Drew Adams's message of "Sat, 23 Jun 2012 06:39:32 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11715 Cc: 11715@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > I checked all of this code before filing the bug report, and checked it again > just now. Any idea? No, I don't see it. > What would construct a function of no args that is essentially > `read-file-name-internal' and put it on `post-command-hook' As I said, it is *not* put on post-command-hook: it is run by Icomplete's post-command-hook, so the error could be because that function was put in minibuffer-completion-table or minibuffer-completion-predicate (and hence called by icomplete-completions), or even on icomplete-post-command-hook. Can you check some of those variables? If you can find a way to trigger the problem with M-: (run-hooks 'icomplete-post-command-hook) RET then we could debug it a bit more easily (e.g. get a backtrace, use edebug, ...). Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 23 10:55:18 2012 Received: (at 11715) by debbugs.gnu.org; 23 Jun 2012 14:55:18 +0000 Received: from localhost ([127.0.0.1]:54104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiRk6-0005QK-7T for submit@debbugs.gnu.org; Sat, 23 Jun 2012 10:55:18 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]:24675) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SiRk2-0005QB-2q for 11715@debbugs.gnu.org; Sat, 23 Jun 2012 10:55:15 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q5NEpS7u026869 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 23 Jun 2012 14:51:29 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q5NEpRiu021296 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 23 Jun 2012 14:51:28 GMT Received: from abhmt120.oracle.com (abhmt120.oracle.com [141.146.116.72]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q5NEpRnm012730; Sat, 23 Jun 2012 09:51:27 -0500 Received: from dradamslap1 (/10.159.222.104) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 23 Jun 2012 07:51:27 -0700 From: "Drew Adams" To: "'Stefan Monnier'" References: <0E81BDF53A444380B270F0D1522840B8@us.oracle.com> Subject: RE: bug#11715: 24.1; Error in post-command-hook: wrong-number-of-arguments - read-file-internal Date: Sat, 23 Jun 2012 07:50:55 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Ac1RSSBNUApvljMyQXqRmj6t2WvTlwAAhsVg In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 11715 Cc: 11715@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) > > What would construct a function of no args that is essentially > > `read-file-name-internal' and put it on `post-command-hook' > > As I said, it is *not* put on post-command-hook: > it is run by Icomplete's post-command-hook Don't know what you're insisting about. I was clear about that: Icomplete runs only `icomplete-exhibit' on `icomplete-post-command-hook' (hence on `post-command-hook')". Icomplete runs its hook on `post-command-hook'... (add-hook 'post-command-hook (lambda () (run-hooks 'icomplete-post-command-hook)) nil t) > so the error could be because that > function was put in minibuffer-completion-table or > minibuffer-completion-predicate (and hence called by > icomplete-completions), or even on icomplete-post-command-hook. > Can you check some of those variables? I have checked them and did not find anything. But the problem does not occur all the time. And, IIRC, it seems to occur once and then go away. (I'm not certain of that.) And as you know it is difficult (~impossible) to use the debugger with the Icomplete code. FWIW, I'm guessing also that if that function were somehow put into `minibuffer-completion-*' then I would see an error message sooner and in other places. > If you can find a way to trigger the problem with > M-: (run-hooks 'icomplete-post-command-hook) RET then we > could debug it a bit more easily (e.g. get a backtrace, use edebug, ...). Agreed. If I could. So far, I don't know how to repro the problem. FWIW, I don't see the error right now. I try `M-x forw' (to get Icomplete to kick in), and then I try `M-: (run-hooks 'icomplete-post-command-hook)'. It does not appear to do anything (besides show the completions), and it returns nil. And if I instead do `M-: icomplete-post-command-hook' it says only `(icomplete-exhibit)', as expected. I will try to keep my eyes open and see if I can find out anything more the next time I see the error. Dunno what else to look at. I realize that you cannot do more at this point either. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 23 23:59:22 2012 Received: (at 11715) by debbugs.gnu.org; 24 Jun 2012 03:59:22 +0000 Received: from localhost ([127.0.0.1]:54569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sidyr-0007NT-M3 for submit@debbugs.gnu.org; Sat, 23 Jun 2012 23:59:21 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]:18929) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sidyq-0007NM-0E for 11715@debbugs.gnu.org; Sat, 23 Jun 2012 23:59:20 -0400 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q5O3tUkx026135 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 24 Jun 2012 03:55:31 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q5O3tTTp005323 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 24 Jun 2012 03:55:30 GMT Received: from abhmt101.oracle.com (abhmt101.oracle.com [141.146.116.53]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q5O3tTQe014928; Sat, 23 Jun 2012 22:55:29 -0500 Received: from dradamslap1 (/10.159.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 23 Jun 2012 20:55:29 -0700 From: "Drew Adams" To: "'Stefan Monnier'" References: <0E81BDF53A444380B270F0D1522840B8@us.oracle.com> Subject: RE: bug#11715: 24.1; Error in post-command-hook: wrong-number-of-arguments -read-file-internal Date: Sat, 23 Jun 2012 20:54:55 -0700 Message-ID: <56246C760EDB41158EB315D9A23C05B5@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac1RSSBNUApvljMyQXqRmj6t2WvTlwAAhsVgABsaD5A= X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 11715 Cc: 11715@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) I found the problem - in my version of `icomplete-completions' (in `icomplete+.el'). Thanks for your help. FYI - I make these changes to the vanilla version of `icomplete-completions': 1. Prepend the total number of candidates. 2. Sort candidates alphabetically, put them in a different face, and separate them more (2 spaces instead of ","). 3. Highlight the key-binding text. Truncate it if too long. 4. Append the number of remaining cycle candidates (for Icicles). The problem was that when I updated the Emacs 23 code to fit the vanilla Emacs 24 changes I understood things only partially. In particular: I do not use `completion-all-sorted-completions', since I need the number of COMPS and I do not need the sort order that `c-a-s-c' provides. So I do not use LAST or BASE-SIZE. Where I went wrong was replacing this code: (if (and base-size (> base-size 0)) (completion-try-completion name candidates predicate (length name) md) ;; If the COMPS are 0-based, the result should be the same with COMPS. (completion-try-completion name comps nil (length name) md))) Since I do not use BASE-SIZE I tried using just the second `if' clause, without really understanding things. That was the mistake, as I'm sure you can tell. It worked OK when the arg CANDIDATES was an alist, but not when it was a function. I changed the code to just (try-completion name candidates predicate), and it seems to work well now. There is unfortunately no description of any of the arguments in the doc string. Apparently CANDIDATES corresponds to the COLLECTION arg of `completing-read' (is that correct in all respects?). If so, you might consider renaming it COLLECTION. And you might consider documenting the args. Perhaps something like this: NAME is the name to complete. COLLECTION is the collection of candidates to match. See `completing-read' for its possible values. PREDICATE filters matches: they succeed only if it returns non-nil. REQUIRE-MATCH non-nil means the input must match a candidate. (Maybe REQUIRE-MATCH corresponds to REQUIRE-MATCH in `completing-read', but that's not clear to me.) The possibility of arg CANDIDATES being a function is not new in Emacs 24, but in Emacs 23 the Icomplete code was different and I did not run into such an error. (BTW, AFAICT there is nothing in the Emacs 23 NEWS about Icomplete supporting file-name completion.) Anyway, thanks for your help. I will close this bug. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 24 00:00:43 2012 Received: (at control) by debbugs.gnu.org; 24 Jun 2012 04:00:43 +0000 Received: from localhost ([127.0.0.1]:54573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sie0B-0007QC-5J for submit@debbugs.gnu.org; Sun, 24 Jun 2012 00:00:43 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]:21045) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sie0A-0007Q4-0G for control@debbugs.gnu.org; Sun, 24 Jun 2012 00:00:42 -0400 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q5O3ur1l026588 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 24 Jun 2012 03:56:54 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q5O3uqp6005692 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 24 Jun 2012 03:56:53 GMT Received: from abhmt111.oracle.com (abhmt111.oracle.com [141.146.116.63]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q5O3uqkV001875 for ; Sat, 23 Jun 2012 22:56:52 -0500 Received: from dradamslap1 (/10.159.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 23 Jun 2012 20:56:52 -0700 From: "Drew Adams" To: Subject: bug #11715: close Date: Sat, 23 Jun 2012 20:56:19 -0700 Message-ID: <5300BD2E40BB4B0D8396C271BE3FDCEB@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Ac1RvU/BuvrPqawfTPmTEM6du3+Alg== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) close 11715 thanks From unknown Thu Aug 21 22:59:58 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 22 Jul 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator