From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David =?UTF-8?Q?Cad=C3=A9?= Newsgroups: gmane.emacs.bugs Subject: bug#13143: 24.2; mpc.el: mpc-songs-refresh: Args out of range Date: Wed, 12 Dec 2012 15:00:54 +0100 (CET) Message-ID: References: <87hanszl48.fsf@alfheim.i-did-not-set--mail-host-address--so-tickle-me> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323329-518664164-1355320341=:19843" X-Trace: ger.gmane.org 1355320900 10224 80.91.229.3 (12 Dec 2012 14:01:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Dec 2012 14:01:40 +0000 (UTC) Cc: 13143@debbugs.gnu.org To: David =?UTF-8?Q?Cad=C3=A9?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 12 15:01:53 2012 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 1Timsf-0004bC-GE for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Dec 2012 15:01:49 +0100 Original-Received: from localhost ([::1]:47807 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TimsS-0007LK-RE for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Dec 2012 09:01:36 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33387) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TimsG-0007Ga-3D for bug-gnu-emacs@gnu.org; Wed, 12 Dec 2012 09:01:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tims8-0007B7-Dq for bug-gnu-emacs@gnu.org; Wed, 12 Dec 2012 09:01:24 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56398) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tims8-0007B1-9l for bug-gnu-emacs@gnu.org; Wed, 12 Dec 2012 09:01:16 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Timss-0002X5-3h for bug-gnu-emacs@gnu.org; Wed, 12 Dec 2012 09:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: David =?UTF-8?Q?Cad=C3=A9?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Dec 2012 14:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13143 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13143-submit@debbugs.gnu.org id=B13143.13553209109714 (code B ref 13143); Wed, 12 Dec 2012 14:02:02 +0000 Original-Received: (at 13143) by debbugs.gnu.org; 12 Dec 2012 14:01:50 +0000 Original-Received: from localhost ([127.0.0.1]:38416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Timsf-0002Wa-1D for submit@debbugs.gnu.org; Wed, 12 Dec 2012 09:01:49 -0500 Original-Received: from mail-wi0-f182.google.com ([209.85.212.182]:48003) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Timsb-0002WR-UE for 13143@debbugs.gnu.org; Wed, 12 Dec 2012 09:01:47 -0500 Original-Received: by mail-wi0-f182.google.com with SMTP id hn14so577978wib.15 for <13143@debbugs.gnu.org>; Wed, 12 Dec 2012 06:00:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:x-x-sender:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type:content-id; bh=0gcy9s0tQuYukj1BVqXmS4G+IgjeG9a6b9++8Sa/1a4=; b=lJQdYu/V0hszypVv9EjZ5r+ctsXeRHYM3lMhHw08VxMK0+5C94POsJQEwPUf9D9/97 mbGphAn9X2L+zZLizVuC1dOv2cxKLIAog8MlozfHvOB/5qaOqkjultu57kG7Qgn9Dh2g OT/NDJkmECD6r58/l01La0/VDJvXIvyUWeZCFrCc67+3FO2s5Mt96gKr3t8U8lBpeElv a0bTOoEpQVgz8pKlVb1qJMjAsB89X9ZNFlRNDfNkJxIiQacpP5hZIIejmYT79ldnre3h TFddOfn+Yfsq2k8ShBCbg1RCZ+IO8x1RkPRQ7Ifzop+OPaMEQYCiv+1yhcYylhZ4Z7p+ 3jGQ== Original-Received: by 10.194.78.162 with SMTP id c2mr2149479wjx.46.1355320857147; Wed, 12 Dec 2012 06:00:57 -0800 (PST) Original-Received: from alfheim ([2a01:e34:ec06:4e20:52e5:49ff:fe37:f26e]) by mx.google.com with ESMTPS id bz12sm21375532wib.5.2012.12.12.06.00.54 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Dec 2012 06:00:55 -0800 (PST) Original-Received: from david (helo=localhost) by alfheim with local-esmtp (Exim 4.80) (envelope-from ) id 1Timrm-0005gO-ET; Wed, 12 Dec 2012 15:00:54 +0100 X-X-Sender: david@alfheim In-Reply-To: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) Content-ID: 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:68388 Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-518664164-1355320341=:19843 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8BIT Content-ID: On Wed, 12 Dec 2012, David Cadé wrote: > My take on the bug: > I looked at the code of this function, and from what I can gather, the bug > seems to be in: > (substring text 0 (- size postwidth textwidth 1)) > postwidth and textwidth are widths obtained with string-width, that is to say > in number of columns, and may not have any relation with the number of > characters present in the string text. > This seems wrong to me. It seems to me that truncate-string-to-width seems to > be the function one would want to use in this case. This patch in attachment makes things work for me. Stefan, I don't know if you are registered to this bug number, and I apologize if you received multiple copies of this mail. Greetings, -- David --8323329-518664164-1355320341=:19843 Content-Type: TEXT/PLAIN; charset=UTF-8; name=mpcel_patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=mpcel_patch PT09IG1vZGlmaWVkIGZpbGUgJ2xpc3AvbXBjLmVsJw0KLS0tIGxpc3AvbXBj LmVsCTIwMTItMDgtMTUgMTY6Mjk6MTEgKzAwMDANCisrKyBsaXNwL21wYy5l bAkyMDEyLTEyLTEyIDEzOjUzOjMyICswMDAwDQpAQCAtMTAzNiw5ICsxMDM2 LDcgQEANCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKD4gKCsgcG9z dHdpZHRoIHRleHR3aWR0aCkgc2l6ZSkpDQogICAgICAgICAgICAgICAgICAg ICAgICA7OyBUaGlzIGRvZXNuJ3QgZXZlbiBvYmV5IGRvdWJsZS13aWR0aCBj aGFycyA6LSgNCiAgICAgICAgICAgICAgICAgICAgICAgIChwcm9wZXJ0aXpl DQotICAgICAgICAgICAgICAgICAgICAgICAgKGlmICh6ZXJvcCAoLSBzaXpl IHBvc3R3aWR0aCAxKSkNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAg KHN1YnN0cmluZyB0ZXh0IDAgMSkNCi0gICAgICAgICAgICAgICAgICAgICAg ICAgIChjb25jYXQgKHN1YnN0cmluZyB0ZXh0IDAgKC0gc2l6ZSBwb3N0d2lk dGggdGV4dHdpZHRoIDEpKSAi4oCmIikpDQorCQkJKHRydW5jYXRlLXN0cmlu Zy10by13aWR0aCB0ZXh0IHNpemUgbmlsIG5pbCAi4oCmIikNCiAgICAgICAg ICAgICAgICAgICAgICAgICAnaGVscC1lY2hvIHRleHQpDQogICAgICAgICAg ICAgICAgICAgICAgdGV4dCkpKQ0KICAgICAgICAgICAgICAgKHdoZW4gKG1l bXEgdGFnICcoQXJ0aXN0IEFsYnVtIENvbXBvc2VyKSkgO0ZJWE1FOiB3cm9u ZyBsaXN0Lg0KDQo= --8323329-518664164-1355320341=:19843--