From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Colin Woodbury" Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] lisp/files.el: Add `file-name-set-extension` Date: Sun, 30 May 2021 18:16:20 -0700 Message-ID: References: <6ff4b7d7-03ac-48d1-8d49-de66431d4e5b@www.fastmail.com> <87lf82y9pv.fsf@tcd.ie> <3780a7f9-19f4-4216-baa9-ce00b3dbace9@www.fastmail.com> <6ba4668c-9b39-40e0-a155-f7e583fd33b6@www.fastmail.com> <87czteeyoc.fsf@igel.home> <9a92de1b-e313-468d-aa1f-7f969ed73688@www.fastmail.com> <87h7ipcs3j.fsf@igel.home> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=11dac97bc5944c3183e72ffbffa0920d Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14869"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.5.0-alpha0-468-gdb53729b73-fm-20210517.001-gdb53729b Cc: emacs-devel@gnu.org To: "Andreas Schwab" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 31 03:17:57 2021 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 1lnWZ2-0003dm-FT for ged-emacs-devel@m.gmane-mx.org; Mon, 31 May 2021 03:17:57 +0200 Original-Received: from localhost ([::1]:35308 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnWZ0-0006uz-Cf for ged-emacs-devel@m.gmane-mx.org; Sun, 30 May 2021 21:17:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnWXz-0006EU-9b for emacs-devel@gnu.org; Sun, 30 May 2021 21:16:51 -0400 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:47255) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnWXw-0001Ea-1v for emacs-devel@gnu.org; Sun, 30 May 2021 21:16:51 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1DAE25C00DE; Sun, 30 May 2021 21:16:46 -0400 (EDT) Original-Received: from imap1 ([10.202.2.51]) by compute1.internal (MEProxy); Sun, 30 May 2021 21:16:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fosskers.ca; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type; s=fm1; bh=HKniMA3p3oRvw7Zdhc6YJVGofDNxaGd /colD3RZdprA=; b=fgbamWwO8V/RxSHurb5wuQkAkKTpd2Q6qyWXqgw8HX2yZNU 63UlVM6vTnNUCSd5Ss/lz0rZwaDANj+lpQF7qEHw6DAnuHVLDRp2LFItPu7kQ/N+ wZymRVFYoPrEOSVwcRYWKWXCOS2JTy4aloeHNrDwhf7Wg/CSYgcDNH0ujekMn2Tj c5JmAbVCRExJTugh1xU8szHwAoEh28GF7udkoYah7Up0SqKkMTi17cJqNE5A2ahy d7AAKWkEULPUxPlQTP20ccOiwk1ZZh7qzCbxN0zlBZjeqU+fjMgAn/RlYRn2thMu G3WdyjUOah1RxtdQmJ2g3+lX2o2hyIOvFBmAkdA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=HKniMA 3p3oRvw7Zdhc6YJVGofDNxaGd/colD3RZdprA=; b=iZfV8sz7Xb0rXMERnWyrRB 8oLp3f4dbXBuOxS6faQECC1jzOAJe8epyP4CFU6bxiYiqYCGXLAev6nr945jzBG8 LRIUZWpRJr5G8nchbh3/CgBisdsxQJFXmrKbOVG7fgipgva4Eht7ntOjVGc0hzGt E1X1lgrIP1T/ijLlW5s2FuGOGuzfD54GwNzUwqhq5WuVwwpqkLw0YZypYfhoDv07 zyEc2V35Nie2AALN0mUI9Q/DharINyIppg88sAz/C2GdabpOpA8WNALp7THFzoeK T6s/pBQZLbYgMgsNUsZp60BmDtr5W6Ut9KoGeF9Yh+MZSnuO1arlGUaMu9Fy1MQQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdelvddggeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesmhdtreerreertdenucfhrhhomhepfdevohhl ihhnucghohhouggsuhhrhidfuceotgholhhinhesfhhoshhskhgvrhhsrdgtrgeqnecugg ftrfgrthhtvghrnhepffffgfehgeefgeevvddtgeeuuefhudefteegtdehkeegvdeifeev vdefgeeileejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homheptgholhhinhesfhhoshhskhgvrhhsrdgtrg X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 989BD130005F; Sun, 30 May 2021 21:16:45 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: <87h7ipcs3j.fsf@igel.home> Received-SPF: none client-ip=66.111.4.26; envelope-from=colin@fosskers.ca; helo=out2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:270152 Archived-At: --11dac97bc5944c3183e72ffbffa0920d Content-Type: multipart/alternative; boundary=424af80fbb4a4e55bde1fe72d92b7a8a --424af80fbb4a4e55bde1fe72d92b7a8a Content-Type: text/plain Hi Andreas (et al.), After asking around, it seems like letting `string-trim` fail naturally is indeed the canonical thing to do here, especially since with `toggle-debug-on-error` we're able to get the full call-stack if we need it. I've altered the patch (see attached) accordingly. Thanks for your patience. Cheers, Colin On Wed, 26 May 2021, at 10:39, Andreas Schwab wrote: > That's exactly what should happen. > > Andreas. > > -- > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 > "And now for something completely different." > --424af80fbb4a4e55bde1fe72d92b7a8a Content-Type: text/html Content-Transfer-Encoding: quoted-printable
Hi Andreas (et = al.),

After asking around, it seems like le= tting `string-trim` fail naturally is indeed the canonical thing to do h= ere, especially since with `toggle-debug-on-error` we're able to get the= full call-stack if we need it. I've altered the patch (see attached) ac= cordingly. Thanks for your patience.

Cheers= ,
Colin

On Wed, 26 May 2021, = at 10:39, Andreas Schwab wrote:
That's exactly what should happen.
Andreas.

-- 
Andreas Schwab, schwab= @linux-m68k.org
GPG Key fingerprint =3D 7578 EB47 D4E5= 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for som= ething completely different."

=
--424af80fbb4a4e55bde1fe72d92b7a8a-- --11dac97bc5944c3183e72ffbffa0920d Content-Disposition: attachment;filename="file-name-set-extension.patch" Content-Type: text/x-patch; name="file-name-set-extension.patch" Content-Transfer-Encoding: BASE64 ZGlmZiAtLWdpdCBhL2xpc3AvZmlsZXMuZWwgYi9saXNwL2ZpbGVzLmVsCmluZGV4IDYyZTE3 MDJmZGYuLmVlZDgxOGUyZmEgMTAwNjQ0Ci0tLSBhL2xpc3AvZmlsZXMuZWwKKysrIGIvbGlz cC9maWxlcy5lbApAQCAtNDg4OSw2ICs0ODg5LDE1IEBAIGV4dGVuc2lvbiwgdGhlIHZhbHVl IGlzIFwiXCIuIgogICAgICAgICAoaWYgcGVyaW9kCiAgICAgICAgICAgICAiIikpKSkpCiAK KyhkZWZ1biBmaWxlLW5hbWUtc2V0LWV4dGVuc2lvbiAoZmlsZW5hbWUgZXh0ZW5zaW9uKQor ICAiU2V0IHRoZSBFWFRFTlNJT04gb2YgYSBGSUxFTkFNRS4KK0NvbnNvbGlkYXRlcyBsZWFk aW5nL3RyYWlsaW5nIGRvdHMgc28gdGhhdCBlaXRoZXIgYGZvbycgb3IgYC5mb28nCitjYW4g YmUgcGFzc2VkIGFzIGFuIEVYVEVOU0lPTi4iCisgIChsZXQqICgocGF0dCAiWyAuXSsiKQor ICAgICAgICAgKGZpbGVuYW1lIChzdHJpbmctdHJpbS1yaWdodCBmaWxlbmFtZSBwYXR0KSkK KyAgICAgICAgIChleHRlbnNpb24gKHN0cmluZy10cmltLWxlZnQgZXh0ZW5zaW9uIHBhdHQp KSkKKyAgICAoY29uY2F0IChmaWxlLW5hbWUtc2Fucy1leHRlbnNpb24gZmlsZW5hbWUpICIu IiBleHRlbnNpb24pKSkKKwogKGRlZnVuIGZpbGUtbmFtZS1iYXNlICgmb3B0aW9uYWwgZmls ZW5hbWUpCiAgICJSZXR1cm4gdGhlIGJhc2UgbmFtZSBvZiB0aGUgRklMRU5BTUU6IG5vIGRp cmVjdG9yeSwgbm8gZXh0ZW5zaW9uLiIKICAgKGRlY2xhcmUgKGFkdmVydGlzZWQtY2FsbGlu Zy1jb252ZW50aW9uIChmaWxlbmFtZSkgIjI3LjEiKSkK --11dac97bc5944c3183e72ffbffa0920d--