From unknown Sat Jun 14 05:23:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11640: 24.1.50; texinfo-format-printindex fails on Windows with Windows's sort Resent-From: Kazuhiro Ito Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Jun 2012 17:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11640 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 11640@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13390019797636 (code B ref -1); Wed, 06 Jun 2012 17:00:03 +0000 Received: (at submit) by debbugs.gnu.org; 6 Jun 2012 16:59:39 +0000 Received: from localhost ([127.0.0.1]:60757 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ScJa6-0001z6-VD for submit@debbugs.gnu.org; Wed, 06 Jun 2012 12:59:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:32952) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ScJa4-0001yr-29 for submit@debbugs.gnu.org; Wed, 06 Jun 2012 12:59:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ScJXp-0000q4-Iw for submit@debbugs.gnu.org; Wed, 06 Jun 2012 12:57:21 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:51457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScJXp-0000px-FK for submit@debbugs.gnu.org; Wed, 06 Jun 2012 12:57:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScJXi-0003Ep-Jt for bug-gnu-emacs@gnu.org; Wed, 06 Jun 2012 12:57:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ScJXH-0000lR-Du for bug-gnu-emacs@gnu.org; Wed, 06 Jun 2012 12:57:10 -0400 Received: from msa105.auone-net.jp ([61.117.18.165]:37172) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScJXH-0000jQ-4o for bug-gnu-emacs@gnu.org; Wed, 06 Jun 2012 12:56:43 -0400 Received: from GUNGNIR.med.osaka-cu.ac.jp (121-87-125-30f1.nar1.eonet.ne.jp [121.87.125.30]) by msa105.auone-net.jp (au one net msa) with ESMTP id 760632C803A; Thu, 7 Jun 2012 01:56:32 +0900 (JST) Date: Thu, 07 Jun 2012 01:56:25 +0900 From: Kazuhiro Ito User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL/10.8 EasyPG/1.0.0 Emacs/24.1.50 (i386-mingw-nt6.1.7601) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Message-Id: <20120606165632.760632C803A@msa105.auone-net.jp> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.2 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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.2 (------) When I format .texi files on Windows, Emacs fails to make indices. Emacs calls external sort program to make indices, but Windows's sort program does not behave as Emacs expected. To avoid this problem, Emacs22 does not call sort program on Windows. But this workaround seems to have been dropped when VMS support have been removed (*1). (*1) http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/89810 -- Kazuhiro Ito From unknown Sat Jun 14 05:23:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11640: 24.1.50; texinfo-format-printindex fails on Windows with Windows's sort Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jun 2012 11:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11640 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Kazuhiro Ito Cc: 11640@debbugs.gnu.org Received: via spool by 11640-submit@debbugs.gnu.org id=B11640.133906727210989 (code B ref 11640); Thu, 07 Jun 2012 11:08:02 +0000 Received: (at 11640) by debbugs.gnu.org; 7 Jun 2012 11:07:52 +0000 Received: from localhost ([127.0.0.1]:33149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ScaZD-0002rB-4D for submit@debbugs.gnu.org; Thu, 07 Jun 2012 07:07:51 -0400 Received: from mail-pz0-f44.google.com ([209.85.210.44]:49797) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ScaZA-0002qz-M6 for 11640@debbugs.gnu.org; Thu, 07 Jun 2012 07:07:49 -0400 Received: by dacx6 with SMTP id x6so684220dac.3 for <11640@debbugs.gnu.org>; Thu, 07 Jun 2012 04:05:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=+BG9CDR83mzu87V2107t+RJ9g1a89De5F5K5aSNlULM=; b=dpmAyK30seV01fN2ZY6hbHLpMeNVAESoMoKBnhflHku+sEgZTCvvmGChAObFMJoDTe 6V+Yul3XZfGciWIrag3JJTzPQeu6eJXFGrr0Jsj9WqqEhRaxtmQKoY7/6HpcICR6+BDv d05Y/pWoAuX/zXiYTp5qJHi25UmTA32Ef6ugT/uyQjyJM8gynl6PXp5+w6PZ9Mc5Uwfq thy1VVtqov2XlCDUKRYZurXSYrVZerAGiTBiHiPFiTsR11jK7XydR9M6B35DPAujTbCj dc2r5u853mTNzh4ZQ0znfw+uh+fDOu06+cNnII8BabBrU81m+BB0IbTwiDeZSR5QmuSx IvYA== Received: by 10.68.189.198 with SMTP id gk6mr7538833pbc.102.1339067128517; Thu, 07 Jun 2012 04:05:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.164.7 with HTTP; Thu, 7 Jun 2012 04:04:48 -0700 (PDT) In-Reply-To: <20120606165632.760632C803A@msa105.auone-net.jp> References: <20120606165632.760632C803A@msa105.auone-net.jp> From: Juanma Barranquero Date: Thu, 7 Jun 2012 13:04:48 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -2.6 (--) On Wed, Jun 6, 2012 at 6:56 PM, Kazuhiro Ito wrote: > To avoid this problem, Emacs22 does not call sort program on Windows. > But this workaround seems to have been dropped when VMS support > have been removed (*1). > > (*1) http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/89810 Does the following patch work for you? =C2=A0 =C2=A0 Juanma =3D=3D=3D modified file 'lisp/textmodes/texinfmt.el' --- lisp/textmodes/texinfmt.el 2012-04-09 13:05:48 +0000 +++ lisp/textmodes/texinfmt.el 2012-06-07 11:02:59 +0000 @@ -2958,6 +2958,29 @@ ("ky" . texinfo-format-kindex))) =0C +;;; Sort and index (for MS-DOS and Windows) + +;; Sort an index which is in the current buffer between START and END. +;; Used on Microsoft OSes, which have a non-POSIX `sort'. +(defun texinfo-sort-region (start end) + (require 'sort) + (save-restriction + (narrow-to-region start end) + (goto-char (point-min)) + (sort-subr nil 'forward-line 'end-of-line 'texinfo-sort-startkeyfun))) + +;; Subroutine for sorting an index. +;; At start of a line, return a string to sort the line under. +(defun texinfo-sort-startkeyfun () + (let ((line (buffer-substring-no-properties (point) (line-end-position))= )) + ;; Canonicalize whitespace and eliminate funny chars. + (while (string-match "[ \t][ \t]+\\|[^a-z0-9 ]+" line) + (setq line (concat (substring line 0 (match-beginning 0)) + " " + (substring line (match-end 0))))) + line)) + +=0C ;;; @printindex (put 'printindex 'texinfo-format 'texinfo-format-printindex) @@ -2974,7 +2997,9 @@ (insert "\n* Menu:\n\n") (setq opoint (point)) (texinfo-print-index nil indexelts) - (shell-command-on-region opoint (point) "sort -fd" 1))) + (if (memq system-type '(windows-nt ms-dos)) + (texinfo-sort-region opoint (point)) + (shell-command-on-region opoint (point) "sort -fd" 1)))) (defun texinfo-print-index (file indexelts) (while indexelts From unknown Sat Jun 14 05:23:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11640: 24.1.50; texinfo-format-printindex fails on Windows with Windows's sort Resent-From: Andreas Schwab Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jun 2012 11:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11640 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juanma Barranquero Cc: Kazuhiro Ito , 11640@debbugs.gnu.org Received: via spool by 11640-submit@debbugs.gnu.org id=B11640.133906955617306 (code B ref 11640); Thu, 07 Jun 2012 11:46:01 +0000 Received: (at 11640) by debbugs.gnu.org; 7 Jun 2012 11:45:56 +0000 Received: from localhost ([127.0.0.1]:33202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ScbA3-0004V4-T3 for submit@debbugs.gnu.org; Thu, 07 Jun 2012 07:45:56 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:52833) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ScbA1-0004Uu-C7 for 11640@debbugs.gnu.org; Thu, 07 Jun 2012 07:45:54 -0400 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3W7PzH5WtPz3hhVx; Thu, 7 Jun 2012 13:43:54 +0200 (CEST) Received: from igel.home (ppp-88-217-110-237.dynamic.mnet-online.de [88.217.110.237]) by mail.mnet-online.de (Postfix) with ESMTPA id 3W7Pyt116Sz4KK35; Thu, 7 Jun 2012 13:43:34 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 91D09CA2A4; Thu, 7 Jun 2012 13:43:33 +0200 (CEST) From: Andreas Schwab References: <20120606165632.760632C803A@msa105.auone-net.jp> X-Yow: Th' MIND is the Pizza Palace of th' SOUL Date: Thu, 07 Jun 2012 13:43:33 +0200 In-Reply-To: (Juanma Barranquero's message of "Thu, 7 Jun 2012 13:04:48 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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.9 (-) Juanma Barranquero writes: > +;; Sort an index which is in the current buffer between START and END. > +;; Used on Microsoft OSes, which have a non-POSIX `sort'. Wouldn't it make sense to use it everywhere? Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From unknown Sat Jun 14 05:23:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11640: 24.1.50; texinfo-format-printindex fails on Windows with Windows's sort Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jun 2012 11:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11640 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Andreas Schwab Cc: Kazuhiro Ito , 11640@debbugs.gnu.org Received: via spool by 11640-submit@debbugs.gnu.org id=B11640.133906999717950 (code B ref 11640); Thu, 07 Jun 2012 11:54:02 +0000 Received: (at 11640) by debbugs.gnu.org; 7 Jun 2012 11:53:17 +0000 Received: from localhost ([127.0.0.1]:33211 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ScbHB-0004fT-G8 for submit@debbugs.gnu.org; Thu, 07 Jun 2012 07:53:17 -0400 Received: from mail-pz0-f44.google.com ([209.85.210.44]:37600) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ScbGr-0004eg-PX for 11640@debbugs.gnu.org; Thu, 07 Jun 2012 07:53:16 -0400 Received: by dacx6 with SMTP id x6so729753dac.3 for <11640@debbugs.gnu.org>; Thu, 07 Jun 2012 04:50:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=pqvFehw2jF+h0Lg9LFFC13qhqC75XEgpRUyOL1mIo1U=; b=dkr0PzzfdHe/gmP6aR6hufSls3BacnNpQuikwkuEiqFDg6e/tZGNkxcStVFtJh+GOS 42j07oeGgRQSdD8DeaKBTCjlL/+5PnWj87FEWfnNL687O+Md9IoKtpaPn221mLKybhjS +9OhNUf1luijHdcW9GBtkx+kwVbOSQyYvYpeff+Xxpby0EUNgmwUS5BfCHLjYMevgzdW W3RiWrNbdg0L8xH+7tUy/RlRQQozdKmE2ZRBJkcr2VOYNuHf3QGSvGNsN7W3FdMUV3GU DCvRxhr5EwxGUSnl0L3ncGioEKSii55fHaESxvCIw75Wp5UrX4CFgoN206CLBRcluo6l glFQ== Received: by 10.68.227.163 with SMTP id sb3mr8441450pbc.74.1339069838459; Thu, 07 Jun 2012 04:50:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.164.7 with HTTP; Thu, 7 Jun 2012 04:49:58 -0700 (PDT) In-Reply-To: References: <20120606165632.760632C803A@msa105.auone-net.jp> From: Juanma Barranquero Date: Thu, 7 Jun 2012 13:49:58 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -2.6 (--) On Thu, Jun 7, 2012 at 1:43 PM, Andreas Schwab wrot= e: > Wouldn't it make sense to use it everywhere? I don't know. That code was removed in revno:89810, and was only used for MS-DOS, Windows and VMS. I don't know the rationale for using the system sort on other OSes. Performance, perhaps? =C2=A0 =C2=A0 Juanma From unknown Sat Jun 14 05:23:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11640: 24.1.50; texinfo-format-printindex fails on Windows with Windows's sort Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jun 2012 16:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11640 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juanma Barranquero , Stefan Monnier , Chong Yidong Cc: 11640@debbugs.gnu.org, kzhr@d1.dion.ne.jp, schwab@linux-m68k.org Reply-To: Eli Zaretskii Received: via spool by 11640-submit@debbugs.gnu.org id=B11640.133908635515842 (code B ref 11640); Thu, 07 Jun 2012 16:26:02 +0000 Received: (at 11640) by debbugs.gnu.org; 7 Jun 2012 16:25:55 +0000 Received: from localhost ([127.0.0.1]:33729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ScfX1-00047T-FI for submit@debbugs.gnu.org; Thu, 07 Jun 2012 12:25:55 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:45166) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ScfWz-00047E-LV for 11640@debbugs.gnu.org; Thu, 07 Jun 2012 12:25:54 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0M59000009I3I200@a-mtaout20.012.net.il> for 11640@debbugs.gnu.org; Thu, 07 Jun 2012 19:23:32 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.210.75]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M59000HV9J69660@a-mtaout20.012.net.il>; Thu, 07 Jun 2012 19:23:31 +0300 (IDT) Date: Thu, 07 Jun 2012 19:23:46 +0300 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <831ulrw0od.fsf@gnu.org> References: <20120606165632.760632C803A@msa105.auone-net.jp> X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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.2 (-) > From: Juanma Barranquero > Date: Thu, 7 Jun 2012 13:49:58 +0200 > Cc: Kazuhiro Ito , 11640@debbugs.gnu.org > > On Thu, Jun 7, 2012 at 1:43 PM, Andreas Schwab wrote: > > > Wouldn't it make sense to use it everywhere? > > I don't know. That code was removed in revno:89810, and was only used > for MS-DOS, Windows and VMS. I agree with Andreas: if we have a built-in functionality, using it is better than relying on an external program. > I don't know the rationale for using the system sort on other > OSes. Performance, perhaps? How about tradition? ;-) Seriously, I find it hard to believe that performance matters in this case, especially since texinfmt.el is no longer the main recommended way of producing Info from Texinfo, which is why it doesn't get updated with the latest features of the Texinfo language. Stefan, Chong, any objections to sorting the indices in Lisp in this case? From unknown Sat Jun 14 05:23:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11640: 24.1.50; texinfo-format-printindex fails on Windows with Windows's sort Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jun 2012 16:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11640 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juanma Barranquero Cc: kzhr@d1.dion.ne.jp, 11640@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 11640-submit@debbugs.gnu.org id=B11640.133908641815973 (code B ref 11640); Thu, 07 Jun 2012 16:27:01 +0000 Received: (at 11640) by debbugs.gnu.org; 7 Jun 2012 16:26:58 +0000 Received: from localhost ([127.0.0.1]:33737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ScfY1-00049a-OR for submit@debbugs.gnu.org; Thu, 07 Jun 2012 12:26:57 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:45388) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ScfY0-00049P-1s for 11640@debbugs.gnu.org; Thu, 07 Jun 2012 12:26:56 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0M59000009I3I200@a-mtaout20.012.net.il> for 11640@debbugs.gnu.org; Thu, 07 Jun 2012 19:24:35 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.210.75]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M59000Q79KZI000@a-mtaout20.012.net.il>; Thu, 07 Jun 2012 19:24:35 +0300 (IDT) Date: Thu, 07 Jun 2012 19:24:50 +0300 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83zk8fum25.fsf@gnu.org> References: <20120606165632.760632C803A@msa105.auone-net.jp> X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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.2 (-) > From: Juanma Barranquero > Date: Thu, 7 Jun 2012 13:04:48 +0200 > Cc: 11640@debbugs.gnu.org > > On Wed, Jun 6, 2012 at 6:56 PM, Kazuhiro Ito wrote: > > > To avoid this problem, Emacs22 does not call sort program on Windows. > > But this workaround seems to have been dropped when VMS support > > have been removed (*1). > > > > (*1) http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/89810 > > Does the following patch work for you? If you eventually install something like this, please mention in the log that it was inadvertently removed in revision 89810. From unknown Sat Jun 14 05:23:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11640: 24.1.50; texinfo-format-printindex fails on Windows with Windows's sort Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jun 2012 18:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11640 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: schwab@linux-m68k.org, kzhr@d1.dion.ne.jp, Chong Yidong , 11640@debbugs.gnu.org, Stefan Monnier Received: via spool by 11640-submit@debbugs.gnu.org id=B11640.133909507929169 (code B ref 11640); Thu, 07 Jun 2012 18:52:02 +0000 Received: (at 11640) by debbugs.gnu.org; 7 Jun 2012 18:51:19 +0000 Received: from localhost ([127.0.0.1]:33857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Schnj-0007aP-7M for submit@debbugs.gnu.org; Thu, 07 Jun 2012 14:51:19 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:37372) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SchnP-0007ZN-EJ for 11640@debbugs.gnu.org; Thu, 07 Jun 2012 14:51:18 -0400 Received: by pbcwy7 with SMTP id wy7so1364586pbc.3 for <11640@debbugs.gnu.org>; Thu, 07 Jun 2012 11:48:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=Z/prupkpNZfY9CH3E/Uxd/81Ei2+ZAT92oWX7xaSXTo=; b=ZdMHM/nLVvwNuajJThFOxG7z51WMlBOLyZaey2mqP/AxxBlel9tUgQPNfns6DBeHWf OwoQBpowZS6r3j0ndNecb1eZ9NkMdUA9LNeAUwetuF1rUZCLookDE9kHQ/qu8Bd3XDks uelfxymyNFpMMbNtsqUFIl7EJE96CnFKoPE5VqTQZJj3+WXNLlyJMol2ZiLEAV12WgZ0 WfEq0esqm/BP9Y1xWzzb5qAfeaZQGKRNYvH+Crg+AO7ZnmSJtg1koK0EEpjvS67U7gRp lB1UwQ1PBML8AFrDjeNcLmGsDC3pHOvhPcVslOr8LM3bRWRm4h1BP2cOfsiFepfZF8M7 5JUg== Received: by 10.68.202.99 with SMTP id kh3mr10762240pbc.157.1339094917945; Thu, 07 Jun 2012 11:48:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.164.7 with HTTP; Thu, 7 Jun 2012 11:47:57 -0700 (PDT) In-Reply-To: <831ulrw0od.fsf@gnu.org> References: <20120606165632.760632C803A@msa105.auone-net.jp> <831ulrw0od.fsf@gnu.org> From: Juanma Barranquero Date: Thu, 7 Jun 2012 20:47:57 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -2.6 (--) On Thu, Jun 7, 2012 at 6:23 PM, Eli Zaretskii wrote: > Seriously, I find it hard to believe that performance matters in this > case, especially since texinfmt.el is no longer the main recommended > way of producing Info from Texinfo, which is why it doesn't get > updated with the latest features of the Texinfo language. I'm perfectly willing to believe you. As I said, I don't know why was it done otherwise. > Stefan, Chong, any objections to sorting the indices in Lisp in this > case? The patch is even simpler. 2012-06-07 Juanma Barranquero * textmodes/texinfmt.el: Use internal sort (partial revert of revno:89810)= . (texinfo-sort-region, texinfo-sort-startkeyfun): Restore functions. (texinfo-format-printindex): Use `texinfo-sort-region' instead of calling external sort utility. =3D=3D=3D modified file 'lisp/textmodes/texinfmt.el' --- lisp/textmodes/texinfmt.el 2012-04-09 13:05:48 +0000 +++ lisp/textmodes/texinfmt.el 2012-06-07 18:38:56 +0000 @@ -2958,6 +2958,28 @@ ("ky" . texinfo-format-kindex))) =0C +;;; Sort and index + +;; Sort an index which is in the current buffer between START and END. +(defun texinfo-sort-region (start end) + (require 'sort) + (save-restriction + (narrow-to-region start end) + (goto-char (point-min)) + (sort-subr nil 'forward-line 'end-of-line 'texinfo-sort-startkeyfun))) + +;; Subroutine for sorting an index. +;; At start of a line, return a string to sort the line under. +(defun texinfo-sort-startkeyfun () + (let ((line (buffer-substring-no-properties (point) (line-end-position))= )) + ;; Canonicalize whitespace and eliminate funny chars. + (while (string-match "[ \t][ \t]+\\|[^a-z0-9 ]+" line) + (setq line (concat (substring line 0 (match-beginning 0)) + " " + (substring line (match-end 0))))) + line)) + +=0C ;;; @printindex (put 'printindex 'texinfo-format 'texinfo-format-printindex) @@ -2974,7 +2996,7 @@ (insert "\n* Menu:\n\n") (setq opoint (point)) (texinfo-print-index nil indexelts) - (shell-command-on-region opoint (point) "sort -fd" 1))) + (texinfo-sort-region opoint (point)))) (defun texinfo-print-index (file indexelts) (while indexelts From unknown Sat Jun 14 05:23:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11640: 24.1.50; texinfo-format-printindex fails on Windows with Windows's sort Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Jun 2012 05:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11640 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 11640@debbugs.gnu.org, Juanma Barranquero , kzhr@d1.dion.ne.jp, Chong Yidong , schwab@linux-m68k.org Received: via spool by 11640-submit@debbugs.gnu.org id=B11640.133913448722296 (code B ref 11640); Fri, 08 Jun 2012 05:49:01 +0000 Received: (at 11640) by debbugs.gnu.org; 8 Jun 2012 05:48:07 +0000 Received: from localhost ([127.0.0.1]:34222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Scs3L-0005nZ-8B for submit@debbugs.gnu.org; Fri, 08 Jun 2012 01:48:07 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:31290) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Scs30-0005mn-0f for 11640@debbugs.gnu.org; Fri, 08 Jun 2012 01:48:04 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09MCpw9/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCws0EhQYDRABE4gcBboJkEQDozOBWIMF X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="190575747" Received: from 76-10-156-61.dsl.teksavvy.com (HELO pastel.home) ([76.10.156.61]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 08 Jun 2012 01:45:22 -0400 Received: by pastel.home (Postfix, from userid 20848) id F2827599D1; Fri, 8 Jun 2012 01:45:21 -0400 (EDT) From: Stefan Monnier Message-ID: References: <20120606165632.760632C803A@msa105.auone-net.jp> <831ulrw0od.fsf@gnu.org> Date: Fri, 08 Jun 2012 01:45:21 -0400 In-Reply-To: <831ulrw0od.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 07 Jun 2012 19:23:46 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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.9 (-) > Stefan, Chong, any objections to sorting the indices in Lisp in this > case? Nope, Stefan From unknown Sat Jun 14 05:23:47 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Kazuhiro Ito Subject: bug#11640: closed (Re: bug#11640: 24.1.50; texinfo-format-printindex fails on Windows with Windows's sort) Message-ID: References: <20120606165632.760632C803A@msa105.auone-net.jp> X-Gnu-PR-Message: they-closed 11640 X-Gnu-PR-Package: emacs Reply-To: 11640@debbugs.gnu.org Date: Fri, 08 Jun 2012 12:29:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1339158542-31171-1" This is a multi-part message in MIME format... ------------=_1339158542-31171-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #11640: 24.1.50; texinfo-format-printindex fails on Windows with Windows's = sort which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 11640@debbugs.gnu.org. --=20 11640: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D11640 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1339158542-31171-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 11640-done) by debbugs.gnu.org; 8 Jun 2012 12:28:57 +0000 Received: from localhost ([127.0.0.1]:34627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ScyJF-00086V-1V for submit@debbugs.gnu.org; Fri, 08 Jun 2012 08:28:57 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:62378) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ScyJD-00086J-Hm for 11640-done@debbugs.gnu.org; Fri, 08 Jun 2012 08:28:56 -0400 Received: by pbcwy7 with SMTP id wy7so2357716pbc.3 for <11640-done@debbugs.gnu.org>; Fri, 08 Jun 2012 05:26:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=gjZ3Q5QZiHmtBq4jhFxzjJtrgsKgSUPwMBe2D5DQ2L4=; b=ywmJ1FE4rFeD7SDeFAtiiUYueEGm1axoQuRkJOzxKCWOCx7yW/mpwhPt8SUaaW0PBs XjWIypQRlUYcM9idwQE/t4iWdAF6WG69SSmH+tXimtvzVM3hVHkK6oBCIs+bRLV5JLBM XGAX4tbLqSWYCZLQdQ1jx22opYmTwtruKIKdg16BRLIxzE0oJPYwQZVQgDJ88yLtsigd wjJB1KzpitoN2yen2MElxw28TcjZ6fJkPMgoUmc/CxjbSzJA2qJi/93JeopKeF0IhRa9 LxWE1Gx+Qse38GnxUCi76CjlBFGoiWUcPShBPrbLEWazJys/0BA+lP3WsB9ewizMiS17 KPIw== Received: by 10.68.225.135 with SMTP id rk7mr15368443pbc.38.1339158390282; Fri, 08 Jun 2012 05:26:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.164.7 with HTTP; Fri, 8 Jun 2012 05:25:49 -0700 (PDT) In-Reply-To: References: <20120606165632.760632C803A@msa105.auone-net.jp> <831ulrw0od.fsf@gnu.org> From: Juanma Barranquero Date: Fri, 8 Jun 2012 14:25:49 +0200 Message-ID: Subject: Re: bug#11640: 24.1.50; texinfo-format-printindex fails on Windows with Windows's sort To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 11640-done Cc: 11640-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -2.6 (--) On Fri, Jun 8, 2012 at 7:45 AM, Stefan Monnier wrote: > Nope, Committed in revno:108524. ------------=_1339158542-31171-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 6 Jun 2012 16:59:39 +0000 Received: from localhost ([127.0.0.1]:60757 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ScJa6-0001z6-VD for submit@debbugs.gnu.org; Wed, 06 Jun 2012 12:59:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:32952) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ScJa4-0001yr-29 for submit@debbugs.gnu.org; Wed, 06 Jun 2012 12:59:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ScJXp-0000q4-Iw for submit@debbugs.gnu.org; Wed, 06 Jun 2012 12:57:21 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:51457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScJXp-0000px-FK for submit@debbugs.gnu.org; Wed, 06 Jun 2012 12:57:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScJXi-0003Ep-Jt for bug-gnu-emacs@gnu.org; Wed, 06 Jun 2012 12:57:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ScJXH-0000lR-Du for bug-gnu-emacs@gnu.org; Wed, 06 Jun 2012 12:57:10 -0400 Received: from msa105.auone-net.jp ([61.117.18.165]:37172) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScJXH-0000jQ-4o for bug-gnu-emacs@gnu.org; Wed, 06 Jun 2012 12:56:43 -0400 Received: from GUNGNIR.med.osaka-cu.ac.jp (121-87-125-30f1.nar1.eonet.ne.jp [121.87.125.30]) by msa105.auone-net.jp (au one net msa) with ESMTP id 760632C803A; Thu, 7 Jun 2012 01:56:32 +0900 (JST) Date: Thu, 07 Jun 2012 01:56:25 +0900 From: Kazuhiro Ito To: bug-gnu-emacs@gnu.org Subject: 24.1.50; texinfo-format-printindex fails on Windows with Windows's sort User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/24.1.50 (i386-mingw-nt6.1.7601) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Message-Id: <20120606165632.760632C803A@msa105.auone-net.jp> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.2 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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.2 (------) When I format .texi files on Windows, Emacs fails to make indices. Emacs calls external sort program to make indices, but Windows's sort program does not behave as Emacs expected. To avoid this problem, Emacs22 does not call sort program on Windows. But this workaround seems to have been dropped when VMS support have been removed (*1). (*1) http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/89810 -- Kazuhiro Ito ------------=_1339158542-31171-1--