From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: ndame Newsgroups: gmane.emacs.devel Subject: wrong-number-of-arguments in post-command-hook Date: Fri, 13 Mar 2020 17:23:29 +0100 (CET) Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_22854_226487480.1584116119560" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="38179"; mail-complaints-to="usenet@ciao.gmane.io" To: "emacs-devel@gnu.org" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Mar 13 17:24:32 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jCn6s-0009nh-Vi for ged-emacs-devel@m.gmane-mx.org; Fri, 13 Mar 2020 17:24:30 +0100 Original-Received: from localhost ([::1]:33740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCn6s-0002fx-0N for ged-emacs-devel@m.gmane-mx.org; Fri, 13 Mar 2020 12:24:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51569) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCn65-0001fa-8J for emacs-devel@gnu.org; Fri, 13 Mar 2020 12:23:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCn64-0007vb-4C for emacs-devel@gnu.org; Fri, 13 Mar 2020 12:23:41 -0400 Original-Received: from fmfe34.onbox.hu ([46.107.16.239]:20177 helo=web-out.onbox.hu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jCn63-0006jn-Sg for emacs-devel@gnu.org; Fri, 13 Mar 2020 12:23:40 -0400 X-fm-smtp-source: yes Original-Received: from localhost (localhost [85.238.65.166]) by web-out.onbox.hu (Postfix) with SMTP id 48f9wx0k8Lzfql for ; Fri, 13 Mar 2020 17:23:29 +0100 (CET) X-AccountId: 57978162 X-Originating-Ip: 85.238.65.166 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedruddvjedgkeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpucfhtffggffotefknfenuceurghilhhouhhtmecufedttdenucenucfjughrpefhkffugggtvfhiffesrgdtregstddtudenucfhrhhomhepnhgurghmvgcuoegvmhgrtghsuhhsvghrsehfrhgvvghmrghilhdrhhhuqeenucfkphepkeehrddvfeekrdeihedrudeiieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopedpihhnvghtpeekhedrvdefkedrieehrdduieeipdhmrghilhhfrhhomhepvghmrggtshhushgvrhesfhhrvggvmhgrihhlrdhhuhdprhgtphhtthhopegvmhgrtghsqdguvghvvghlsehgnhhurdhorhhg X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 46.107.16.239 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:245502 Archived-At: ------=_Part_22854_226487480.1584116119560 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I'm working on some code using post command hook and there were some errors in it which were not trivial to find, because post-command-hook does not pr= int backtraces when debug on error is enabled. It prints an error message though, here are two examples from my code: Error in post-command-hook (my-post-command): (wrong-number-of-arguments (2= . 2) 1) Error in post-command-hook (my-post-command): (wrong-type-argument listp t) Seeing these I was wondering why the error does not contain the called func= tion name. Is that info not available? It could help debugging a lot if the error also= printed the=C2=A0 function name alongside with the error. ------=_Part_22854_226487480.1584116119560 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I'm working on some code using post command hook and there were some errors
in it which were not trivial to find, because post-command-hook does not print
backtraces when debug on error is enabled.

It prints an error message though, here are two examples from my code:

Error in post-command-hook (my-post-command): (wrong-number-of-arguments (2 . 2) 1)

Error in post-command-hook (my-post-command): (wrong-type-argument listp t)


Seeing these I was wondering why the error does not contain the called function name.
Is that info not available? It could help debugging a lot if the error also printed the 
function name alongside with the error. ------=_Part_22854_226487480.1584116119560--