From t_tuneyosi@hotmail.com Tue Nov 18 07:48:13 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=0.6 required=4.0 tests=AWL,BAYES_50,MIME_QP_LONG_LINE, MURPHY_DRUGS_REL8,NEXTPART,RCVD_IN_DNSWL_MED autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 18 Nov 2008 15:48:13 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAIFmATI029571 for ; Tue, 18 Nov 2008 07:48:11 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L2SoE-000732-9x for bug-gnu-emacs@gnu.org; Tue, 18 Nov 2008 10:48:10 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L2SoC-0006yE-DQ for bug-gnu-emacs@gnu.org; Tue, 18 Nov 2008 10:48:09 -0500 Received: from [199.232.76.173] (port=59930 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2SoC-0006xy-2O for bug-gnu-emacs@gnu.org; Tue, 18 Nov 2008 10:48:08 -0500 Received: from bay0-omc3-s26.bay0.hotmail.com ([65.54.246.226]:13272) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L2SoC-0006lV-5W for bug-gnu-emacs@gnu.org; Tue, 18 Nov 2008 10:48:08 -0500 Received: from hotmail.com ([207.46.10.21]) by bay0-omc3-s26.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 18 Nov 2008 07:48:05 -0800 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 18 Nov 2008 07:48:05 -0800 Message-ID: Received: from 124.155.30.210 by BAY121-DAV11.phx.gbl with DAV; Tue, 18 Nov 2008 15:48:02 +0000 X-Originating-IP: [124.155.30.210] X-Originating-Email: [t_tuneyosi@hotmail.com] X-Sender: t_tuneyosi@hotmail.com From: "Toru TSUNEYOSHI" To: Subject: string-width problem in buff-menu.el Date: Wed, 19 Nov 2008 00:48:02 +0900 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0005_01C949E0.79E7DBF0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1933 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1933 X-OriginalArrivalTime: 18 Nov 2008 15:48:05.0504 (UTC) FILETIME=[0BE15000:01C94995] X-detected-operating-system: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ This is a multi-part message in MIME format. ------=_NextPart_000_0005_01C949E0.79E7DBF0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit hello. I found a problem in buff-menu.el. (I use GNU Emacs 22.3.1 (i386-msvc-nt5.0.2195).) `list-buffers' function can't deal with buffer name in multilingual environment. it can't truncate buffer name properly. example: ======================================================================== CRM Buffer Size Mode File .% あいうえおかきくけこさしすせそ 271 Dired by name ~/temp/あいうえおかきくけこさしすせそ/ % あいう 247 Dired by name ~/temp/あいう/ % *GNU Emacs* 669 Fundamental *scratch* 191 Lisp Interaction * *Messages* 691 Fundamental ======================================================================== i made a patch for this problem. please check it. if ok, please apply. ------=_NextPart_000_0005_01C949E0.79E7DBF0 Content-Type: application/octet-stream; name="buff-menu.el.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="buff-menu.el.diff" --- buff-menu.el.original 2008-01-07 11:45:02.000000000 +0900=0A= +++ buff-menu.el 2008-11-19 00:23:38.786576000 +0900=0A= @@ -587,21 +587,24 @@=0A= (display-buffer (list-buffers-noselect files-only)))=0A= =0A= (defun Buffer-menu-buffer+size (name size &optional name-props = size-props)=0A= - (if (> (+ (length name) (length size) 2) = Buffer-menu-buffer+size-width)=0A= + (if (> (+ (string-width name) (string-width size) 2) = Buffer-menu-buffer+size-width)=0A= (setq name=0A= (if (string-match "<[0-9]+>$" name)=0A= - (concat (substring name 0=0A= - (- Buffer-menu-buffer+size-width=0A= - (max (length size) 3)=0A= - (match-end 0)=0A= - (- (match-beginning 0))=0A= - 2))=0A= + (concat (truncate-string-to-width name=0A= + (- Buffer-menu-buffer+size-width=0A= + (max (string-width size) 3)=0A= + (string-width (match-string 0))=0A= + 2)=0A= + 0=0A= + ?\s)=0A= ":" ; narrow ellipsis=0A= (match-string 0 name))=0A= - (concat (substring name 0=0A= - (- Buffer-menu-buffer+size-width=0A= - (max (length size) 3)=0A= - 2))=0A= + (concat (truncate-string-to-width name=0A= + (- Buffer-menu-buffer+size-width=0A= + (max (string-width size) 3)=0A= + 2)=0A= + 0=0A= + ?\s)=0A= ":"))) ; narrow ellipsis=0A= ;; Don't put properties on (buffer-name).=0A= (setq name (copy-sequence name)))=0A= @@ -609,8 +612,8 @@=0A= (add-text-properties 0 (length size) size-props size)=0A= (concat name=0A= (make-string (- Buffer-menu-buffer+size-width=0A= - (length name)=0A= - (length size))=0A= + (string-width name)=0A= + (string-width size))=0A= ?\s)=0A= size))=0A= =0A= @@ -825,8 +828,11 @@=0A= mouse-face highlight=0A= help-echo "mouse-2: select this buffer"))=0A= " "=0A= - (if (> (length (nth 4 buffer)) Buffer-menu-mode-width)=0A= - (substring (nth 4 buffer) 0 Buffer-menu-mode-width)=0A= + (if (> (string-width (nth 4 buffer)) Buffer-menu-mode-width)=0A= + (truncate-string-to-width (nth 4 buffer)=0A= + Buffer-menu-mode-width=0A= + 0=0A= + ?\s)=0A= (nth 4 buffer)))=0A= (when (nth 5 buffer)=0A= (indent-to (+ Buffer-menu-buffer-column Buffer-menu-buffer+size-width=0A= ------=_NextPart_000_0005_01C949E0.79E7DBF0-- From monnier@IRO.UMontreal.CA Thu Nov 20 07:22:39 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.6 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1369-done) by emacsbugs.donarmstrong.com; 20 Nov 2008 15:22:39 +0000 Received: from pruche.dit.umontreal.ca (pruche.dit.umontreal.ca [132.204.246.22]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAKFMaSk019148 for <1369-done@emacsbugs.donarmstrong.com>; Thu, 20 Nov 2008 07:22:37 -0800 Received: from ceviche.home (vpn-132-204-232-86.acd.umontreal.ca [132.204.232.86]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id mAKFNA4v002380; Thu, 20 Nov 2008 10:23:10 -0500 Received: by ceviche.home (Postfix, from userid 20848) id 0F5D4B40D7; Thu, 20 Nov 2008 10:22:35 -0500 (EST) From: Stefan Monnier To: Toru TSUNEYOSHI Cc: 1369-done@debbugs.gnu.org Subject: Re: bug#1369: string-width problem in buff-menu.el Message-ID: References: Date: Thu, 20 Nov 2008 10:22:35 -0500 In-Reply-To: (Toru TSUNEYOSHI's message of "Wed, 19 Nov 2008 00:48:02 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3151=0 > I found a problem in buff-menu.el. > (I use GNU Emacs 22.3.1 (i386-msvc-nt5.0.2195).) > `list-buffers' function can't deal with buffer name in multilingual > environment. it can't truncate buffer name properly. > i made a patch for this problem. please check it. if ok, please apply. Thank you, applied, Stefan From t_tuneyosi@hotmail.com Fri Nov 21 19:43:53 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.3 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1369-done) by emacsbugs.donarmstrong.com; 22 Nov 2008 03:43:53 +0000 Received: from bay0-omc3-s4.bay0.hotmail.com (bay0-omc3-s4.bay0.hotmail.com [65.54.246.204]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAM3ho7g015759 for <1369-done@emacsbugs.donarmstrong.com>; Fri, 21 Nov 2008 19:43:51 -0800 Received: from hotmail.com ([207.46.10.14]) by bay0-omc3-s4.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 21 Nov 2008 19:43:45 -0800 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 21 Nov 2008 19:43:45 -0800 Message-ID: Received: from 124.155.30.210 by BAY121-DAV4.phx.gbl with DAV; Sat, 22 Nov 2008 03:43:40 +0000 X-Originating-IP: [124.155.30.210] X-Originating-Email: [t_tuneyosi@hotmail.com] X-Sender: t_tuneyosi@hotmail.com From: "Toru TSUNEYOSHI" To: "Stefan Monnier" Cc: <1369-done@debbugs.gnu.org> References: Subject: Re: bug#1369: string-width problem in buff-menu.el Date: Sat, 22 Nov 2008 12:43:39 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1933 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1933 X-OriginalArrivalTime: 22 Nov 2008 03:43:45.0257 (UTC) FILETIME=[8534E590:01C94C54] Thanks a lot for your dealing and fixing code. ----- Original Message ----- From: "Stefan Monnier" To: "Toru TSUNEYOSHI" Cc: <1369-done@debbugs.gnu.org> Sent: Friday, November 21, 2008 12:22 AM Subject: Re: bug#1369: string-width problem in buff-menu.el > > I found a problem in buff-menu.el. > > (I use GNU Emacs 22.3.1 (i386-msvc-nt5.0.2195).) > > > `list-buffers' function can't deal with buffer name in multilingual > > environment. it can't truncate buffer name properly. > > > i made a patch for this problem. please check it. if ok, please apply. > > Thank you, applied, > > > Stefan > From unknown Fri Aug 15 18:14:02 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Sat, 20 Dec 2008 15:24:04 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator