From unknown Wed Jun 18 23:08:14 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#6690 <6690@debbugs.gnu.org> To: bug#6690 <6690@debbugs.gnu.org> Subject: Status: 24.0.50; tmm-get-keymap is broken Reply-To: bug#6690 <6690@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:08:14 +0000 retitle 6690 24.0.50; tmm-get-keymap is broken reassign 6690 emacs submitter 6690 "Drew Adams" severity 6690 normal tag 6690 moreinfo thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 21 11:24:38 2010 Received: (at submit) by debbugs.gnu.org; 21 Jul 2010 15:24:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Obb9y-0006Oa-HE for submit@debbugs.gnu.org; Wed, 21 Jul 2010 11:24:38 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Obb9v-0006OR-J7 for submit@debbugs.gnu.org; Wed, 21 Jul 2010 11:24:35 -0400 Received: from lists.gnu.org ([199.232.76.165]:42434) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ObbAM-0000cY-8B for submit@debbugs.gnu.org; Wed, 21 Jul 2010 11:25:02 -0400 Received: from [140.186.70.92] (port=47497 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ObbAJ-0002Eq-FC for bug-gnu-emacs@gnu.org; Wed, 21 Jul 2010 11:25:01 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Obaxw-0007mR-46 for bug-gnu-emacs@gnu.org; Wed, 21 Jul 2010 11:12:12 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]:29849) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Obaxv-0007mK-U2 for bug-gnu-emacs@gnu.org; Wed, 21 Jul 2010 11:12:12 -0400 Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o6LFCAF4023117 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 21 Jul 2010 15:12:11 GMT Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o6LDAShe014955 for ; Wed, 21 Jul 2010 15:12:09 GMT Received: from abhmt020.oracle.com by acsmt354.oracle.com with ESMTP id 445985561279725123; Wed, 21 Jul 2010 08:12:03 -0700 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 21 Jul 2010 08:12:02 -0700 From: "Drew Adams" To: Subject: 24.0.50; tmm-get-keymap is broken Date: Wed, 21 Jul 2010 08:12:02 -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: Acso5xKTKCCrMzmkRNKi/Z19ZTWwpQ== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 X-Source-IP: acsmt355.oracle.com [141.146.40.155] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090202.4C470E4A.0042:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.3 (------) emacs -Q In several of the `cond' branches the variable `str' is not defined, so it is nil from the `let' default initialization. Then this code raises an error "Wrong type argument: stringp, nil", since `str' is not a string: (unless (eq km 'ignore) (let ((binding (where-is-internal km nil t))) (when binding (setq binding (key-description binding)) ;; Try to align the keybindings. (let ((colwidth (min 30 (- (/ (window-width) 2) 10)))) ;; STR is nil - so cannot use `string-width' or `concat'. (setq str (concat str (make-string (max 2 (- colwidth (string-width str) (string-width binding))) ?\s) binding)))))) In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2010-07-19 on 3249CTO Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.4) --no-opt --cflags -Ic:/xpm/include' From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 01 19:43:23 2010 Received: (at 6690) by debbugs.gnu.org; 1 Aug 2010 23:43:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfiBf-0006Jm-8L for submit@debbugs.gnu.org; Sun, 01 Aug 2010 19:43:23 -0400 Received: from impaqm3.telefonica.net ([213.4.138.3]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfiBd-0006Jh-Cc for 6690@debbugs.gnu.org; Sun, 01 Aug 2010 19:43:22 -0400 Received: from IMPmailhost6.adm.correo ([10.20.102.127]) by IMPaqm3.telefonica.net with bizsmtp id p9yG1e00H2kvMAa3PBjifL; Mon, 02 Aug 2010 01:43:42 +0200 Received: from ceviche.home ([83.61.38.247]) by IMPmailhost6.adm.correo with BIZ IMP id pBjh1e0075KwfZf1mBjh57; Mon, 02 Aug 2010 01:43:42 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Received: by ceviche.home (Postfix, from userid 20848) id 1E37366125; Mon, 2 Aug 2010 01:43:41 +0200 (CEST) From: Stefan Monnier To: "Drew Adams" Subject: Re: bug#6690: 24.0.50; tmm-get-keymap is broken Message-ID: References: Date: Mon, 02 Aug 2010 01:43:41 +0200 In-Reply-To: (Drew Adams's message of "Wed, 21 Jul 2010 08:12:02 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -0.9 (/) X-Debbugs-Envelope-To: 6690 Cc: 6690@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.8 (-) > emacs -Q > In several of the `cond' branches the variable `str' is not defined, so > it is nil from the `let' default initialization. > Then this code raises an error "Wrong type argument: stringp, nil", > since `str' is not a string: > (unless (eq km 'ignore) > (let ((binding (where-is-internal km nil t))) > (when binding > (setq binding (key-description binding)) > ;; Try to align the keybindings. > (let ((colwidth (min 30 (- (/ (window-width) 2) 10)))) > ;; STR is nil - so cannot use `string-width' or `concat'. > (setq str > (concat str > (make-string (max 2 (- colwidth > (string-width str) > (string-width binding))) > ?\s) > binding)))))) Thanks for the report. Indeed, the code is brittle in this regard. I could easily work around the problem by checking `str' before taking its width (concat should work just fine with nil), but before I do that, I'd like to make sure the result (which would basically treat a nil as equivalent to "") is right, so could you give some example where the problem gets triggered (in all "reasonable" cases I can think of, str ends up being non-nil since otherwise it means the menu entry would have a valid command and a valid shortcut, but no name). Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 03 18:46:26 2014 Received: (at 6690) by debbugs.gnu.org; 3 Feb 2014 23:46:26 +0000 Received: from localhost ([127.0.0.1]:48431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WATDe-0002od-Dw for submit@debbugs.gnu.org; Mon, 03 Feb 2014 18:46:26 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:39322) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WATDc-0002oW-ST for 6690@debbugs.gnu.org; Mon, 03 Feb 2014 18:46:25 -0500 Received: from [204.14.154.233] (helo=building.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1WATDN-0001QR-K2; Tue, 04 Feb 2014 00:46:10 +0100 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#6690: 24.0.50; tmm-get-keymap is broken References: Date: Mon, 03 Feb 2014 15:45:11 -0800 In-Reply-To: (Stefan Monnier's message of "Mon, 02 Aug 2010 01:43:41 +0200") Message-ID: <87y51r222g.fsf@building.gnus.org> User-Agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1WATDN-0001QR-K2 X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1392075970.6882@TVw0HvlpZ0BCJNpbVhBK0A X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 6690 Cc: 6690@debbugs.gnu.org, Drew Adams X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Stefan Monnier writes: > I'd like to make sure the result (which would basically treat a nil as > equivalent to "") is right, so could you give some example where the > problem gets triggered (in all "reasonable" cases I can think of, str > ends up being non-nil since otherwise it means the menu entry would > have a valid command and a valid shortcut, but no name). More information was requested three years ago, but no further progress has been made. Is this bug still present in Emacs 24.3? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 03 22:00:39 2014 Received: (at 6690) by debbugs.gnu.org; 4 Feb 2014 03:00:39 +0000 Received: from localhost ([127.0.0.1]:48559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WAWFa-0002Vx-DV for submit@debbugs.gnu.org; Mon, 03 Feb 2014 22:00:39 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:37263) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WAWFY-0002Vp-D6 for 6690@debbugs.gnu.org; Mon, 03 Feb 2014 22:00:37 -0500 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s1430Yvo028212 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 4 Feb 2014 03:00:35 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s1430Xan007299 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 4 Feb 2014 03:00:34 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s1430XFN016097; Tue, 4 Feb 2014 03:00:33 GMT MIME-Version: 1.0 Message-ID: <53d1a4f4-fd74-47a3-8181-21b3dcee0fde@default> Date: Mon, 3 Feb 2014 19:00:34 -0800 (PST) From: Drew Adams To: Lars Ingebrigtsen , Stefan Monnier Subject: RE: bug#6690: 24.0.50; tmm-get-keymap is broken References: <87y51r222g.fsf@building.gnus.org> In-Reply-To: <87y51r222g.fsf@building.gnus.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 6690 Cc: 6690@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) > More information was requested three years ago, but no further > progress has been made. Is this bug still present in > Emacs 24.3? More precisely, Stefan said: > Indeed, the code is brittle in this regard. > I could easily work around the problem by checking `str' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > before taking its width (concat should work just fine with nil), > but before I do that, I'd like to make sure the result (which > would basically treat a nil as equivalent to "") is right... I have no way to determine that more that he does (and did). Sorry, it's been 3 years and I don't have anything more to offer about this. If you don't want to make the code less brittle and fix the case where the value is nil, so be it. Personally, I don't use tmm anyway. It's possible that I happened to notice this problem when looking at the code. Or perhaps I ran into it while experimenting with the code. I really don't know. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 25 18:05:49 2015 Received: (at control) by debbugs.gnu.org; 25 Dec 2015 23:05:49 +0000 Received: from localhost ([127.0.0.1]:35915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCbQj-0004p8-D4 for submit@debbugs.gnu.org; Fri, 25 Dec 2015 18:05:49 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:41141) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCbQh-0004ox-CZ for control@debbugs.gnu.org; Fri, 25 Dec 2015 18:05:47 -0500 Received: from 2.150.58.24.tmi.telenormobil.no ([2.150.58.24] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aCbQL-0006G9-5G for control@debbugs.gnu.org; Sat, 26 Dec 2015 00:05:25 +0100 Date: Sat, 26 Dec 2015 00:05:24 +0100 Message-Id: <87vb7mrux7.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #6690 X-MailScanner-ID: 1aCbQL-0006G9-5G X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1451689526.10527@L7D+d4x56TXmoS/TAYFSlA X-Spam-Status: No X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) close 6690 From unknown Wed Jun 18 23:08:14 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 23 Jan 2016 12:24:09 +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