From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: commit-msg hook Date: Sat, 11 Apr 2015 19:40:23 +0300 Message-ID: <83sic6ehzc.fsf@gnu.org> References: <83y4m0tgac.fsf@gnu.org> <55288A2D.5030809@cs.ucla.edu> <83d23bruui.fsf@gnu.org> <83a8yff0pl.fsf@gnu.org> <5529406D.4040304@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1428770449 23439 80.91.229.3 (11 Apr 2015 16:40:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 11 Apr 2015 16:40:49 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 11 18:40:41 2015 Return-path: Envelope-to: ged-emacs-devel@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 1YgySX-0004Mm-2n for ged-emacs-devel@m.gmane.org; Sat, 11 Apr 2015 18:40:41 +0200 Original-Received: from localhost ([::1]:43280 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgySW-0008Tm-EI for ged-emacs-devel@m.gmane.org; Sat, 11 Apr 2015 12:40:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgySG-0008Te-On for emacs-devel@gnu.org; Sat, 11 Apr 2015 12:40:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YgySD-0004Rs-CC for emacs-devel@gnu.org; Sat, 11 Apr 2015 12:40:24 -0400 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:57493) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgySD-0004Ms-3h for emacs-devel@gnu.org; Sat, 11 Apr 2015 12:40:21 -0400 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NMN00K00HU9CP00@mtaout29.012.net.il> for emacs-devel@gnu.org; Sat, 11 Apr 2015 19:38:11 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NMN00LSJI7N9Q00@mtaout29.012.net.il>; Sat, 11 Apr 2015 19:38:11 +0300 (IDT) In-reply-to: <5529406D.4040304@cs.ucla.edu> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.185 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:185297 Archived-At: > Date: Sat, 11 Apr 2015 08:40:29 -0700 > From: Paul Eggert > CC: emacs-devel@gnu.org > > Eli Zaretskii wrote: > > the problem with hanging is not due > > to Gawk, but instead due to 'printf': it doesn't produce the UTF-8 > > encoding of the percent sign > > OK, so we're dealing with a broken MS-Windows shell rather than a broken > MS-Windows gawk. That 'printf' command is there only so that the script can be > pure ASCII, and it's simpler to avoid that nicety. I installed the attached > patch to try to work around the shell bug. That hangs as well, and I found out why: Gawk waits for input. (I don't know why this doesn't work as you intended, seems like another incompatibility in MSYS Bash.) To fix, replace this line print_at_sign='{print substr("'$cent_sign'@", 2)}' with this: print_at_sign='BEGIN {print substr("'$cent_sign'@", 2)}' and then even your previous version works. Sorry for my imperfect debugging, there are too many potentially problematic constructs in this script, and it's not easy to understand what exactly misfires, especially when Bash shows me corrupted non-ASCII strings. Thanks.