From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#7788: 23.2.91; tmm-menubar command broken: Wrong type argument: stringp, nil Date: Mon, 10 Jan 2011 21:31:14 -0500 Message-ID: References: <871v4rqwrl.fsf@mithlond.arda> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1294714486 14909 80.91.229.12 (11 Jan 2011 02:54:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 11 Jan 2011 02:54:46 +0000 (UTC) Cc: 7788@debbugs.gnu.org To: Teemu Likonen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 11 03:54:38 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PcUNR-0004IF-WD for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Jan 2011 03:54:37 +0100 Original-Received: from localhost ([127.0.0.1]:53517 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcUNO-0003z5-42 for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Jan 2011 21:54:26 -0500 Original-Received: from [140.186.70.92] (port=50927 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcUNJ-0003yw-Kb for bug-gnu-emacs@gnu.org; Mon, 10 Jan 2011 21:54:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PcUNF-0000nS-S5 for bug-gnu-emacs@gnu.org; Mon, 10 Jan 2011 21:54:18 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49273) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PcUNF-0000nN-Ql for bug-gnu-emacs@gnu.org; Mon, 10 Jan 2011 21:54:17 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PcTty-0003dx-GQ; Mon, 10 Jan 2011 21:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Jan 2011 02:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7788 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7788-submit@debbugs.gnu.org id=B7788.129471263013982 (code B ref 7788); Tue, 11 Jan 2011 02:24:02 +0000 Original-Received: (at 7788) by debbugs.gnu.org; 11 Jan 2011 02:23:50 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PcTtm-0003dS-B4 for submit@debbugs.gnu.org; Mon, 10 Jan 2011 21:23:50 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PcTtl-0003dE-22; Mon, 10 Jan 2011 21:23:49 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAMdPK01FxIbi/2dsb2JhbACkNnS7UYVMBIRnjiQ X-IronPort-AV: E=Sophos;i="4.60,304,1291611600"; d="scan'208";a="87583149" Original-Received: from 69-196-134-226.dsl.teksavvy.com (HELO ceviche.home) ([69.196.134.226]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 10 Jan 2011 21:31:14 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 8249C660DC; Mon, 10 Jan 2011 21:31:14 -0500 (EST) In-Reply-To: <871v4rqwrl.fsf@mithlond.arda> (Teemu Likonen's message of "Wed, 05 Jan 2011 15:56:46 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 10 Jan 2011 21:24:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:43252 Archived-At: close 7721 thanks > Sometimes tmm-menubar command doesn't work because it stops with error [...] > Debugger entered--Lisp error: (wrong-type-argument stringp nil) > string-width(nil) > (- colwidth (string-width str) (string-width binding)) Thanks a lot for the backtrace. I think it is a symptom of an invalid entry in one of the keymaps, but indeed it's also a bug in tmm.el. I've installed the patch below into the emacs-23 branch which should fix it. Stefan === modified file 'lisp/tmm.el' --- lisp/tmm.el 2011-01-02 23:50:46 +0000 +++ lisp/tmm.el 2011-01-11 02:27:23 +0000 @@ -497,7 +495,7 @@ (if (or in-x-menu (stringp (car-safe elt))) (setq str event event nil km elt) (setq str event event nil km (cons 'keymap elt))))) - (unless (eq km 'ignore) + (unless (or (eq km 'ignore) (null str)) (let ((binding (where-is-internal km nil t))) (when binding (setq binding (key-description binding))