From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Filipp Gunbin Newsgroups: gmane.emacs.devel Subject: Re: Small fix in `shell--unquote&requote-argument' - please review Date: Thu, 01 Sep 2016 16:15:04 +0300 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1472735754 27170 195.159.176.226 (1 Sep 2016 13:15:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 1 Sep 2016 13:15:54 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (darwin) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 01 15:15:43 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 1bfRqD-0005MM-0i for ged-emacs-devel@m.gmane.org; Thu, 01 Sep 2016 15:15:37 +0200 Original-Received: from localhost ([::1]:37096 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfRqA-00015z-KL for ged-emacs-devel@m.gmane.org; Thu, 01 Sep 2016 09:15:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfRpz-00013g-Iw for emacs-devel@gnu.org; Thu, 01 Sep 2016 09:15:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfRps-0000TF-Vg for emacs-devel@gnu.org; Thu, 01 Sep 2016 09:15:22 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:36273) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfRpq-0000N9-FU for emacs-devel@gnu.org; Thu, 01 Sep 2016 09:15:16 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 62D9D20208; Thu, 1 Sep 2016 09:15:06 -0400 (EDT) Original-Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Thu, 01 Sep 2016 09:15:06 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.fm; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=nXzoY HsYyhw+S9U87EuRBNE7Z4o=; b=LnmFIjGk/4iNTYaKe4yXQ9xwrJ3pJvbCaZYm4 V40easEmGjStGEFyIzp+aTnBtCR47DAgbN96NFcNj4zUwb1BBsWWSI2AAgmqQdPI L48gjyZ1+D+ez9ZEIU+ARVms0BZrBMk0/t97oOn6VDyzUGE2PrlXFUjJBPtI/tuY s8xVLc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=nXzoYHsYyhw+S9U87EuRBNE7Z4o=; b=p4W3f iUfiWV82bh1tP8vjyZS5IMcv07+lvm4RsWSGe/Gu52nYoOPABkWPTyHhkJ/L9+70 aHd5nkMDJBNfnna2rdg0Qa6usdcyApkj0T3J1Qf/uayDPNIhPZsR1qTiorhpE6qN bjih7j0wHkH2qDLUGDnnwSWeoL4Nj/Bx3Vhdr4= X-Sasl-enc: NX3n76s0FOvOvV0+vk8gzJ9AxIUTNHv0fhi83zyCp1SJ 1472735705 Original-Received: from fgunbin.local (unknown [94.25.218.10]) by mail.messagingengine.com (Postfix) with ESMTPA id A78C2F2D2B; Thu, 1 Sep 2016 09:15:05 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Wed, 31 Aug 2016 09:27:54 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.28 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:207059 Archived-At: Hi Stefan, On 31/08/2016 09:27 -0400, Stefan Monnier wrote: >> 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. Filipp