From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Small fix in `shell--unquote&requote-argument' - please review Date: Thu, 01 Sep 2016 09:39:34 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1472737059 31764 195.159.176.226 (1 Sep 2016 13:37:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 1 Sep 2016 13:37:39 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Filipp Gunbin Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 01 15:37:28 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bfSBJ-0007Hu-Rm for ged-emacs-devel@m.gmane.org; Thu, 01 Sep 2016 15:37:25 +0200 Original-Received: from localhost ([::1]:37183 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfSBH-0003Uj-HI for ged-emacs-devel@m.gmane.org; Thu, 01 Sep 2016 09:37:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfSAe-0003UF-Kg for emacs-devel@gnu.org; Thu, 01 Sep 2016 09:36:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfSAa-0005Zw-AG for emacs-devel@gnu.org; Thu, 01 Sep 2016 09:36:44 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:41637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfSAa-0005Zo-5t for emacs-devel@gnu.org; Thu, 01 Sep 2016 09:36:40 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id u81DbHuc004595; Thu, 1 Sep 2016 09:37:17 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 02A3F602F6; Thu, 1 Sep 2016 09:39:34 -0400 (EDT) In-Reply-To: (Filipp Gunbin's message of "Thu, 01 Sep 2016 16:15:04 +0300") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5784=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5784> : inlines <5166> : streams <1693530> : uri <2279492> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:207062 Archived-At: >>> 1. match is always less than (length str), so I guess they meant >>> `((< (1+ match) (length qstr))'. >>> 2. If `string-match' searching for ending single quote failed, >>> `(match-string 0)' is still called - be careful not to do this. >> Do you have corresponding recipes to trigger the corresponding errors >> (so we could write tests)? This part of my code is in dire need of >> tests, otherwise it's much too easy to introduce regressions. > Honestly, no, I found this when studying the code. Hmm... would you be able to artificially construct or describe a failing case, then? Part of the issue is that I don't remember the code well enough, so while your description makes some sense, I'm having difficulty understanding really what the change does. Stefan