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: Tue, 15 Jun 2021 18:15:26 -0700 Message-ID: <2a71e97f-e994-431f-9794-c8c80807f968@www.fastmail.com> 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> <392FB601-CF1D-482F-B373-B443C4131412@gmail.com> <26B660D9-AC76-4AFC-9FFD-2F5D4DCA16C1@acm.org> <87k0n2uppk.fsf@gmx.de> <03440815-be36-42c3-ae57-cc4d7ffd7a0e@www.fastmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=c9144c7e272e4ec6b41f1b70ea71d17e Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32273"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.5.0-alpha0-519-g27a961944e-fm-20210531.001-g27a96194 Cc: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= , Philipp , emacs-devel@gnu.org To: "Michael Albinus" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jun 16 03:25: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 1ltKJW-00088j-Nz for ged-emacs-devel@m.gmane-mx.org; Wed, 16 Jun 2021 03:25:55 +0200 Original-Received: from localhost ([::1]:46976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ltKJV-0008Sd-IS for ged-emacs-devel@m.gmane-mx.org; Tue, 15 Jun 2021 21:25:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltKA6-0003oA-Mm for emacs-devel@gnu.org; Tue, 15 Jun 2021 21:16:10 -0400 Original-Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:50541) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltKA4-00021T-KT for emacs-devel@gnu.org; Tue, 15 Jun 2021 21:16:10 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id EDC971657; Tue, 15 Jun 2021 21:15:57 -0400 (EDT) Original-Received: from imap1 ([10.202.2.51]) by compute1.internal (MEProxy); Tue, 15 Jun 2021 21:15:58 -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=eQOuNfi4Rcp945vaXUMNR0stAktcfCH QIWf/Hu0ZS5s=; b=ADbPkRAjOKA1fz6gTp+XemgP4Juh9/LXePrDMKfRuPO2Iha Va20C7mqLPrDe0zoBoIkDXmz0hdhL5bQ8Pu+KNgnVCdhW5KmKWg071YowDJp5qyW +wNfXlAtinef1yhGF2G9B4a9a9a6HptOwhHyKyiYfC++oIbbbGHKOW9raomr74U2 RBSKqmH1M4vyUdGwOCiUMNceI4mA6IAf69Ce6n9OZeKR1yFHuUhGHshobL746LPF ambMOwynLD75VL/jWHq3UY+sv14GFXhV4Y1F0A5TXt6TQeAiT4z14a29cxa983p9 9n7yJ9JHe56JyEViC9O1UEy2I6WrLgxf1s1Tbbg== 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=fm3; bh=eQOuNf i4Rcp945vaXUMNR0stAktcfCHQIWf/Hu0ZS5s=; b=SqTKcbD6D7ac80iXT79S0F sSDVc5Ol9luU/iWCI+WL9zmMA8XaaOklzMITYr+I/mcWNaYUo8rQlk37bMEWOttK qj/ej6fzzFTsSk56/cTG2qIgSmdG6PefmdE5kYgOSZ7vSuTpTF11ZIOtoocIMYKC 9jEgluTAfl5Ls6uh8IasCGiE6+0Vrdw/naIyvqdzcA9hHWuwnOLQUIXMs6LkURGy surWTj9k8n17U2JkwJj3OJe3+ushFdORHAf7skxas98r8U45PYLXBCFFCDuFFX/S FGINk+6pPIWJzMJm5LcytbxAF1DqO0R7F1XjeT6AA4sGnLsfqbPMPEqOL3wgbnzQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedvkedggeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesrgdtreerreertdenucfhrhhomhepfdevohhl ihhnucghohhouggsuhhrhidfuceotgholhhinhesfhhoshhskhgvrhhsrdgtrgeqnecugg ftrfgrthhtvghrnhepfefhvdegtdeujefftdeigfehueegvdfhgeeuveeutdelveegleeg veefffdujeffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homheptgholhhinhesfhhoshhskhgvrhhsrdgtrg X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id F2B8A1300083; Tue, 15 Jun 2021 21:15:56 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: <03440815-be36-42c3-ae57-cc4d7ffd7a0e@www.fastmail.com> Received-SPF: none client-ip=64.147.123.24; envelope-from=colin@fosskers.ca; helo=wout1-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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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:270830 Archived-At: --c9144c7e272e4ec6b41f1b70ea71d17e Content-Type: text/plain The copyright assignment process was finalized for me today, so this should be good-to-go. Thanks! Colin On Thu, 10 Jun 2021, at 07:40, Colin Woodbury wrote: > Good catch Michael, thank you, I had completely forgotten about Windows. I've updated the patch. > > Cheers, > Colin > > On Thu, 10 Jun 2021, at 00:46, Michael Albinus wrote: >> "Colin Woodbury" > writes: >> >> > Hi all, >> >> Hi Colin, >> >> > + ((equal ?/ (string-to-char (substring file -1))) (error "Filename is a directory: %s" filename)) >> >> This shall be (directory-name-p file) . You cannot assume that ?/ is >> always the directory separator, for example on MS Windows. >> >> Best regards, Michael. >> > > > *Attachments:* > * file-name-with-extension.patch --c9144c7e272e4ec6b41f1b70ea71d17e Content-Type: text/html Content-Transfer-Encoding: quoted-printable
The copyri= ght assignment process was finalized for me today, so this should be goo= d-to-go.

Thanks!
Colin

On Thu, 10 Jun 2021, at 07:40, Colin Woodbury wro= te:
Good ca= tch Michael, thank you, I had completely forgotten about Windows.  = I've updated the patch.

Cheers,
Colin

On Thu, 10 Jun 2021, at 00:46, Mic= hael Albinus wrote:
"Colin Woodbury" <= colin@fosskers.ca> writes:

> Hi a= ll,

Hi Colin,

= > +          ((equal ?/ = (string-to-char (substring file -1))) (error "Filename is a directory: %= s" filename))

This shall be (directory-name= -p file) . You cannot assume that ?/ is
always the directo= ry separator, for example on MS Windows.

Be= st regards, Michael.



Attachments:
  • file-name-with= -extension.patch

--c9144c7e272e4ec6b41f1b70ea71d17e--