From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [nongnu] elpa/helm 07dacfe2e2 08/11: Prefer string-match-p over string-suffix-p Date: Thu, 14 Sep 2023 15:59:27 +0300 Message-ID: <83wmwslxlc.fsf@gnu.org> References: <169468919249.10884.8856179202519044902@vcs2.savannah.gnu.org> <20230914105954.20BD1C051D0@vcs2.savannah.gnu.org> <875y4dosa4.fsf@posteo.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12906"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, thievol@posteo.net To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 14 15:00:31 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qglxO-0003Cs-RO for ged-emacs-devel@m.gmane-mx.org; Thu, 14 Sep 2023 15:00:31 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qglwZ-0005s3-Ek; Thu, 14 Sep 2023 08:59:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qglwX-0005mp-AD for emacs-devel@gnu.org; Thu, 14 Sep 2023 08:59:37 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qglwX-0004or-0P; Thu, 14 Sep 2023 08:59:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=MMJcUMsuDq+YnlBx1ukBXqxYiN6Afnv26O/bPqh1IMo=; b=TdXxCXDReclY OhKRFRG2npLPj/FsbdDjUjnBeKfNpP32haBQ5ZLHU6H6C6IR1FZ7wirpSMYP7V0jaJQpIqzulL/tj 10KY9QURyyb4lnELEedUU2PoU6fNuEH5GSWkjXsxKoFBusnU/RDDlGGJOGXOrMrvk02IRSUfJ6F2G HEIDL2jElmh26ozi+M6gf4N7fXMkwI05dPsqeMMwssvbXHxz2TtAJBnosjeBx4fFU2p5G6mCG2DI9 2j8WWcrSuH+QU7//zrCzsnb5F4CFQ6Wraa42rEAsMoznS1jAEgfwhtIi/4hZ+R2g2igBiQ/j+vbRM OKJUo6cXdjUYPnWReGxGtQ==; In-Reply-To: <875y4dosa4.fsf@posteo.net> (message from Philip Kaludercic on Thu, 14 Sep 2023 12:25:55 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:310573 Archived-At: > From: Philip Kaludercic > Cc: Thierry Volpiatto > Date: Thu, 14 Sep 2023 12:25:55 +0000 > > ELPA Syncer writes: > > > --- a/helm-lib.el > > +++ b/helm-lib.el > > @@ -1732,7 +1732,7 @@ Directories expansion is not supported." > > (with-temp-buffer > > (call-process-shell-command > > (format cmd > > - (if (string-suffix-p ".gz" file) > > + (if (string-match-p ".gz\\'" file) > > Is there a reason for this preference? I think this change is simply incorrect: the first argument of string-suffix-p is not interpreted as a regexp, but as a simple literal string (the implementation uses compare-strings internally). > Also, I assume you want to quote the period in ".gz\\'"? No need to quote it, see above.