GNU bug report logs - #76982
30.1; url-generic-parse-url cannot parse Windows file paths

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Morgan Willcock <morgan@HIDDEN>; Keywords: patch; dated Wed, 12 Mar 2025 17:54:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 76982 <at> debbugs.gnu.org:


Received: (at 76982) by debbugs.gnu.org; 8 Apr 2025 22:14:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 08 18:14:34 2025
Received: from localhost ([127.0.0.1]:35934 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u2HDC-0001v6-I6
	for submit <at> debbugs.gnu.org; Tue, 08 Apr 2025 18:14:33 -0400
Received: from fout-b3-smtp.messagingengine.com ([202.12.124.146]:47945)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sebastian@HIDDEN>)
 id 1u2HD8-0001um-R7
 for 76982 <at> debbugs.gnu.org; Tue, 08 Apr 2025 18:14:27 -0400
Received: from phl-compute-12.internal (phl-compute-12.phl.internal
 [10.202.2.52])
 by mailfout.stl.internal (Postfix) with ESMTP id E9B6111400FA;
 Tue,  8 Apr 2025 18:14:20 -0400 (EDT)
Received: from phl-imap-12 ([10.202.2.86])
 by phl-compute-12.internal (MEProxy); Tue, 08 Apr 2025 18:14:21 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sebasmonia.com;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm2; t=1744150460; x=
 1744236860; bh=LjZYAMFke/nCmwZNdVv6LkDdL+RpFl0Yta/g2HqE2+w=; b=T
 lOAGPiTFyoPHC8BrcQHvZEsaX60vkLMAkWLt4FF2OUt2s5z3Dgpi9JovYGmhMP73
 7dbc9gDCJoOYlSEJieTq+Gx8dGPOZavo+qtVuxZ6jkybM6ufirOclq2wq2s78yIP
 tB+j+MWyujrabZGIoxYIvzE3YrpbCLZVHKHpGm0ATb8xe/HZtnlh0t5TTIRGF1Z8
 AY0NJtoSDgTqQXqoqOZyxKxwVBxrekrNiwMV70HqhGktL79DU4ACJwpPot3+Yca8
 d0EOynTMf0/rKveaD6Y36LXm9BvdJ1pjLD3tLsbHXHjYqVtZZbhqWuqo26nTW9dV
 MLrJ3VTmYRVdpQ7pFDAMQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1744150460; x=1744236860; bh=LjZYAMFke/nCmwZNdVv6LkDdL+RpFl0Yta/
 g2HqE2+w=; b=pGmDJ+XfGQNQ1MCl0v0wF/DQr5fUNAO3SoH10TsqLilXERixUr1
 37BpvHjz8EVri7BRvpTGAuXrAhUE/p41H+V+T4CzHlHu2LX8PrYtEu6++wwVX9cz
 DeIlMY7tjp+JLbjLbmOjfXyKoQ5jC3L5fnLYIVDlDY08O662udxbJ6gcCs7lyOfH
 QHbKUBk+i7S1eNHMZ1XkUEkEaT6Fe7xt/motA4xyWA1x7UCyAbnsa9yzAFFZ0zhF
 d3UJ9lD4Ej1rJ+tHARGqAdW6/Mx2gOCOu3KbWd9kRCewUYkOahtwOw/go0JhglJE
 EkC44T4uRfRHISH13xJpgg7MPcGjUbTdMpw==
X-ME-Sender: <xms:vJ_1Z16VUE_pON1nh4pYFofZLeToMSmXAVFmGqq39K51oqNs53B8WA>
 <xme:vJ_1Zy4pIKoXu47Mn0hyft7sAvZVu8grbugtPBeN0uEu2PG-4RTtRKM-HCTGqpOVD
 KaKWhoE9ZkVnjoIZUg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvtdegvdejucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih
 gvnhhtshculddquddttddmnecujfgurhepofggfffhvfevkfgjfhfutgesmhdtreerredt
 jeenucfhrhhomhepufgvsggrshhtihojnhcuofhonhovrgcuoehsvggsrghsthhirghnse
 hsvggsrghsmhhonhhirgdrtghomheqnecuggftrfgrthhtvghrnhepkeegveekgfdvtedv
 fedtleeiuedtgfefueetieevgfeuhffffeehudekjefguedunecuffhomhgrihhnpehrfh
 gtqdgvughithhorhdrohhrghdpvgigrghmphhlvgdrtghomhdpshgvsggrshhmohhnihgr
 rdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh
 epshgvsggrshhtihgrnhesshgvsggrshhmohhnihgrrdgtohhmpdhnsggprhgtphhtthho
 peefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeejieelkedvseguvggssghugh
 hsrdhgnhhurdhorhhgpdhrtghpthhtohepvghlihiisehgnhhurdhorhhgpdhrtghpthht
 ohepmhhorhhgrghnsehitggvledrughighhithgrlh
X-ME-Proxy: <xmx:vJ_1Z8c0eSYAuofs1b5NTf2qMi3rxN04GXTpIndczx3Ui-PLl6thmQ>
 <xmx:vJ_1Z-KuXcWAK482liuPC_q64uH0Re96OHk54XDq3cND4mf16MsIeQ>
 <xmx:vJ_1Z5JGnqTET3piDszGkYOJC6RLtWa6v5jSuywHn2mJ_8IK03qFcg>
 <xmx:vJ_1Z3zUSXaJjV3G5GGSyvDXfxnDtb3SLu-WTIKM-mZ_Kzq7vP4yNA>
 <xmx:vJ_1Z4WnzPRgNVXc6BxCaKkuFsgG7DTp4QJd1Fso6JkXM_mTqr6UKh16>
Feedback-ID: iab2c46da:Fastmail
Received: by mailuser.phl.internal (Postfix, from userid 501)
 id 5DACE1C20067; Tue,  8 Apr 2025 18:14:20 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
MIME-Version: 1.0
X-ThreadId: T6cc4cf50b5eb1458
Date: Tue, 08 Apr 2025 18:13:57 -0400
From: =?UTF-8?Q?Sebasti=C3=A1n_Mon=C3=ADa?= <sebastian@HIDDEN>
To: "Eli Zaretskii" <eliz@HIDDEN>
Message-Id: <9f9c24d5-0c57-412e-841d-aaa8625c7841@HIDDEN>
In-Reply-To: <thqnjz7wc6qq.fsf@HIDDEN>
References: <87msdq9lut.fsf@HIDDEN> <thqn8qpa9hpf.fsf@HIDDEN>
 <86y0x92vfq.fsf@HIDDEN> <864izc84ua.fsf@HIDDEN>
 <87ldsck3im.fsf@HIDDEN> <86semktckz.fsf@HIDDEN>
 <thqnjz7wc6qq.fsf@HIDDEN>
Subject: Re: bug#76982: 30.1;
 url-generic-parse-url cannot parse Windows file paths
Content-Type: multipart/mixed;
 boundary=eed39d1e52a14bb290017aa434bd69e7
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 76982
Cc: 76982 <at> debbugs.gnu.org, morgan@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--eed39d1e52a14bb290017aa434bd69e7
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hello!

On Mon, Apr 7, 2025, at 11:48 AM, Sebasti=C3=A1n Mon=C3=ADa wrote:
> Eli Zaretskii <eliz@HIDDEN> writes:
> > It can have other components in file:// URIs?  If so, can you show an
> > example?
>=20
> The URIs can have an "authority" segment, an example from
> https://www.rfc-editor.org/rfc/rfc8089.html#appendix-B
>=20
> "file://host.example.com/path/to/file"
>=20
> And also I just noticed that "localhost" is valid for authority, so I
> should add a test like this:
>=20
> (should (equal (url-filename (url-generic-parse-url "file://localhost/=
c:/path/to/file")) "c:/path/to/file"))

Added this test.

> > The problem with your proposal is that the value of 'file' is
> > incorrect between where it is first set and where you correct it.  A=
ny
> > code added later that uses 'file' in-between might cause bugs if the
> > person who adds such code is not aware of this subtlety.  By contras=
t,
> > under my suggestion 'file' has the correct value from the get-go.
>=20
> You are right :) I hadn't considered this. Will revisit the code and s=
ee
> how I can handle things earlier.

Now the leading / is stripped much closer to where the 'file' variable=20
assignment takes place, and also after the hostname/authority portion.=20

Let me know what you think!
Seb

--=20
Sebasti=C3=A1n Mon=C3=ADa
https://site.sebasmonia.com/

--eed39d1e52a14bb290017aa434bd69e7
Content-Disposition: attachment;
	filename*0="0001-Special-treatment-for-file-URIs-that-look-like-Windo.pat";
	filename*1="ch"
Content-Type: application/octet-stream;
	name="=?UTF-8?Q?0001-Special-treatment-for-file-URIs-that-look-like-Windo.patc?=
 =?UTF-8?Q?h?="
Content-Transfer-Encoding: base64

RnJvbSAxZjhiMGYwNmY1YjQwYjc4Y2Q2ZmRjN2Y3YmM0MzA0MmVmZDBjOGExIE1vbiBTZXAg
MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/U2ViYXN0aT1DMz1BMW49MjBNb249
QzM9QURhPz0gPHNlYmFzdGlhbkBzZWJhc21vbmlhLmNvbT4KRGF0ZTogVHVlLCA4IEFwciAy
MDI1IDE4OjA5OjA2IC0wNDAwClN1YmplY3Q6IFtQQVRDSF0gU3BlY2lhbCB0cmVhdG1lbnQg
Zm9yIGZpbGUgVVJJcyB0aGF0IGxvb2sgbGlrZSBXaW5kb3dzIHBhdGhzCgoqIGxpc3AvdXJs
L3VybC1wYXJzZS5lbCAodXJsLWdlbmVyaWMtcGFyc2UtdXJsKTogcmVtb3ZlIHByZWZpeCAv
CndoZW4gYSBmaWxlIFVSSSdzIGZpbGVuYW1lIHN0YXJ0cyB3aXRoIGEgc2luZ2xlIGxldHRl
ciBmb2xsb3dlZApieSBhIGNvbG9uIGFuZCBhIHNsYXNoIG9yIGJhY2tzbGFzaC4KKHVybC1y
ZWNyZWF0ZS11cmwpOiBtaXJyb3IgdGhlIGNoYW5nZSBhcHBsaWVkIHdoZW4gcGFyc2luZywg
c28KdGhlIFVSTCBpcyByZWNyZWF0ZWQgcHJvcGVybHkuCi0tLQogbGlzcC91cmwvdXJsLXBh
cnNlLmVsICAgICAgICAgICAgfCAxNCArKysrKysrKysrKysrLQogdGVzdC9saXNwL3VybC91
cmwtcGFyc2UtdGVzdHMuZWwgfCAyMSArKysrKysrKysrKysrKysrKysrKysKIDIgZmlsZXMg
Y2hhbmdlZCwgMzQgaW5zZXJ0aW9ucygrKSwgMSBkZWxldGlvbigtKQoKZGlmZiAtLWdpdCBh
L2xpc3AvdXJsL3VybC1wYXJzZS5lbCBiL2xpc3AvdXJsL3VybC1wYXJzZS5lbAppbmRleCA0
YzY1NzIxYjgzZC4uZDJmNDllZjJjNWYgMTAwNjQ0Ci0tLSBhL2xpc3AvdXJsL3VybC1wYXJz
ZS5lbAorKysgYi9saXNwL3VybC91cmwtcGFyc2UuZWwKQEAgLTgzLDcgKzgzLDEyIEBAIHVy
bC1yZWNyZWF0ZS11cmwKIAkgOzsgcG9ydCBpcyBlbXB0eSBvciBpZiBpdHMgdmFsdWUgd291
bGQgYmUgdGhlIHNhbWUgYXMgdGhhdCBvZgogCSA7OyB0aGUgc2NoZW1lJ3MgZGVmYXVsdC4i
CiAJIChwb3J0ICh1cmwtcG9ydC1pZi1ub24tZGVmYXVsdCB1cmxvYmopKQotCSAoZmlsZSAo
dXJsLWZpbGVuYW1lIHVybG9iaikpCisgICAgICAgICA7OyBGb3IgV2luZG93cy9ET1MtbGlr
ZSBwYXRocywgYHVybC1nZW5lcmljLXBhcnNlLXVybCcgc3RyaXBzCisgICAgICAgICA7OyB0
aGUgbGVhZGluZyAvLCBzbyB3ZSBuZWVkIHRvIGFkZCBpdCBiYWNrIChidWcjNzY5ODIpCisJ
IChmaWxlIChpZiAoYW5kIChzdHJpbmc9ICJmaWxlIiB0eXBlKQorICAgICAgICAgICAgICAg
ICAgICAgICAgKHN0cmluZy1tYXRjaCAiXltBLVphLXpdOlsvXFxdIiAodXJsLWZpbGVuYW1l
IHVybG9iaikpKQorICAgICAgICAgICAgICAgICAgIChjb25jYXQgIi8iICh1cmwtZmlsZW5h
bWUgdXJsb2JqKSkKKyAgICAgICAgICAgICAgICAgKHVybC1maWxlbmFtZSB1cmxvYmopKSkK
IAkgKGZyYWcgKHVybC10YXJnZXQgdXJsb2JqKSkpCiAgICAgKGNvbmNhdCAoaWYgdHlwZSAo
Y29uY2F0IHR5cGUgIjoiKSkKIAkgICAgKGlmICh1cmwtZnVsbG5lc3MgdXJsb2JqKSAiLy8i
KQpAQCAtMTkwLDYgKzE5NSwxMiBAQCB1cmwtZ2VuZXJpYy1wYXJzZS11cmwKIAkgIDs7IGF1
dGhvcml0eSkgYXQgdGhlIGJlZ2lubmluZyBvZiB0aGUgYWJzb2x1dGUgcGF0aC4KIAogICAg
ICAgICAgIChzZXRxIHNhdmUtcG9zIChwb2ludCkpCisgICAgICAgICAgOzsgRm9yIGZpbGU6
Ly8gVVJJcywgaWYgdGhlIHBhdGggImxvb2tzIGxpa2UiIFdpbmRvd3MvRE9TLAorICAgICAg
ICAgIDs7IGl0IG1ha2VzIHNlbnNlIHRvIHN0cmlwIHRoZSBsZWFkaW5nIHNsYXNoIChidWcj
NzY5ODIpCisgICAgICAgICAgKHdoZW4gKGFuZCAoc3RyaW5nPSAiZmlsZSIgc2NoZW1lKQor
ICAgICAgICAgICAgICAgICAgICAgKGxvb2tpbmctYXQgIi9bQS1aYS16XTpbL1xcXSIpKQor
ICAgICAgICAgICAgKGZvcndhcmQtY2hhcikKKyAgICAgICAgICAgIChzZXRxIHNhdmUtcG9z
IChwb2ludCkpKQogICAgICAgICAgIChpZiAoc3RyaW5nPSAiZGF0YSIgc2NoZW1lKQogCSAg
ICAgIDs7IEZvciB0aGUgImRhdGEiIFVSSSBzY2hlbWUsIGFsbCB0aGUgcmVzdCBpcyB0aGUg
RklMRS4KIAkgICAgICAoc2V0cSBmaWxlIChidWZmZXItc3Vic3RyaW5nIHNhdmUtcG9zIChw
b2ludC1tYXgpKSkKQEAgLTIxMCw2ICsyMjEsNyBAQCB1cmwtZ2VuZXJpYy1wYXJzZS11cmwK
IAogICAgICAgICAgIChpZiAoYW5kIGhvc3QgKHN0cmluZy1tYXRjaCAiJVswLTldWzAtOV0i
IGhvc3QpKQogICAgICAgICAgICAgICAoc2V0cSBob3N0ICh1cmwtdW5oZXgtc3RyaW5nIGhv
c3QpKSkKKwogICAgICAgICAgICh1cmwtcGFyc2UtbWFrZS11cmxvYmogc2NoZW1lIHVzZXIg
cGFzcyBob3N0IHBvcnQgZmlsZQogCQkJCSBmcmFnbWVudCBuaWwgZnVsbCkpKSkpKQogCmRp
ZmYgLS1naXQgYS90ZXN0L2xpc3AvdXJsL3VybC1wYXJzZS10ZXN0cy5lbCBiL3Rlc3QvbGlz
cC91cmwvdXJsLXBhcnNlLXRlc3RzLmVsCmluZGV4IGU3MGMxZWVmMzJmLi44ZDU3MTkwYWMz
MiAxMDA2NDQKLS0tIGEvdGVzdC9saXNwL3VybC91cmwtcGFyc2UtdGVzdHMuZWwKKysrIGIv
dGVzdC9saXNwL3VybC91cmwtcGFyc2UtdGVzdHMuZWwKQEAgLTE2Niw2ICsxNjYsMjcgQEAg
dXJsLWdlbmVyaWMtcGFyc2UtdXJsL211bHRpYnl0ZS1ob3N0LWFuZC1wYXRoCiAgICAgICAg
ICAgICAgICAgICh1cmwtcGFyc2UtbWFrZS11cmxvYmogImh0dHAiIG5pbCBuaWwgItCx0LDQ
vdC60Lgu0YDRhCIgbmlsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgIi/RhNGL0LLQsC8iIG5pbCBuaWwgdCkpKSkKIAorKGVydC1kZWZ0ZXN0IHVybC1nZW5l
cmljLXBhcnNlLXVybC9tcy13aW5kb3dzLWZpbGUtdXJpLWhhbmxkaW5nICgpCisgICJidWcj
NzY5ODIgIE1ha2UgYW4gZXhjZXB0aW9uIGlmIGEgVVJJIHJlZmVycyB0byBhIGZpbGVuYW1l
IGFuZCBpdCBcImxvb2tzIGxpa2VcIiBhIFdpbmRvd3MgcGF0aDogc3RyaXAgdGhlIGxlYWRp
bmcgLyIKKyAgKHNob3VsZCAoZXF1YWwgKHVybC1nZW5lcmljLXBhcnNlLXVybCAiZmlsZTov
Ly9jOi93aW5kb3dzLXBhdGgiKSAodXJsLXBhcnNlLW1ha2UtdXJsb2JqICJmaWxlIiBuaWwg
bmlsICIiIG5pbCAiYzovd2luZG93cy1wYXRoIiBuaWwgbmlsIHQpKSkKKyAgKHNob3VsZCAo
ZXF1YWwgKHVybC1maWxlbmFtZSAodXJsLWdlbmVyaWMtcGFyc2UtdXJsICJmaWxlOi8vL2M6
L2RpcmVjdG9yeS9maWxlLnR4dCIpKSAiYzovZGlyZWN0b3J5L2ZpbGUudHh0IikpCisgIChz
aG91bGQgKGVxdWFsICh1cmwtcmVjcmVhdGUtdXJsICh1cmwtcGFyc2UtbWFrZS11cmxvYmog
ImZpbGUiIG5pbCBuaWwgIiIgbmlsICJjOi9kaXJlY3RvcnkvZmlsZS50eHQiIG5pbCBuaWwg
dCkpICJmaWxlOi8vL2M6L2RpcmVjdG9yeS9maWxlLnR4dCIpKQorICA7OyBodHRwczovL3d3
dy5yZmMtZWRpdG9yLm9yZy9yZmMvcmZjODA4OS5odG1sI2FwcGVuZGl4LUUuMgorICAoc2hv
dWxkIChlcXVhbCAodXJsLWdlbmVyaWMtcGFyc2UtdXJsICJmaWxlOmM6L3BhdGgvdG8vZmls
ZSIpICh1cmwtcGFyc2UtbWFrZS11cmxvYmogImZpbGUiIG5pbCBuaWwgbmlsIG5pbCAiYzov
cGF0aC90by9maWxlIiBuaWwgbmlsIG5pbCkpKQorICAoc2hvdWxkIChlcXVhbCAodXJsLXJl
Y3JlYXRlLXVybCAodXJsLXBhcnNlLW1ha2UtdXJsb2JqICJmaWxlIiBuaWwgbmlsIG5pbCBu
aWwgImM6L3BhdGgvdG8vZmlsZSIgbmlsIG5pbCBuaWwpKSAiZmlsZTpjOi9wYXRoL3RvL2Zp
bGUiKSkKKyAgOzsgYWNjZXB0IGJhY2tzbGFzaGVzIHRvbworICAoc2hvdWxkIChlcXVhbCAo
dXJsLWZpbGVuYW1lICh1cmwtZ2VuZXJpYy1wYXJzZS11cmwgImZpbGU6Ly8vYzpcXGRpcmVj
dG9yeVxcZmlsZS50eHQiKSkgImM6XFxkaXJlY3RvcnlcXGZpbGUudHh0IikpCisgIDs7Cisg
IChzaG91bGQgKGVxdWFsICh1cmwtZmlsZW5hbWUgKHVybC1nZW5lcmljLXBhcnNlLXVybCAi
ZmlsZTovL2xvY2FsaG9zdC9jOi9wYXRoL3RvL2ZpbGUiKSkgImM6L3BhdGgvdG8vZmlsZSIp
KQorICApCisKKworCisKKworCisKKwogKHByb3ZpZGUgJ3VybC1wYXJzZS10ZXN0cykKIAog
Ozs7IHVybC1wYXJzZS10ZXN0cy5lbCBlbmRzIGhlcmUKLS0gCjIuNDUuMi53aW5kb3dzLjEK
Cg==

--eed39d1e52a14bb290017aa434bd69e7--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76982; Package emacs. Full text available.

Message received at 76982 <at> debbugs.gnu.org:


Received: (at 76982) by debbugs.gnu.org; 7 Apr 2025 15:48:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 07 11:48:56 2025
Received: from localhost ([127.0.0.1]:56411 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u1oiW-0000fB-0A
	for submit <at> debbugs.gnu.org; Mon, 07 Apr 2025 11:48:56 -0400
Received: from fout-b1-smtp.messagingengine.com ([202.12.124.144]:51621)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sebastian@HIDDEN>)
 id 1u1oiT-0000ee-1K
 for 76982 <at> debbugs.gnu.org; Mon, 07 Apr 2025 11:48:54 -0400
Received: from phl-compute-10.internal (phl-compute-10.phl.internal
 [10.202.2.50])
 by mailfout.stl.internal (Postfix) with ESMTP id 12807114018A;
 Mon,  7 Apr 2025 11:48:47 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-10.internal (MEProxy); Mon, 07 Apr 2025 11:48:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sebasmonia.com;
 h=cc:cc:content-transfer-encoding:content-type:content-type
 :date:date:from:from:in-reply-to:in-reply-to:message-id
 :mime-version:references:reply-to:subject:subject:to:to; s=fm2;
 t=1744040926; x=1744127326; bh=POHygxZiIHPOwiMyQ5W01GMDfVCqJAOF
 E50UY3Qv54Y=; b=cCOru+8yU0qqrztKEyAk6rRbhHkSZ8W1vqy7iDXTdFWGxbK8
 5JitYvL2otQUhpx9vd2gEbWL5Nc/0kdFHivHrmk1Cx+c19ngkX6H7RItP44Vh3jT
 TpNlgZrRzOaeDal+tN+6udgwtPN9OTJdDukhX6vyS95A8BVJ+I4yvhcPwqOonULr
 LoeAJRXKfCBIi67Q1WolCC3fLRPw7GctOIHHZmQRLhVrK4sibU2LfsQPLLObr9xO
 y7+6f7VgbGpcQnDFUwQgpIT7j7eX+IbQzbOrBP3JHpqXCp9vIAfovMKcmUSYTajz
 MI8TGlk7hnDt7L7YeOAbffk6uQcP4yz0qNHeog==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1744040926; x=
 1744127326; bh=POHygxZiIHPOwiMyQ5W01GMDfVCqJAOFE50UY3Qv54Y=; b=p
 /kc9JXxY7/C9G7relDNRjqy9jessb6dZ2VnSEUfZAePKPG6bztHrcMNh0FxQ0exH
 T2LYhMeoX6MsYHZd1T+0hLrgVBSwoXDdpCP6pB/D1c7ujzSXTPjP1WGL8cI1eBvZ
 mr4M8Rw3y/n+g4rqvUo8u9uIIMLCsOHYnDdPwPGgM5plbajqhIiFc0QYh6I0iijx
 FuvIfOExKaIIOASxPMfDqRl/WrcPcY8egEf5UJy9VT89ZoivxqGwp3110LQOo7DO
 0vB1g7O1J2u7X8Gd5aMhbwrQW0hvVF5UbKFVzXqSfIzjnLxvhP6F9kl+QkYL7m20
 JRUptpC0W4rFO2EJ5Mf9g==
X-ME-Sender: <xms:3vPzZ63RrSqde5Zt_GGb-VDhtMjDW_uTt_GvtpEXqGTpVwQ8IFXobQ>
 <xme:3vPzZ9HQ1e9gZJK9A1xnyMogZXFh89iuu4yuHu1RiAJc9tcY30NZLP09KZUZRctEs
 DDvqk9J0ybPvkrM7aQ>
X-ME-Received: <xmr:3vPzZy4Hsu2yRB0IknOIXq-_q-WHeJuR12poad1W_rY0Hv_Lw8rPUdEZHP7MgdSWu6hG>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvtddtheelucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih
 gvnhhtshculddquddttddmnecujfgurhephffvvefujghffffkfgggtgfgsehtqhertddt
 redunecuhfhrohhmpefuvggsrghsthhijohnucfoohhnvogruceoshgvsggrshhtihgrnh
 esshgvsggrshhmohhnihgrrdgtohhmqeenucggtffrrghtthgvrhhnpeekffefjeejjeev
 tddvvdektdeujeeijeekhfetveeufeffffehgeegjeeiiedtgeenucffohhmrghinheprh
 hftgdqvgguihhtohhrrdhorhhgpdgvgigrmhhplhgvrdgtohhmpdhsvggsrghsmhhonhhi
 rgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh
 hmpehsvggsrghsthhirghnsehsvggsrghsmhhonhhirgdrtghomhdpnhgspghrtghpthht
 ohepfedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepmhhorhhgrghnsehitggvle
 drughighhithgrlhdprhgtphhtthhopeejieelkedvseguvggssghughhsrdhgnhhurdho
 rhhgpdhrtghpthhtohepvghlihiisehgnhhurdhorhhg
X-ME-Proxy: <xmx:3vPzZ73Oi-4xbWsq6BRXIR9jCF52JHtOeyWZLwiVloiV-8cbe4YDTg>
 <xmx:3vPzZ9GYxOVFWTbpJZIgy31Aqz3xWLAOKr-X7I3dsc3rmVXyKFJOTw>
 <xmx:3vPzZ09zkxXEoal0og69QQ_35L__FNSBp7Im3dDe24zU-EbMSMQWWA>
 <xmx:3vPzZymk0uraBFp9zwXw-_h9hHkIEwG_C7zzeVk3uXzcQfYqq4eahw>
 <xmx:3vPzZ1g3djo5UGU49SpZvIKjm_rLDohahuqXmQ84AshCWqAPU92twWJz>
Feedback-ID: iab2c46da:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 7 Apr 2025 11:48:46 -0400 (EDT)
From: =?iso-8859-1?Q?Sebasti=E1n_Mon=EDa?= <sebastian@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#76982: 30.1; url-generic-parse-url cannot parse Windows
 file paths
In-Reply-To: <86semktckz.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 07 Apr
 2025 14:50:36 +0300")
References: <87msdq9lut.fsf@HIDDEN> <thqn8qpa9hpf.fsf@HIDDEN>
 <86y0x92vfq.fsf@HIDDEN> <864izc84ua.fsf@HIDDEN>
 <87ldsck3im.fsf@HIDDEN> <86semktckz.fsf@HIDDEN>
Date: Mon, 07 Apr 2025 11:48:45 -0400
Message-ID: <thqnjz7wc6qq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 76982
Cc: 76982 <at> debbugs.gnu.org, morgan@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


Eli Zaretskii <eliz@HIDDEN> writes:
> It can have other components in file:// URIs?  If so, can you show an
> example?

The URIs can have an "authority" segment, an example from
https://www.rfc-editor.org/rfc/rfc8089.html#appendix-B

"file://host.example.com/path/to/file"

And also I just noticed that "localhost" is valid for authority, so I
should add a test like this:

(should (equal (url-filename (url-generic-parse-url "file://localhost/c:/pa=
th/to/file")) "c:/path/to/file"))

> The problem with your proposal is that the value of 'file' is
> incorrect between where it is first set and where you correct it.  Any
> code added later that uses 'file' in-between might cause bugs if the
> person who adds such code is not aware of this subtlety.  By contrast,
> under my suggestion 'file' has the correct value from the get-go.

You are right :) I hadn't considered this. Will revisit the code and see
how I can handle things earlier.



--=20
Sebasti=E1n Mon=EDa
https://site.sebasmonia.com/




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76982; Package emacs. Full text available.

Message received at 76982 <at> debbugs.gnu.org:


Received: (at 76982) by debbugs.gnu.org; 7 Apr 2025 11:50:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 07 07:50:52 2025
Received: from localhost ([127.0.0.1]:53129 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u1l07-0006TN-Vc
	for submit <at> debbugs.gnu.org; Mon, 07 Apr 2025 07:50:52 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:51852)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1u1l04-0006Ss-JL
 for 76982 <at> debbugs.gnu.org; Mon, 07 Apr 2025 07:50:49 -0400
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 <eliz@HIDDEN>)
 id 1u1kzx-0004BF-Rl; Mon, 07 Apr 2025 07:50:41 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=nEOjISjrka0Et+JOOoJ7uz8P5zp2H31Vk31T95pS408=; b=kaPSrHQWtg9osqWSpvNu
 sVnhI4wbm6a4dJqFVZGJjsJSH3pOTS1iYCxBoxz+5rfouBBy9nP3TGxEYeXD40IhMz9h7fFuZ/e/e
 QaaHRMgbm1Efwnx+nvp4TlASdtubSohjVJmu8CYv4MeYcPjnn6Vnnw4XbJbRdzGJR2MTm5aA9mOln
 7IbRrHs1u2Y/YyjY5lNyhvbZ2UbbQKRZbQMHxvyOig4ns7Aeq9l+vR5rpFywBh0CpIJx1oP5q1M82
 Gkk1TduLXc9OXIMUYWb77ylwFvZtv3PYjMlLPqN716P9QRHvEwoEkGrmBlf9GJM+OI79BHMhEkzQW
 /J0u8QcicAfuPA==;
Date: Mon, 07 Apr 2025 14:50:36 +0300
Message-Id: <86semktckz.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: =?utf-8?Q?Sebasti=C3=A1n_Mon=C3=ADa?= <sebastian@HIDDEN>
In-Reply-To: <87ldsck3im.fsf@HIDDEN> (message from =?utf-8?Q?Sebas?=
 =?utf-8?Q?ti=C3=A1n_Mon=C3=ADa?= on
 Mon, 07 Apr 2025 00:18:57 -0400)
Subject: Re: bug#76982: 30.1; url-generic-parse-url cannot parse Windows
 file paths
References: <87msdq9lut.fsf@HIDDEN> <thqn8qpa9hpf.fsf@HIDDEN>
 <86y0x92vfq.fsf@HIDDEN> <864izc84ua.fsf@HIDDEN>
 <87ldsck3im.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 76982
Cc: 76982 <at> debbugs.gnu.org, morgan@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Sebastián Monía <sebastian@HIDDEN>
> Cc: 76982 <at> debbugs.gnu.org,  morgan@HIDDEN
> Date: Mon, 07 Apr 2025 00:18:57 -0400
> 
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> > Ping!  Sebastián, would you like to submit an updated patch which
> > addresses my comments?
> >
> >> > @@ -210,6 +215,13 @@ url-generic-parse-url
> >> >  
> >> >            (if (and host (string-match "%[0-9][0-9]" host))
> >> >                (setq host (url-unhex-string host)))
> >> > +
> >> > +          ;; For file:// URIs, if the path "looks like" Windows/DOS, it
> >> > +          ;; makes sense to strip the leading slash (bug#76982)
> >> > +          (when (and (string= "file" scheme)
> >> > +                     (string-match "^/[A-Za-z]:[/\\]" file))
> >> > +            (setq file (substring file 1)))
> >> > +
> >> >            (url-parse-make-urlobj scheme user pass host port file
> >> >  				 fragment nil full))))))
> >> 
> >> Isn't it cleaner to go one more character forward here:
> >> 
> >>           ;; 3.2. Authority
> >>           (when (looking-at "//")
> >>             (setq full t)
> >>             (forward-char 2)  <<<<<<<<<<<<<<<<<<<<
> >>             (setq save-pos (point))
> >>             (skip-chars-forward "^/?#")
> >> 
> >> if the conditions for Windows-style absolute file name are fulfilled?
> 
> The URI could potentially have components before we get to the filename,
> so the look head for "path starts with" isn't as clean.

It can have other components in file:// URIs?  If so, can you show an
example?

> In this patch I still do that check in the same place as in the
> original.

The problem with your proposal is that the value of 'file' is
incorrect between where it is first set and where you correct it.  Any
code added later that uses 'file' in-between might cause bugs if the
person who adds such code is not aware of this subtlety.  By contrast,
under my suggestion 'file' has the correct value from the get-go.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76982; Package emacs. Full text available.

Message received at 76982 <at> debbugs.gnu.org:


Received: (at 76982) by debbugs.gnu.org; 7 Apr 2025 04:19:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 07 00:19:08 2025
Received: from localhost ([127.0.0.1]:51403 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u1dwx-0007EC-M0
	for submit <at> debbugs.gnu.org; Mon, 07 Apr 2025 00:19:08 -0400
Received: from fout-b2-smtp.messagingengine.com ([202.12.124.145]:35873)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sebastian@HIDDEN>)
 id 1u1dwv-0007D9-9k
 for 76982 <at> debbugs.gnu.org; Mon, 07 Apr 2025 00:19:06 -0400
Received: from phl-compute-08.internal (phl-compute-08.phl.internal
 [10.202.2.48])
 by mailfout.stl.internal (Postfix) with ESMTP id 56F7D114010E;
 Mon,  7 Apr 2025 00:18:59 -0400 (EDT)
Received: from phl-mailfrontend-01 ([10.202.2.162])
 by phl-compute-08.internal (MEProxy); Mon, 07 Apr 2025 00:18:59 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sebasmonia.com;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm2; t=1743999539; x=
 1744085939; bh=AuK+n+Cu8KxRHvxkz6/XfL60sFepr7Qev2IqNv76+AI=; b=l
 kdzzl/EZ/sBbtrgl3zRkAPswKHpZXUeSYF2iY3s+fR7SifOBmCzF7MUV8ilSvndU
 /adTnsUnPg3qufvpm03JjIU6Ok6hIP0+8jNkpGFUPZSYGTIggqewvSTbykL1AarA
 eOkM3T8CGRoVt8sUh7ZUwIBVPuGQGmW5fS/U96+ZJgy/i1vLNW12L+A1d0JtIqvQ
 WCQQtjagpCTyZ9BNcN2hgvEhOdCZTX1CIwxcfL4jiq96cYvUG8RbkbcbZ+m6EvlO
 95dkaW3ipCKtOCgH/vrjCiR3MXPA/n+Fv4Fqn4Ger7gG9C06TiB3270v8SJJ9y71
 ctHe2m/GsN1HCmpOSd5Ww==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1743999539; x=1744085939; bh=AuK+n+Cu8KxRHvxkz6/XfL60sFepr7Qev2I
 qNv76+AI=; b=ULPMeutNfpq3EGYPb49gWMI/Au0ZmqRe29kL+AreCNMGvmvBgCn
 K2vFh75KDiORf2QLyg0p3GN32fhnDk7lXsLM9jcOLzXcJbTWTq45bvNpCWlpk3Jw
 B+sk8rEICBdt1t5DAxecOVEuZNs3QqsZG0GJQrnxcVPIz1UTYlIQqjAb27o/hpp/
 jCN+fqmLe4VFA1nUaEl683jOuWJCj9wqIdgeDbIPJKmiYQQvPuBVrsDgUVuErGGp
 Ztj4599B7HlcnLTH3E4jrlC6Ad3abHxe97Mp+JD2oSldCC6gTUSZE20d1+3KYN9W
 iCVS22oVZT9FFTKa82zmhelVAzU15K2EOqA==
X-ME-Sender: <xms:MVLzZwsqlFkHnhxJAYe0jd413kGcZ6uXJdtIKHFK4sOx_DuUH5_g2w>
 <xme:MVLzZ9fk9dUHtmn7aUKAHhNqq329yxctBnNXKOnUAejSDC61MFfXcRBEuegFhxhS7
 XTBTVEyhIFS9bCpaQg>
X-ME-Received: <xmr:MVLzZ7zx32Tj0b96z0zZoFlr7AOgJxhCXA3gfQ0JgIT1Qqeg26B3Q_QJJkEXx7LBaOvPkXvm-qB-hnekcRl8rpAunMaVltjsdlo>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduleelvddtucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih
 gvnhhtshculddquddttddmnecujfgurhephffvvefujghffffkfgggtgesmhdtreertder
 jeenucfhrhhomhepufgvsggrshhtihojnhcuofhonhovrgcuoehsvggsrghsthhirghnse
 hsvggsrghsmhhonhhirgdrtghomheqnecuggftrfgrthhtvghrnhepheekvdeufffgleeu
 vdeutefhjeettedufeffleehjeeguefggfetteefvddvkeetnecuvehluhhsthgvrhfuih
 iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshgvsggrshhtihgrnhesshgvsggr
 shhmohhnihgrrdgtohhmpdhnsggprhgtphhtthhopeefpdhmohguvgepshhmthhpohhuth
 dprhgtphhtthhopehmohhrghgrnhesihgtvgelrdguihhgihhtrghlpdhrtghpthhtohep
 jeeileekvdesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopegvlhhiiiesgh
 hnuhdrohhrgh
X-ME-Proxy: <xmx:MlLzZzNBvEzfXaoMiWfc05w8hAFtHoXCJqx2E440YNQ_LKOez0mZUg>
 <xmx:MlLzZw9ZA2BbIS9PmwrO2gVNRqG6XnG4YO0xsqX83g4imNYHzYN6jA>
 <xmx:MlLzZ7UBK4CF3TvIorsCQu1-izfc0GLYSPc4i8ZFs6PcxYGgubRp5A>
 <xmx:MlLzZ5fpUTFpctO7iEVRe7p-k2p3Vse99Ci2aGvv8rjaHIZLGFSGsA>
 <xmx:M1LzZx5hgxcsSDvitN3TtR9Qr2xrDcsiEIyCDCSlLIkqAdP4iz50SaPz>
Feedback-ID: iab2c46da:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 7 Apr 2025 00:18:57 -0400 (EDT)
From: =?utf-8?Q?Sebasti=C3=A1n_Mon=C3=ADa?= <sebastian@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#76982: 30.1; url-generic-parse-url cannot parse Windows
 file paths
In-Reply-To: <864izc84ua.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 29 Mar
 2025 14:16:13 +0300")
References: <87msdq9lut.fsf@HIDDEN> <thqn8qpa9hpf.fsf@HIDDEN>
 <86y0x92vfq.fsf@HIDDEN> <864izc84ua.fsf@HIDDEN>
Date: Mon, 07 Apr 2025 00:18:57 -0400
Message-ID: <87ldsck3im.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 76982
Cc: 76982 <at> debbugs.gnu.org, morgan@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hello,

Attached a new patch, with some tests and updated changelog.

Eli Zaretskii <eliz@HIDDEN> writes:
> Ping!  Sebasti=C3=A1n, would you like to submit an updated patch which
> addresses my comments?
>
>> > @@ -210,6 +215,13 @@ url-generic-parse-url
>> >=20=20
>> >            (if (and host (string-match "%[0-9][0-9]" host))
>> >                (setq host (url-unhex-string host)))
>> > +
>> > +          ;; For file:// URIs, if the path "looks like" Windows/DOS, =
it
>> > +          ;; makes sense to strip the leading slash (bug#76982)
>> > +          (when (and (string=3D "file" scheme)
>> > +                     (string-match "^/[A-Za-z]:[/\\]" file))
>> > +            (setq file (substring file 1)))
>> > +
>> >            (url-parse-make-urlobj scheme user pass host port file
>> >  				 fragment nil full))))))
>>=20
>> Isn't it cleaner to go one more character forward here:
>>=20
>>           ;; 3.2. Authority
>>           (when (looking-at "//")
>>             (setq full t)
>>             (forward-char 2)  <<<<<<<<<<<<<<<<<<<<
>>             (setq save-pos (point))
>>             (skip-chars-forward "^/?#")
>>=20
>> if the conditions for Windows-style absolute file name are fulfilled?

The URI could potentially have components before we get to the filename,
so the look head for "path starts with" isn't as clean.
In this patch I still do that check in the same place as in the
original.


Thank you,
Seb


--=-=-=
Content-Type: text/x-patch; charset=utf-8
Content-Disposition: attachment;
 filename=0001-Special-treatment-for-file-URIs-that-look-like-Windo.patch
Content-Transfer-Encoding: quoted-printable
Content-Description: Strip leading /

From 116aeca8bcb1e687b5d09481f7bc6a6dd15535fc Mon Sep 17 00:00:00 2001
From: =3D?UTF-8?q?Sebasti=3DC3=3DA1n=3D20Mon=3DC3=3DADa?=3D <sebastian@seba=
smonia.com>
Date: Mon, 7 Apr 2025 00:08:08 -0400
Subject: [PATCH] Special treatment for file URIs that look like Windows pat=
hs

* lisp/url/url-parse.el (url-generic-parse-url): remove prefix /
when a file URI's filename starts with a single letter followed
by a colon and a slash or backslash.
(url-recreate-url): mirror the change applied when parsing, so
the URL is recreated properly.
---
 lisp/url/url-parse.el            | 14 +++++++++++++-
 test/lisp/url/url-parse-tests.el | 11 +++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el
index 4c65721b83d..1dff66c6228 100644
--- a/lisp/url/url-parse.el
+++ b/lisp/url/url-parse.el
@@ -83,7 +83,12 @@ url-recreate-url
 	 ;; port is empty or if its value would be the same as that of
 	 ;; the scheme's default."
 	 (port (url-port-if-non-default urlobj))
-	 (file (url-filename urlobj))
+         ;; For Windows/DOS-like paths, `url-generic-parse-url' strips
+         ;; the leading /, so we need to add it back (bug#76982)
+	 (file (if (and (string=3D "file" type)
+                        (string-match "^[A-Za-z]:[/\\]" (url-filename urlo=
bj)))
+                   (concat "/" (url-filename urlobj))
+                 (url-filename urlobj)))
 	 (frag (url-target urlobj)))
     (concat (if type (concat type ":"))
 	    (if (url-fullness urlobj) "//")
@@ -210,6 +215,13 @@ url-generic-parse-url
=20
           (if (and host (string-match "%[0-9][0-9]" host))
               (setq host (url-unhex-string host)))
+
+          ;; For file:// URIs, if the path "looks like" Windows/DOS, it
+          ;; makes sense to strip the leading slash (bug#76982)
+          (when (and (string=3D "file" scheme)
+                     (string-match "^/[A-Za-z]:[/\\]" file))
+            (setq file (substring file 1)))
+
           (url-parse-make-urlobj scheme user pass host port file
 				 fragment nil full))))))
=20
diff --git a/test/lisp/url/url-parse-tests.el b/test/lisp/url/url-parse-tes=
ts.el
index e70c1eef32f..8039c422df8 100644
--- a/test/lisp/url/url-parse-tests.el
+++ b/test/lisp/url/url-parse-tests.el
@@ -166,6 +166,17 @@ url-generic-parse-url/multibyte-host-and-path
                  (url-parse-make-urlobj "http" nil nil "=D0=B1=D0=B0=D0=BD=
=D0=BA=D0=B8.=D1=80=D1=84" nil
                                         "/=D1=84=D1=8B=D0=B2=D0=B0/" nil n=
il t))))
=20
+(ert-deftest url-generic-parse-url/ms-windows-file-uri-hanlding ()
+  "bug#76982  Make an exception if a URI refers to a filename and it \"loo=
ks like\" a Windows path: strip the leading /"
+  (should (equal (url-generic-parse-url "file:///c:/windows-path") (url-pa=
rse-make-urlobj "file" nil nil "" nil "c:/windows-path" nil nil t)))
+  (should (equal (url-filename (url-generic-parse-url "file:///c:/director=
y/file.txt")) "c:/directory/file.txt"))
+  (should (equal (url-recreate-url (url-parse-make-urlobj "file" nil nil "=
" nil "c:/directory/file.txt" nil nil t)) "file:///c:/directory/file.txt"))
+  ;; https://www.rfc-editor.org/rfc/rfc8089.html#appendix-E.2
+  (should (equal (url-generic-parse-url "file:c:/path/to/file") (url-parse=
-make-urlobj "file" nil nil nil nil "c:/path/to/file" nil nil nil)))
+  (should (equal (url-recreate-url (url-parse-make-urlobj "file" nil nil n=
il nil "c:/path/to/file" nil nil nil)) "file:c:/path/to/file"))
+  ;; accept backslashes too
+  (should (equal (url-filename (url-generic-parse-url "file:///c:\\directo=
ry\\file.txt")) "c:\\directory\\file.txt")))
+
 (provide 'url-parse-tests)
=20
 ;;; url-parse-tests.el ends here
--=20
2.49.0


--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable



--=20
Sebasti=C3=A1n Mon=C3=ADa
https://site.sebasmonia.com/

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76982; Package emacs. Full text available.
Added tag(s) patch. Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 76982 <at> debbugs.gnu.org:


Received: (at 76982) by debbugs.gnu.org; 29 Mar 2025 12:07:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 29 08:07:37 2025
Received: from localhost ([127.0.0.1]:57380 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tyUyP-0007e7-4U
	for submit <at> debbugs.gnu.org; Sat, 29 Mar 2025 08:07:37 -0400
Received: from fout-b3-smtp.messagingengine.com ([202.12.124.146]:52239)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sebastian@HIDDEN>)
 id 1tyUyM-0007do-Hh
 for 76982 <at> debbugs.gnu.org; Sat, 29 Mar 2025 08:07:35 -0400
Received: from phl-compute-01.internal (phl-compute-01.phl.internal
 [10.202.2.41])
 by mailfout.stl.internal (Postfix) with ESMTP id B80031140114;
 Sat, 29 Mar 2025 08:07:28 -0400 (EDT)
Received: from phl-imap-12 ([10.202.2.86])
 by phl-compute-01.internal (MEProxy); Sat, 29 Mar 2025 08:07:28 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sebasmonia.com;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm2; t=1743250048; x=
 1743336448; bh=KE12etGwYTUpA7oWTpJLHl/0T5YfDz+IxuFYgor+eZo=; b=k
 RQCkuh81I83LgTx7oNUK2txtrS7CxU4LULnAFMETl4dt45DNlUECoDCOZDyR5UHg
 OHaKbfKWxQgs0NyeUGTtBbZR/rdt33Bc1AHMZLxgyDu4WolC3O21/DJcXZs6dL1u
 7jk3IibSoKairfzom+DsYm1YSDiLWFlHAjas2a+NgW+ac1J95JnN619YX093zxRP
 DHVCRQAoAWckzYijDL4KtryThaPzTxglpn9NraCIv/uc7PoqmXksgF6RXOhPE8Xb
 w60hrBThNYaL/RBuExyVpKe4JXyJPeOU5PJXtxvyHj2M3rR9IN+ZNNoEHiwZ8U9j
 91mMsOiUaxyC6Ejx7yHzA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1743250048; x=1743336448; bh=KE12etGwYTUpA7oWTpJLHl/0T5YfDz+IxuF
 Ygor+eZo=; b=QVnmoO+vAT7LvmLcqjEsFii5dX17al7yOOpP+izbJnWdh/1hTUt
 GjCZyuNuN6moWdxey0IJs6s9UsldhtMynoFuc2r6ZegQMAI4/9o9PuHYhyp6X6Aa
 oLzpOEltdLhXDuXLZFTwd8CCYaJroduD2RU5UoF1vQz0fFp+TDHfxl0PG3dbhK6y
 L8yGxtSttJbh8fMxNuuhM1iAZV9A2rdjykVtJr6asWN1FH/C0KuFyUiqzHQ+KVXA
 YCAmrio/WuzYRGq2aCUpndVj3x9irjnvWXKoK1yu7NypqnESk98sG3iJBMfLXU7Q
 NiwKPZU4n3f4r1OAKxBQR20g97Ux6JaB/Mg==
X-ME-Sender: <xms:gOLnZ48YUUZhPS9TXOoSx9LcvJTHJQVXG87lnykN4miCVQn8jeL1HQ>
 <xme:gOLnZwsLYrq9yQTXietCq385_xlC__IldfVzZEhoTzWwROL51Vl_gpDqRngwL3KlY
 5Gt72FZx8Bk8gGadiw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddujeegudefucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih
 gvnhhtshculddquddttddmnecujfgurhepofggfffhvfevkfgjfhfutgesrgdtreerredt
 jeenucfhrhhomhepufgvsggrshhtihojnhcuofhonhovrgcuoehsvggsrghsthhirghnse
 hsvggsrghsmhhonhhirgdrtghomheqnecuggftrfgrthhtvghrnhepveevheeiieelheej
 vefgteejleffgfefvedvtdevjeetheejveeuieetvefgkeffnecuffhomhgrihhnpehgih
 hthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl
 fhhrohhmpehsvggsrghsthhirghnsehsvggsrghsmhhonhhirgdrtghomhdpnhgspghrtg
 hpthhtohepfedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepjeeileekvdesuggv
 sggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrghdprh
 gtphhtthhopehmohhrghgrnhesihgtvgelrdguihhgihhtrghl
X-ME-Proxy: <xmx:gOLnZ-DtLiEezMLAJZLiFd-vlAeaSN6EEJA-Kekfmj0srbGOhpgvpg>
 <xmx:gOLnZ4f0FRoYENzzhxJcJBsl35Mvpis21AIEl6rkEGIrRwi9bFe3Sw>
 <xmx:gOLnZ9Mrwo_-c7cRxLIf_8KwczIZzLPgPqtDesC25P9JmqbmWqRWaA>
 <xmx:gOLnZynXdopTh9sgshlqQVO0vE-nZ6BpN4YGTx2I6L48UEX6bPf-aw>
 <xmx:gOLnZ2bAiUAljQTF_nH4qBPKQtUO6nA234BTHg4Jk6A82k7G8knlKTSf>
Feedback-ID: iab2c46da:Fastmail
Received: by mailuser.phl.internal (Postfix, from userid 501)
 id 0D0A31C20066; Sat, 29 Mar 2025 08:07:28 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
MIME-Version: 1.0
X-ThreadId: T6cc4cf50b5eb1458
Date: Sat, 29 Mar 2025 08:07:00 -0400
From: =?UTF-8?Q?Sebasti=C3=A1n_Mon=C3=ADa?= <sebastian@HIDDEN>
To: "Eli Zaretskii" <eliz@HIDDEN>
Message-Id: <1eb3a08d-6438-4244-84ec-fdf68c75e4c5@HIDDEN>
In-Reply-To: <864izc84ua.fsf@HIDDEN>
References: <87msdq9lut.fsf@HIDDEN> <thqn8qpa9hpf.fsf@HIDDEN>
 <86y0x92vfq.fsf@HIDDEN> <864izc84ua.fsf@HIDDEN>
Subject: Re: bug#76982: 30.1;
 url-generic-parse-url cannot parse Windows file paths
Content-Type: multipart/alternative; boundary=614ddcb2251a4bf999967f0f099234d2
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 76982
Cc: 76982 <at> debbugs.gnu.org, morgan@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--614ddcb2251a4bf999967f0f099234d2
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi Eli,=20
I didn=E2=80=99t send an email saying that I would do it last weekend, I=
 thought "nah surely this week I get to it". And here we are :(

But yes I will! :) As soon as I get a chance.=20

On Sat, Mar 29, 2025, at 7:16 AM, Eli Zaretskii wrote:
> Ping!  Sebasti=C3=A1n, would you like to submit an updated patch which
> addresses my comments?
>=20
> > Cc: 76982 <at> debbugs.gnu.org, morgan@HIDDEN
> > Date: Thu, 13 Mar 2025 10:20:41 +0200
> > From: Eli Zaretskii <eliz@HIDDEN>
> >=20
> > > Cc: 76982 <at> debbugs.gnu.org
> > > From: Sebasti=C3=A1n Mon=C3=ADa
> > >  <sebastian@HIDDEN>
> > > Date: Wed, 12 Mar 2025 15:23:08 -0400
> > >=20
> > > Morgan Willcock <morgan@HIDDEN> writes:
> > >=20
> > > >   (url-filename (url-generic-parse-url "file:///c:/windows"))
> > > >   =3D> "/c:/windows"
> > > >
> > > >   (url-filename (url-generic-parse-url "c:/windows"))
> > > >   =3D> "/windows"
> > > >
> > > > This is relevant in functions such as
> > > > mml-expand-html-into-multipart-related, where there is a check t=
hat the
> > > > file exists:
> > > >
> > > >   (when (and (null (url-type parsed))
> > > >              (not (zerop (length (url-filename parsed))))
> > > >              (file-exists-p (url-filename parsed)))
> > > >     ...)
> > > >
> > > > An example of a real world problem is being unable to reliably s=
end HTML
> > > > mail when using Windows:
> > > >
> > > > https://github.com/jeremy-compostella/org-msg/issues/122
> > >=20
> > > Attached a potential patch.
> >=20
> > Thanks.
> >=20
> > > >From 25c0cbeb1523e3fed3d3409465b6dcc99c967a38 Mon Sep 17 00:00:00=
 2001
> > > From: =3D?UTF-8?q?Sebasti=3DC3=3DA1n=3D20Mon=3DC3=3DADa?=3D
> > >  <sebastian.monia@HIDDEN>
> > > Date: Wed, 12 Mar 2025 15:16:19 -0400
> > > Subject: [PATCH] url-parse.el: Parsing exceptions for Windows paths
> > >  (bug#76982)
> >=20
> > Please add a ChangeLog-style list of functions that are modified and=
 a
> > short description of each modification.
> >=20
> > >=20
> > > ---
> > >  lisp/url/url-parse.el | 14 +++++++++++++-
> > >  1 file changed, 13 insertions(+), 1 deletion(-)
> > >=20
> > > diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el
> > > index 4c65721b83d..1dff66c6228 100644
> > > --- a/lisp/url/url-parse.el
> > > +++ b/lisp/url/url-parse.el
> > > @@ -83,7 +83,12 @@ url-recreate-url
> > >  ;; port is empty or if its value would be the same as that of
> > >  ;; the scheme's default."
> > >  (port (url-port-if-non-default urlobj))
> > > - (file (url-filename urlobj))
> > > +         ;; For Windows/DOS-like paths, `url-generic-parse-url' s=
trips
> > > +         ;; the leading /, so we need to add it back (bug#76982)
> > > + (file (if (and (string=3D "file" type)
> > > +                        (string-match "^[A-Za-z]:[/\\]" (url-file=
name urlobj)))
> > > +                   (concat "/" (url-filename urlobj))
> > > +                 (url-filename urlobj)))
> > >  (frag (url-target urlobj)))
> > >      (concat (if type (concat type ":"))
> > >      (if (url-fullness urlobj) "//")
> >=20
> > OK.
> >=20
> > > @@ -210,6 +215,13 @@ url-generic-parse-url
> > > =20
> > >            (if (and host (string-match "%[0-9][0-9]" host))
> > >                (setq host (url-unhex-string host)))
> > > +
> > > +          ;; For file:// URIs, if the path "looks like" Windows/D=
OS, it
> > > +          ;; makes sense to strip the leading slash (bug#76982)
> > > +          (when (and (string=3D "file" scheme)
> > > +                     (string-match "^/[A-Za-z]:[/\\]" file))
> > > +            (setq file (substring file 1)))
> > > +
> > >            (url-parse-make-urlobj scheme user pass host port file
> > >  fragment nil full))))))
> >=20
> > Isn't it cleaner to go one more character forward here:
> >=20
> >           ;; 3.2. Authority
> >           (when (looking-at "//")
> >             (setq full t)
> >             (forward-char 2)  <<<<<<<<<<<<<<<<<<<<
> >             (setq save-pos (point))
> >             (skip-chars-forward "^/?#")
> >=20
> > if the conditions for Windows-style absolute file name are fulfilled?
> >=20
> > Also, could we please have some simple tests for this?
> >=20
> >=20
> >=20
> >=20
>=20

--614ddcb2251a4bf999967f0f099234d2
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html><html><head><title></title><style type=3D"text/css">p.Mso=
Normal,p.MsoNoSpacing{margin:0}</style></head><body><div>Hi Eli,&nbsp;<b=
r></div><div>I didn=E2=80=99t send an email saying that I would do it la=
st weekend, I thought "nah surely this week I get to it". And here we ar=
e :(<br></div><div><br></div><div>But yes I will! :) As soon as I get a =
chance.&nbsp;</div><div><br></div><div>On Sat, Mar 29, 2025, at 7:16 AM,=
 Eli Zaretskii wrote:<br></div><blockquote type=3D"cite" id=3D"qt" style=
=3D""><div>Ping!&nbsp; Sebasti=C3=A1n, would you like to submit an updat=
ed patch which<br></div><div>addresses my comments?<br></div><div><br></=
div><div>&gt; Cc:&nbsp;<a href=3D"mailto:76982 <at> debbugs.gnu.org">76982@de=
bbugs.gnu.org</a>,&nbsp;<a href=3D"mailto:morgan@HIDDEN">morgan@ic=
e9.digital</a><br></div><div>&gt; Date: Thu, 13 Mar 2025 10:20:41 +0200<=
br></div><div>&gt; From: Eli Zaretskii &lt;<a href=3D"mailto:eliz@HIDDEN=
g">eliz@HIDDEN</a>&gt;<br></div><div>&gt;&nbsp;<br></div><div>&gt; &gt;=
 Cc:&nbsp;<a href=3D"mailto:76982 <at> debbugs.gnu.org">76982 <at> debbugs.gnu.org=
</a><br></div><div>&gt; &gt; From: Sebasti=C3=A1n Mon=C3=ADa<br></div><d=
iv>&gt; &gt;&nbsp; &lt;<a href=3D"mailto:sebastian@HIDDEN">sebas=
tian@HIDDEN</a>&gt;<br></div><div>&gt; &gt; Date: Wed, 12 Mar 20=
25 15:23:08 -0400<br></div><div>&gt; &gt;&nbsp;<br></div><div>&gt; &gt; =
Morgan Willcock &lt;<a href=3D"mailto:morgan@HIDDEN">morgan@HIDDEN=
igital</a>&gt; writes:<br></div><div>&gt; &gt;&nbsp;<br></div><div>&gt; =
&gt; &gt;&nbsp;&nbsp; (url-filename (url-generic-parse-url "file:///c:/w=
indows"))<br></div><div>&gt; &gt; &gt;&nbsp;&nbsp; =3D&gt; "/c:/windows"=
<br></div><div>&gt; &gt; &gt;<br></div><div>&gt; &gt; &gt;&nbsp;&nbsp; (=
url-filename (url-generic-parse-url "c:/windows"))<br></div><div>&gt; &g=
t; &gt;&nbsp;&nbsp; =3D&gt; "/windows"<br></div><div>&gt; &gt; &gt;<br><=
/div><div>&gt; &gt; &gt; This is relevant in functions such as<br></div>=
<div>&gt; &gt; &gt; mml-expand-html-into-multipart-related, where there =
is a check that the<br></div><div>&gt; &gt; &gt; file exists:<br></div><=
div>&gt; &gt; &gt;<br></div><div>&gt; &gt; &gt;&nbsp;&nbsp; (when (and (=
null (url-type parsed))<br></div><div>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (not (zerop (=
length (url-filename parsed))))<br></div><div>&gt; &gt; &gt;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (file=
-exists-p (url-filename parsed)))<br></div><div>&gt; &gt; &gt;&nbsp;&nbs=
p;&nbsp;&nbsp; ...)<br></div><div>&gt; &gt; &gt;<br></div><div>&gt; &gt;=
 &gt; An example of a real world problem is being unable to reliably sen=
d HTML<br></div><div>&gt; &gt; &gt; mail when using Windows:<br></div><d=
iv>&gt; &gt; &gt;<br></div><div>&gt; &gt; &gt;&nbsp;<a href=3D"https://g=
ithub.com/jeremy-compostella/org-msg/issues/122">https://github.com/jere=
my-compostella/org-msg/issues/122</a><br></div><div>&gt; &gt;&nbsp;<br><=
/div><div>&gt; &gt; Attached a potential patch.<br></div><div>&gt;&nbsp;=
<br></div><div>&gt; Thanks.<br></div><div>&gt;&nbsp;<br></div><div>&gt; =
&gt; &gt;From 25c0cbeb1523e3fed3d3409465b6dcc99c967a38 Mon Sep 17 00:00:=
00 2001<br></div><div>&gt; &gt; From: =3D?UTF-8?q?Sebasti=3DC3=3DA1n=3D2=
0Mon=3DC3=3DADa?=3D<br></div><div>&gt; &gt;&nbsp; &lt;<a href=3D"mailto:=
sebastian.monia@HIDDEN">sebastian.monia@HIDDEN</a>&gt;<b=
r></div><div>&gt; &gt; Date: Wed, 12 Mar 2025 15:16:19 -0400<br></div><d=
iv>&gt; &gt; Subject: [PATCH] url-parse.el: Parsing exceptions for Windo=
ws paths<br></div><div>&gt; &gt;&nbsp; (bug#76982)<br></div><div>&gt;&nb=
sp;<br></div><div>&gt; Please add a ChangeLog-style list of functions th=
at are modified and a<br></div><div>&gt; short description of each modif=
ication.<br></div><div>&gt;&nbsp;<br></div><div>&gt; &gt;&nbsp;<br></div=
><div>&gt; &gt; ---<br></div><div>&gt; &gt;&nbsp; lisp/url/url-parse.el =
| 14 +++++++++++++-<br></div><div>&gt; &gt;&nbsp; 1 file changed, 13 ins=
ertions(+), 1 deletion(-)<br></div><div>&gt; &gt;&nbsp;<br></div><div>&g=
t; &gt; diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el<br></=
div><div>&gt; &gt; index 4c65721b83d..1dff66c6228 100644<br></div><div>&=
gt; &gt; --- a/lisp/url/url-parse.el<br></div><div>&gt; &gt; +++ b/lisp/=
url/url-parse.el<br></div><div>&gt; &gt; @@ -83,7 +83,12 @@ url-recreate=
-url<br></div><div>&gt; &gt;&nbsp; 	 ;; port is empty or if its value wo=
uld be the same as that of<br></div><div>&gt; &gt;&nbsp; 	 ;; the scheme=
's default."<br></div><div>&gt; &gt;&nbsp; 	 (port (url-port-if-non-defa=
ult urlobj))<br></div><div>&gt; &gt; -	 (file (url-filename urlobj))<br>=
</div><div>&gt; &gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;=
; For Windows/DOS-like paths, `url-generic-parse-url' strips<br></div><d=
iv>&gt; &gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;; the le=
ading /, so we need to add it back (bug#76982)<br></div><div>&gt; &gt; +=
	 (file (if (and (string=3D "file" type)<br></div><div>&gt; &gt; +&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (string-mat=
ch "^[A-Za-z]:[/\\]" (url-filename urlobj)))<br></div><div>&gt; &gt; +&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (concat "/" (url-filename urlobj))<br=
></div><div>&gt; &gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (url-filename urlobj)))<=
br></div><div>&gt; &gt;&nbsp; 	 (frag (url-target urlobj)))<br></div><di=
v>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (concat (if type (concat type =
":"))<br></div><div>&gt; &gt;&nbsp; 	&nbsp;&nbsp;&nbsp; (if (url-fullnes=
s urlobj) "//")<br></div><div>&gt;&nbsp;<br></div><div>&gt; OK.<br></div=
><div>&gt;&nbsp;<br></div><div>&gt; &gt; @@ -210,6 +215,13 @@ url-generi=
c-parse-url<br></div><div>&gt; &gt;&nbsp;&nbsp;<br></div><div>&gt; &gt;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (a=
nd host (string-match "%[0-9][0-9]" host))<br></div><div>&gt; &gt;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp; (setq host (url-unhex-string host)))<br></div><div>&gt; &gt=
; +<br></div><div>&gt; &gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; ;; For file:// URIs, if the path "looks like" Windows/DOS, i=
t<br></div><div>&gt; &gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp; ;; makes sense to strip the leading slash (bug#76982)<br></div=
><div>&gt; &gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
(when (and (string=3D "file" scheme)<br></div><div>&gt; &gt; +&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (string-match "^/[A-Za-z]:[/\\]" =
file))<br></div><div>&gt; &gt; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; (setq file (substring file 1)))<br></div><div=
>&gt; &gt; +<br></div><div>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (url-parse-make-urlobj scheme user pass h=
ost port file<br></div><div>&gt; &gt;&nbsp; 				 fragment nil full))))))=
<br></div><div>&gt;&nbsp;<br></div><div>&gt; Isn't it cleaner to go one =
more character forward here:<br></div><div>&gt;&nbsp;<br></div><div>&gt;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;; 3.2. Aut=
hority<br></div><div>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; (when (looking-at "//")<br></div><div>&gt;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq full t)<b=
r></div><div>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp; (forward-char 2)&nbsp; &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt=
;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;<br></div><div>&gt;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (se=
tq save-pos (point))<br></div><div>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (skip-chars-forward "^/?#")<br><=
/div><div>&gt;&nbsp;<br></div><div>&gt; if the conditions for Windows-st=
yle absolute file name are fulfilled?<br></div><div>&gt;&nbsp;<br></div>=
<div>&gt; Also, could we please have some simple tests for this?<br></di=
v><div>&gt;&nbsp;<br></div><div>&gt;&nbsp;<br></div><div>&gt;&nbsp;<br><=
/div><div>&gt;&nbsp;<br></div><div><br></div></blockquote><div><br></div=
></body></html>
--614ddcb2251a4bf999967f0f099234d2--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76982; Package emacs. Full text available.

Message received at 76982 <at> debbugs.gnu.org:


Received: (at 76982) by debbugs.gnu.org; 29 Mar 2025 11:16:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 29 07:16:26 2025
Received: from localhost ([127.0.0.1]:57203 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tyUAr-0001yT-QA
	for submit <at> debbugs.gnu.org; Sat, 29 Mar 2025 07:16:26 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:51610)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tyUAp-0001yA-12
 for 76982 <at> debbugs.gnu.org; Sat, 29 Mar 2025 07:16:23 -0400
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 <eliz@HIDDEN>)
 id 1tyUAi-0003bA-AO; Sat, 29 Mar 2025 07:16:16 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=yQBDZnCrJMgxuaFRXjDy1OxynGOIDfKfwIJKn4yHakw=; b=OhY+NinuwM61l9uFTsHa
 dQuwRN2IdhRnfzl2diiI09NTcy1wyuhOV+19D5BB+AKnMn4L1NYSrN5wh0ZT8skOKAwhjN9CviZA9
 NPTEbZrahhVDAPw88ua9mdk12WyLpwDuSZeCyuWFV2C2bxnt3Pv5yFpulQDABoCkmCfVv1oC1Y67Y
 SdzibMnRe0VvfQR5Hy5n+BL5ThqiIrXwM2NAjPJlUw5QG71gy7CXhRzVwQOdnqCKCUCBgH0EVi6vx
 Q7rVd3L6u96Z+u6BO/q876ad6FO1DpG8bcA0MlLF14A85dwnKHo9OuqsHgGWFmJ0QbvconR4V16LF
 EE6KJjwenhTzUw==;
Date: Sat, 29 Mar 2025 14:16:13 +0300
Message-Id: <864izc84ua.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: sebastian@HIDDEN
In-Reply-To: <86y0x92vfq.fsf@HIDDEN> (message from Eli Zaretskii on Thu, 13
 Mar 2025 10:20:41 +0200)
Subject: Re: bug#76982: 30.1;
 url-generic-parse-url cannot parse Windows file paths
References: <87msdq9lut.fsf@HIDDEN> <thqn8qpa9hpf.fsf@HIDDEN>
 <86y0x92vfq.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 76982
Cc: 76982 <at> debbugs.gnu.org, morgan@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Ping!  Sebastián, would you like to submit an updated patch which
addresses my comments?

> Cc: 76982 <at> debbugs.gnu.org, morgan@HIDDEN
> Date: Thu, 13 Mar 2025 10:20:41 +0200
> From: Eli Zaretskii <eliz@HIDDEN>
> 
> > Cc: 76982 <at> debbugs.gnu.org
> > From: Sebastián Monía
> >  <sebastian@HIDDEN>
> > Date: Wed, 12 Mar 2025 15:23:08 -0400
> > 
> > Morgan Willcock <morgan@HIDDEN> writes:
> > 
> > >   (url-filename (url-generic-parse-url "file:///c:/windows"))
> > >   => "/c:/windows"
> > >
> > >   (url-filename (url-generic-parse-url "c:/windows"))
> > >   => "/windows"
> > >
> > > This is relevant in functions such as
> > > mml-expand-html-into-multipart-related, where there is a check that the
> > > file exists:
> > >
> > >   (when (and (null (url-type parsed))
> > >              (not (zerop (length (url-filename parsed))))
> > >              (file-exists-p (url-filename parsed)))
> > >     ...)
> > >
> > > An example of a real world problem is being unable to reliably send HTML
> > > mail when using Windows:
> > >
> > > https://github.com/jeremy-compostella/org-msg/issues/122
> > 
> > Attached a potential patch.
> 
> Thanks.
> 
> > >From 25c0cbeb1523e3fed3d3409465b6dcc99c967a38 Mon Sep 17 00:00:00 2001
> > From: =?UTF-8?q?Sebasti=C3=A1n=20Mon=C3=ADa?=
> >  <sebastian.monia@HIDDEN>
> > Date: Wed, 12 Mar 2025 15:16:19 -0400
> > Subject: [PATCH] url-parse.el: Parsing exceptions for Windows paths
> >  (bug#76982)
> 
> Please add a ChangeLog-style list of functions that are modified and a
> short description of each modification.
> 
> > 
> > ---
> >  lisp/url/url-parse.el | 14 +++++++++++++-
> >  1 file changed, 13 insertions(+), 1 deletion(-)
> > 
> > diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el
> > index 4c65721b83d..1dff66c6228 100644
> > --- a/lisp/url/url-parse.el
> > +++ b/lisp/url/url-parse.el
> > @@ -83,7 +83,12 @@ url-recreate-url
> >  	 ;; port is empty or if its value would be the same as that of
> >  	 ;; the scheme's default."
> >  	 (port (url-port-if-non-default urlobj))
> > -	 (file (url-filename urlobj))
> > +         ;; For Windows/DOS-like paths, `url-generic-parse-url' strips
> > +         ;; the leading /, so we need to add it back (bug#76982)
> > +	 (file (if (and (string= "file" type)
> > +                        (string-match "^[A-Za-z]:[/\\]" (url-filename urlobj)))
> > +                   (concat "/" (url-filename urlobj))
> > +                 (url-filename urlobj)))
> >  	 (frag (url-target urlobj)))
> >      (concat (if type (concat type ":"))
> >  	    (if (url-fullness urlobj) "//")
> 
> OK.
> 
> > @@ -210,6 +215,13 @@ url-generic-parse-url
> >  
> >            (if (and host (string-match "%[0-9][0-9]" host))
> >                (setq host (url-unhex-string host)))
> > +
> > +          ;; For file:// URIs, if the path "looks like" Windows/DOS, it
> > +          ;; makes sense to strip the leading slash (bug#76982)
> > +          (when (and (string= "file" scheme)
> > +                     (string-match "^/[A-Za-z]:[/\\]" file))
> > +            (setq file (substring file 1)))
> > +
> >            (url-parse-make-urlobj scheme user pass host port file
> >  				 fragment nil full))))))
> 
> Isn't it cleaner to go one more character forward here:
> 
>           ;; 3.2. Authority
>           (when (looking-at "//")
>             (setq full t)
>             (forward-char 2)  <<<<<<<<<<<<<<<<<<<<
>             (setq save-pos (point))
>             (skip-chars-forward "^/?#")
> 
> if the conditions for Windows-style absolute file name are fulfilled?
> 
> Also, could we please have some simple tests for this?
> 
> 
> 
> 




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76982; Package emacs. Full text available.

Message received at 76982 <at> debbugs.gnu.org:


Received: (at 76982) by debbugs.gnu.org; 13 Mar 2025 08:20:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 13 04:20:55 2025
Received: from localhost ([127.0.0.1]:53485 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tsdoE-0004L8-I0
	for submit <at> debbugs.gnu.org; Thu, 13 Mar 2025 04:20:55 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:40320)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tsdoB-0004Ko-Jw
 for 76982 <at> debbugs.gnu.org; Thu, 13 Mar 2025 04:20:52 -0400
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 <eliz@HIDDEN>)
 id 1tsdo4-0001xg-OQ; Thu, 13 Mar 2025 04:20:44 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=w9tCcyH3oVpYjp7wc/2d6wJkpaJy8K124FhizkuUzr0=; b=GB2eIxm7DUzxNyIuDOpR
 Iq4/NA8rHypsXpyjUqAlApsxeWyMakwcpjL//EGpxVtC++lg1KxzgUx00E01uIZILvANj3ws5N351
 mptffhD6YtAbZ15wruAzkqMPt5FHu+tilkvCUSmO9OjNN9vu9XzOKL5/gZ5fWoe3tl3q3+0L8x1A9
 57pyVDJ/C7ZIjQLbsIBuyj/IJlQOaX6qXaiapp25DZWbGCPaAzMb5luDM6I9Xoo6Lqm23gpKWzppG
 zXHaE7J/+i5AexazxvaahDYIzGlh1HDB+toR34qFpkrd38COKqE/FFQKeLiZhywmMigs3Xpb07wwA
 ucCEQXNqttwkhg==;
Date: Thu, 13 Mar 2025 10:20:41 +0200
Message-Id: <86y0x92vfq.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: =?iso-8859-1?Q?Sebasti=E1n_Mon=EDa?= <sebastian@HIDDEN>
In-Reply-To: <thqn8qpa9hpf.fsf@HIDDEN> (sebastian@HIDDEN)
Subject: Re: bug#76982: 30.1;
 url-generic-parse-url cannot parse Windows file paths
References: <87msdq9lut.fsf@HIDDEN> <thqn8qpa9hpf.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 76982
Cc: 76982 <at> debbugs.gnu.org, morgan@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: 76982 <at> debbugs.gnu.org
> From: Sebastián Monía
>  <sebastian@HIDDEN>
> Date: Wed, 12 Mar 2025 15:23:08 -0400
> 
> Morgan Willcock <morgan@HIDDEN> writes:
> 
> >   (url-filename (url-generic-parse-url "file:///c:/windows"))
> >   => "/c:/windows"
> >
> >   (url-filename (url-generic-parse-url "c:/windows"))
> >   => "/windows"
> >
> > This is relevant in functions such as
> > mml-expand-html-into-multipart-related, where there is a check that the
> > file exists:
> >
> >   (when (and (null (url-type parsed))
> >              (not (zerop (length (url-filename parsed))))
> >              (file-exists-p (url-filename parsed)))
> >     ...)
> >
> > An example of a real world problem is being unable to reliably send HTML
> > mail when using Windows:
> >
> > https://github.com/jeremy-compostella/org-msg/issues/122
> 
> Attached a potential patch.

Thanks.

> >From 25c0cbeb1523e3fed3d3409465b6dcc99c967a38 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Sebasti=C3=A1n=20Mon=C3=ADa?=
>  <sebastian.monia@HIDDEN>
> Date: Wed, 12 Mar 2025 15:16:19 -0400
> Subject: [PATCH] url-parse.el: Parsing exceptions for Windows paths
>  (bug#76982)

Please add a ChangeLog-style list of functions that are modified and a
short description of each modification.

> 
> ---
>  lisp/url/url-parse.el | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el
> index 4c65721b83d..1dff66c6228 100644
> --- a/lisp/url/url-parse.el
> +++ b/lisp/url/url-parse.el
> @@ -83,7 +83,12 @@ url-recreate-url
>  	 ;; port is empty or if its value would be the same as that of
>  	 ;; the scheme's default."
>  	 (port (url-port-if-non-default urlobj))
> -	 (file (url-filename urlobj))
> +         ;; For Windows/DOS-like paths, `url-generic-parse-url' strips
> +         ;; the leading /, so we need to add it back (bug#76982)
> +	 (file (if (and (string= "file" type)
> +                        (string-match "^[A-Za-z]:[/\\]" (url-filename urlobj)))
> +                   (concat "/" (url-filename urlobj))
> +                 (url-filename urlobj)))
>  	 (frag (url-target urlobj)))
>      (concat (if type (concat type ":"))
>  	    (if (url-fullness urlobj) "//")

OK.

> @@ -210,6 +215,13 @@ url-generic-parse-url
>  
>            (if (and host (string-match "%[0-9][0-9]" host))
>                (setq host (url-unhex-string host)))
> +
> +          ;; For file:// URIs, if the path "looks like" Windows/DOS, it
> +          ;; makes sense to strip the leading slash (bug#76982)
> +          (when (and (string= "file" scheme)
> +                     (string-match "^/[A-Za-z]:[/\\]" file))
> +            (setq file (substring file 1)))
> +
>            (url-parse-make-urlobj scheme user pass host port file
>  				 fragment nil full))))))

Isn't it cleaner to go one more character forward here:

          ;; 3.2. Authority
          (when (looking-at "//")
            (setq full t)
            (forward-char 2)  <<<<<<<<<<<<<<<<<<<<
            (setq save-pos (point))
            (skip-chars-forward "^/?#")

if the conditions for Windows-style absolute file name are fulfilled?

Also, could we please have some simple tests for this?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76982; Package emacs. Full text available.

Message received at 76982 <at> debbugs.gnu.org:


Received: (at 76982) by debbugs.gnu.org; 12 Mar 2025 19:23:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 12 15:23:23 2025
Received: from localhost ([127.0.0.1]:51747 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tsRfm-0002XV-Ve
	for submit <at> debbugs.gnu.org; Wed, 12 Mar 2025 15:23:23 -0400
Received: from fhigh-a7-smtp.messagingengine.com ([103.168.172.158]:37605)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sebastian@HIDDEN>)
 id 1tsRfg-0002X9-H9
 for 76982 <at> debbugs.gnu.org; Wed, 12 Mar 2025 15:23:18 -0400
Received: from phl-compute-13.internal (phl-compute-13.phl.internal
 [10.202.2.53])
 by mailfhigh.phl.internal (Postfix) with ESMTP id 857DA11401F6;
 Wed, 12 Mar 2025 15:23:09 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-13.internal (MEProxy); Wed, 12 Mar 2025 15:23:09 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sebasmonia.com;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm1; t=1741807389; x=
 1741893789; bh=cMD2+CcGGVJQx7lHpCSaD65e7IjBazmNbDxrnEbcFA0=; b=B
 pl+8/mvmx/d9H41W5bmLrst75fL++LE5CkX58W7XgDLth1Z1EOlbRTI2mBimzWlO
 uJEZh7Uz451UNFyxbRxDwNvJu8uumjWeQQ9wX43JQPTWSedHDhkxbwS74Hq3w/G9
 Z7vIc6HZAFuzpNSd8HdKE0LVCtmqx7hvgvA+Uv+As4b53p3ntoOH1LfNB6iY0jTW
 6VW0tlE0lzsHX1avexJ+GupOXLc9HivAMSNrgNwXfKjOUph3+cYeEDpPrmQTIlhe
 PW+Fjl5fwAcZsMHjvx/9wBnFCVnOkQtf578nVuYs2BZKP4q3fWdjBXdt1yuJyDAx
 EiAJ4LNkZmtDO6CRAr8Sg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=
 1741807389; x=1741893789; bh=cMD2+CcGGVJQx7lHpCSaD65e7IjBazmNbDx
 rnEbcFA0=; b=cyE/WdFZnYIbIpm/EhuOtqArCAp1abFpHRTH6a0VO1XerA9JJN7
 TMd0l5Cud0uJUP5YwLv73ZkMqGYwqsGo+98AU/3CVyOfg5cdoATtsnwEbD0G8Xzb
 E5EOS/++QJ2u7JCseXxZQhM7r2yYsI8IUjznscPLb3CXoQjswMeSDSWFh989Vu1s
 28ln0umYLaoBoljNmZ/d5n6JJTsawz5OtMaL4Gv16Iy3SbqMG0BmSHEdPOjInEtM
 w9bqZ0ydN38Z0OWcFIDRmR3vW9kSgBIWAj7fdPqVMAhz0rFe/4ZPwEC77EQUbU0P
 ng/hFDn8vqadrZh9qlY7d7yd4TbJpmifLLw==
X-ME-Sender: <xms:Hd_RZ0DeTzPQQ0dQzFzeYyfKzfIcYvWUjpaOllXGKWPIPJWkGCie8g>
 <xme:Hd_RZ2g9pUVCcmoLBKHNmY79KbyEerFrFzjEySaq8BZhzb6xQSpC8mM8Ft7PKiXZn
 GLi9EscI4yFizXEQEc>
X-ME-Received: <xmr:Hd_RZ3ntxt83JLoDoKqE3m6ds2NfKJtbmJLJwXY8E-mxiCGswSnSJMUwmalLfmIGTmjn>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduvdehledtucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih
 gvnhhtshculddquddttddmnecujfgurhephffvvefujghffffkfgggtgesmhdtreertder
 udenucfhrhhomhepufgvsggrshhtihojnhcuofhonhovrgcuoehsvggsrghsthhirghnse
 hsvggsrghsmhhonhhirgdrtghomheqnecuggftrfgrthhtvghrnheptedukeevfeehvedt
 tedtieeiieeltdevkeeivdekffetjeeuffejhfeitdeiveejnecuffhomhgrihhnpehgih
 hthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl
 fhhrohhmpehsvggsrghsthhirghnsehsvggsrghsmhhonhhirgdrtghomhdpnhgspghrtg
 hpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepjeeileekvdesuggv
 sggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehmohhrghgrnhesihgtvgelrdguih
 hgihhtrghl
X-ME-Proxy: <xmx:Hd_RZ6w-fR8dQYuBEIehZdyGKPhBq2c1VKpZNbfY0Go03hM3f1TcVQ>
 <xmx:Hd_RZ5T7dRncJ1qtOH2_-93I-rNndpv2Y_683GvdxDm7AImTxqzr9w>
 <xmx:Hd_RZ1aymZwBxiMNSX606TaZ0Cium3XBG6YU6oAI280P2J-pjnqr-w>
 <xmx:Hd_RZyTEjzHpiK_1QmuDO1iZvK4TgAV94WYJ7HF5D9jWyaJ0dKW8Jw>
 <xmx:Hd_RZ0dnpZR0Nj1hwsiZtl_wW7SEVEQpWVjnjQl8pOa5uFx8Lb6JrPUk>
Feedback-ID: iab2c46da:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 12 Mar 2025 15:23:09 -0400 (EDT)
From: =?iso-8859-1?Q?Sebasti=E1n_Mon=EDa?= <sebastian@HIDDEN>
To: Morgan Willcock <morgan@HIDDEN>
Subject: Re: bug#76982: 30.1; url-generic-parse-url cannot parse Windows
 file paths
In-Reply-To: <87msdq9lut.fsf@HIDDEN> (Morgan Willcock's message of "Wed, 
 12 Mar 2025 17:53:30 +0000")
References: <87msdq9lut.fsf@HIDDEN>
Date: Wed, 12 Mar 2025 15:23:08 -0400
Message-ID: <thqn8qpa9hpf.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 76982
Cc: 76982 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

Morgan Willcock <morgan@HIDDEN> writes:

>   (url-filename (url-generic-parse-url "file:///c:/windows"))
>   => "/c:/windows"
>
>   (url-filename (url-generic-parse-url "c:/windows"))
>   => "/windows"
>
> This is relevant in functions such as
> mml-expand-html-into-multipart-related, where there is a check that the
> file exists:
>
>   (when (and (null (url-type parsed))
>              (not (zerop (length (url-filename parsed))))
>              (file-exists-p (url-filename parsed)))
>     ...)
>
> An example of a real world problem is being unable to reliably send HTML
> mail when using Windows:
>
> https://github.com/jeremy-compostella/org-msg/issues/122

Attached a potential patch.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-url-parse.el-Parsing-exceptions-for-Windows-paths-bu.patch
Content-Description: url-parse for Windows paths

From 25c0cbeb1523e3fed3d3409465b6dcc99c967a38 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebasti=C3=A1n=20Mon=C3=ADa?=
 <sebastian.monia@HIDDEN>
Date: Wed, 12 Mar 2025 15:16:19 -0400
Subject: [PATCH] url-parse.el: Parsing exceptions for Windows paths
 (bug#76982)

---
 lisp/url/url-parse.el | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el
index 4c65721b83d..1dff66c6228 100644
--- a/lisp/url/url-parse.el
+++ b/lisp/url/url-parse.el
@@ -83,7 +83,12 @@ url-recreate-url
 	 ;; port is empty or if its value would be the same as that of
 	 ;; the scheme's default."
 	 (port (url-port-if-non-default urlobj))
-	 (file (url-filename urlobj))
+         ;; For Windows/DOS-like paths, `url-generic-parse-url' strips
+         ;; the leading /, so we need to add it back (bug#76982)
+	 (file (if (and (string= "file" type)
+                        (string-match "^[A-Za-z]:[/\\]" (url-filename urlobj)))
+                   (concat "/" (url-filename urlobj))
+                 (url-filename urlobj)))
 	 (frag (url-target urlobj)))
     (concat (if type (concat type ":"))
 	    (if (url-fullness urlobj) "//")
@@ -210,6 +215,13 @@ url-generic-parse-url
 
           (if (and host (string-match "%[0-9][0-9]" host))
               (setq host (url-unhex-string host)))
+
+          ;; For file:// URIs, if the path "looks like" Windows/DOS, it
+          ;; makes sense to strip the leading slash (bug#76982)
+          (when (and (string= "file" scheme)
+                     (string-match "^/[A-Za-z]:[/\\]" file))
+            (setq file (substring file 1)))
+
           (url-parse-make-urlobj scheme user pass host port file
 				 fragment nil full))))))
 
-- 
2.45.2.windows.1


--=-=-=
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable



--=20
Sebasti=E1n Mon=EDa
https://site.sebasmonia.com/

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76982; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Mar 2025 17:53:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 12 13:53:57 2025
Received: from localhost ([127.0.0.1]:51597 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tsQHD-0003b4-JX
	for submit <at> debbugs.gnu.org; Wed, 12 Mar 2025 13:53:56 -0400
Received: from lists.gnu.org ([2001:470:142::17]:43350)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <morgan@HIDDEN>)
 id 1tsQHA-0003al-IP
 for submit <at> debbugs.gnu.org; Wed, 12 Mar 2025 13:53:53 -0400
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 <morgan@HIDDEN>)
 id 1tsQH4-0000gh-Om
 for bug-gnu-emacs@HIDDEN; Wed, 12 Mar 2025 13:53:47 -0400
Received: from relay3-d.mail.gandi.net ([2001:4b98:dc4:8::223])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <morgan@HIDDEN>)
 id 1tsQH0-0007BZ-FA
 for bug-gnu-emacs@HIDDEN; Wed, 12 Mar 2025 13:53:46 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id A379820457
 for <bug-gnu-emacs@HIDDEN>; Wed, 12 Mar 2025 17:53:36 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ice9.digital;
 s=gm1; t=1741802018;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type;
 bh=lMF5PJXjaa68mqKWJt2FZNn/P5Um0R9Hfaj9QEEFEIU=;
 b=GMdb3AmnZmKLiH/lL2sL9SIGpab6+PDFWpPXGYZk1vck5W8Qb2ZCQtBDtncXvrV55yi0W9
 t2RGqBcTyv6oXYcU4aXGBb1C7FMveYdbi1rlNheEN5OpDwi1pXkdIVc0mIrAEBW3fXk3ZJ
 9zSvyssh0Ys7Ag/E/r6y0gLONWPQ8bpFSGxabOutP7tLHusl/Vp/vtcTUHPfam/3uPSBtn
 0ck4M1jvCOUaD2TzcciqPEOwTL4LursEt8PQ7dPQHFmmUPOakPU7NhZIADZYBA7gg3JFrM
 Ixwg8tKVj2mGTFCJyAgR9w1xEEcf6yMvTNgPTz1z6emg8dK4BjQkg0bpcT+V+Q==
From: Morgan Willcock <morgan@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.1; url-generic-parse-url cannot parse Windows file paths
X-Debbugs-Cc: 
Date: Wed, 12 Mar 2025 17:53:30 +0000
Message-ID: <87msdq9lut.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-GND-State: clean
X-GND-Score: 0
X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduvdehjedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecunecujfgurhephffvufffkfggtgesthdtredttddttdenucfhrhhomhepofhorhhgrghnucghihhllhgtohgtkhcuoehmohhrghgrnhesihgtvgelrdguihhgihhtrghlqeenucggtffrrghtthgvrhhnpeevffffkeefteekkeejvdfftdelvdfhudekfeffueffuddttdeugeejgfeukeeuueenucffohhmrghinhepghhithhhuhgsrdgtohhmnecukfhppeektddrgeegrddvfedtrdekvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeektddrgeegrddvfedtrdekvddphhgvlhhopehmrggtmhhinhhirdhnohhtlhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmohhrghgrnhesihgtvgelrdguihhgihhtrghlpdhnsggprhgtphhtthhopedupdhrtghpthhtohepsghughdqghhnuhdqvghmrggtshesghhnuhdrohhrgh
X-GND-Sasl: morgan@HIDDEN
Received-SPF: pass client-ip=2001:4b98:dc4:8::223;
 envelope-from=morgan@HIDDEN; helo=relay3-d.mail.gandi.net
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,
 RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)



  (url-filename (url-generic-parse-url "file:///c:/windows"))
  => "/c:/windows"

  (url-filename (url-generic-parse-url "c:/windows"))
  => "/windows"

This is relevant in functions such as
mml-expand-html-into-multipart-related, where there is a check that the
file exists:

  (when (and (null (url-type parsed))
             (not (zerop (length (url-filename parsed))))
             (file-exists-p (url-filename parsed)))
    ...)

An example of a real world problem is being unable to reliably send HTML
mail when using Windows:

https://github.com/jeremy-compostella/org-msg/issues/122



In GNU Emacs 30.1 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.18.2, Xaw scroll bars) of 2025-03-02 built on macmini
Windowing system distributor 'The X.Org Foundation', version 11.0.12101016
System Description: Debian GNU/Linux trixie/sid

Configured using:
 'configure --with-native-compilation --with-xml2 --with-x-toolkit=lucid
 --with-tree-sitter --disable-gc-mark-trace'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER
PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP X11 XDBE XIM XPM LUCID ZLIB

Important settings:
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  which-key-mode: t
  global-visual-wrap-prefix-mode: t
  display-time-mode: t
  savehist-mode: t
  repeat-mode: t
  recentf-mode: t
  minibuffer-electric-default-mode: t
  minibuffer-depth-indicate-mode: t
  midnight-mode: t
  ido-everywhere: t
  global-hl-line-mode: t
  editorconfig-mode: t
  global-display-fill-column-indicator-mode: t
  global-devil-mode: t
  devil-mode: t
  global-corfu-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-history-mode: t
  tab-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  view-mode: t

Load-path shadows:
/home/mwillcock/.emacs.d/elpa/modus-themes-4.6.0/theme-loaddefs hides /usr/local/share/emacs/30.1/lisp/theme-loaddefs
/home/mwillcock/.emacs.d/elpa/python-0.30/python hides /usr/local/share/emacs/30.1/lisp/progmodes/python
/home/mwillcock/.emacs.d/elpa/eglot-1.18/eglot hides /usr/local/share/emacs/30.1/lisp/progmodes/eglot
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-css hides /usr/local/share/emacs/30.1/lisp/org/ob-css
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-version hides /usr/local/share/emacs/30.1/lisp/org/org-version
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-table hides /usr/local/share/emacs/30.1/lisp/org/ob-table
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-mobile hides /usr/local/share/emacs/30.1/lisp/org/org-mobile
/home/mwillcock/.emacs.d/elpa/org-9.7.25/oc-basic hides /usr/local/share/emacs/30.1/lisp/org/oc-basic
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-lint hides /usr/local/share/emacs/30.1/lisp/org/org-lint
/home/mwillcock/.emacs.d/elpa/org-9.7.25/oc-csl hides /usr/local/share/emacs/30.1/lisp/org/oc-csl
/home/mwillcock/.emacs.d/elpa/org-9.7.25/oc-bibtex hides /usr/local/share/emacs/30.1/lisp/org/oc-bibtex
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-macs hides /usr/local/share/emacs/30.1/lisp/org/org-macs
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-protocol hides /usr/local/share/emacs/30.1/lisp/org/org-protocol
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-forth hides /usr/local/share/emacs/30.1/lisp/org/ob-forth
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-ditaa hides /usr/local/share/emacs/30.1/lisp/org/ob-ditaa
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-compat hides /usr/local/share/emacs/30.1/lisp/org/org-compat
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ox hides /usr/local/share/emacs/30.1/lisp/org/ox
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ol-rmail hides /usr/local/share/emacs/30.1/lisp/org/ol-rmail
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-core hides /usr/local/share/emacs/30.1/lisp/org/ob-core
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-latex hides /usr/local/share/emacs/30.1/lisp/org/ob-latex
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-mouse hides /usr/local/share/emacs/30.1/lisp/org/org-mouse
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ox-md hides /usr/local/share/emacs/30.1/lisp/org/ox-md
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-sql hides /usr/local/share/emacs/30.1/lisp/org/ob-sql
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-org hides /usr/local/share/emacs/30.1/lisp/org/ob-org
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-table hides /usr/local/share/emacs/30.1/lisp/org/org-table
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-ocaml hides /usr/local/share/emacs/30.1/lisp/org/ob-ocaml
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-clock hides /usr/local/share/emacs/30.1/lisp/org/org-clock
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-feed hides /usr/local/share/emacs/30.1/lisp/org/org-feed
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-refile hides /usr/local/share/emacs/30.1/lisp/org/org-refile
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ox-ascii hides /usr/local/share/emacs/30.1/lisp/org/ox-ascii
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ox-icalendar hides /usr/local/share/emacs/30.1/lisp/org/ox-icalendar
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-C hides /usr/local/share/emacs/30.1/lisp/org/ob-C
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-gnuplot hides /usr/local/share/emacs/30.1/lisp/org/ob-gnuplot
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-src hides /usr/local/share/emacs/30.1/lisp/org/org-src
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-clojure hides /usr/local/share/emacs/30.1/lisp/org/ob-clojure
/home/mwillcock/.emacs.d/elpa/org-9.7.25/oc hides /usr/local/share/emacs/30.1/lisp/org/oc
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ol hides /usr/local/share/emacs/30.1/lisp/org/ol
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-ctags hides /usr/local/share/emacs/30.1/lisp/org/org-ctags
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-perl hides /usr/local/share/emacs/30.1/lisp/org/ob-perl
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-processing hides /usr/local/share/emacs/30.1/lisp/org/ob-processing
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ol-bbdb hides /usr/local/share/emacs/30.1/lisp/org/ol-bbdb
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-eval hides /usr/local/share/emacs/30.1/lisp/org/ob-eval
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ox-odt hides /usr/local/share/emacs/30.1/lisp/org/ox-odt
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ol-bibtex hides /usr/local/share/emacs/30.1/lisp/org/ol-bibtex
/home/mwillcock/.emacs.d/elpa/org-9.7.25/oc-biblatex hides /usr/local/share/emacs/30.1/lisp/org/oc-biblatex
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-timer hides /usr/local/share/emacs/30.1/lisp/org/org-timer
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-attach hides /usr/local/share/emacs/30.1/lisp/org/org-attach
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org hides /usr/local/share/emacs/30.1/lisp/org/org
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-fold hides /usr/local/share/emacs/30.1/lisp/org/org-fold
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-comint hides /usr/local/share/emacs/30.1/lisp/org/ob-comint
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-pcomplete hides /usr/local/share/emacs/30.1/lisp/org/org-pcomplete
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-keys hides /usr/local/share/emacs/30.1/lisp/org/org-keys
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ox-latex hides /usr/local/share/emacs/30.1/lisp/org/ox-latex
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-ruby hides /usr/local/share/emacs/30.1/lisp/org/ob-ruby
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-capture hides /usr/local/share/emacs/30.1/lisp/org/org-capture
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ol-gnus hides /usr/local/share/emacs/30.1/lisp/org/ol-gnus
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-eshell hides /usr/local/share/emacs/30.1/lisp/org/ob-eshell
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-tempo hides /usr/local/share/emacs/30.1/lisp/org/org-tempo
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-element-ast hides /usr/local/share/emacs/30.1/lisp/org/org-element-ast
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ol-man hides /usr/local/share/emacs/30.1/lisp/org/ol-man
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-js hides /usr/local/share/emacs/30.1/lisp/org/ob-js
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-plot hides /usr/local/share/emacs/30.1/lisp/org/org-plot
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-attach-git hides /usr/local/share/emacs/30.1/lisp/org/org-attach-git
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-lua hides /usr/local/share/emacs/30.1/lisp/org/ob-lua
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ol-eww hides /usr/local/share/emacs/30.1/lisp/org/ol-eww
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-fortran hides /usr/local/share/emacs/30.1/lisp/org/ob-fortran
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-screen hides /usr/local/share/emacs/30.1/lisp/org/ob-screen
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-footnote hides /usr/local/share/emacs/30.1/lisp/org/org-footnote
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-loaddefs hides /usr/local/share/emacs/30.1/lisp/org/org-loaddefs
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-julia hides /usr/local/share/emacs/30.1/lisp/org/ob-julia
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-awk hides /usr/local/share/emacs/30.1/lisp/org/ob-awk
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-dot hides /usr/local/share/emacs/30.1/lisp/org/ob-dot
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-emacs-lisp hides /usr/local/share/emacs/30.1/lisp/org/ob-emacs-lisp
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ol-doi hides /usr/local/share/emacs/30.1/lisp/org/ol-doi
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-faces hides /usr/local/share/emacs/30.1/lisp/org/org-faces
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-macro hides /usr/local/share/emacs/30.1/lisp/org/org-macro
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-fold-core hides /usr/local/share/emacs/30.1/lisp/org/org-fold-core
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-sed hides /usr/local/share/emacs/30.1/lisp/org/ob-sed
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ox-koma-letter hides /usr/local/share/emacs/30.1/lisp/org/ox-koma-letter
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-entities hides /usr/local/share/emacs/30.1/lisp/org/org-entities
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-sass hides /usr/local/share/emacs/30.1/lisp/org/ob-sass
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-datetree hides /usr/local/share/emacs/30.1/lisp/org/org-datetree
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-haskell hides /usr/local/share/emacs/30.1/lisp/org/ob-haskell
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ox-man hides /usr/local/share/emacs/30.1/lisp/org/ox-man
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-element hides /usr/local/share/emacs/30.1/lisp/org/org-element
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-lob hides /usr/local/share/emacs/30.1/lisp/org/ob-lob
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-id hides /usr/local/share/emacs/30.1/lisp/org/org-id
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-python hides /usr/local/share/emacs/30.1/lisp/org/ob-python
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-tangle hides /usr/local/share/emacs/30.1/lisp/org/ob-tangle
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-java hides /usr/local/share/emacs/30.1/lisp/org/ob-java
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-crypt hides /usr/local/share/emacs/30.1/lisp/org/org-crypt
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-cycle hides /usr/local/share/emacs/30.1/lisp/org/org-cycle
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-lisp hides /usr/local/share/emacs/30.1/lisp/org/ob-lisp
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-makefile hides /usr/local/share/emacs/30.1/lisp/org/ob-makefile
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-persist hides /usr/local/share/emacs/30.1/lisp/org/org-persist
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob hides /usr/local/share/emacs/30.1/lisp/org/ob
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-shell hides /usr/local/share/emacs/30.1/lisp/org/ob-shell
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-indent hides /usr/local/share/emacs/30.1/lisp/org/org-indent
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-colview hides /usr/local/share/emacs/30.1/lisp/org/org-colview
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-habit hides /usr/local/share/emacs/30.1/lisp/org/org-habit
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ol-irc hides /usr/local/share/emacs/30.1/lisp/org/ol-irc
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ox-texinfo hides /usr/local/share/emacs/30.1/lisp/org/ox-texinfo
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-ref hides /usr/local/share/emacs/30.1/lisp/org/ob-ref
/home/mwillcock/.emacs.d/elpa/org-9.7.25/oc-natbib hides /usr/local/share/emacs/30.1/lisp/org/oc-natbib
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ox-beamer hides /usr/local/share/emacs/30.1/lisp/org/ox-beamer
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ol-w3m hides /usr/local/share/emacs/30.1/lisp/org/ol-w3m
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-agenda hides /usr/local/share/emacs/30.1/lisp/org/org-agenda
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-duration hides /usr/local/share/emacs/30.1/lisp/org/org-duration
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-octave hides /usr/local/share/emacs/30.1/lisp/org/ob-octave
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-matlab hides /usr/local/share/emacs/30.1/lisp/org/ob-matlab
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ox-org hides /usr/local/share/emacs/30.1/lisp/org/ox-org
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-goto hides /usr/local/share/emacs/30.1/lisp/org/org-goto
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-plantuml hides /usr/local/share/emacs/30.1/lisp/org/ob-plantuml
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ol-eshell hides /usr/local/share/emacs/30.1/lisp/org/ol-eshell
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-maxima hides /usr/local/share/emacs/30.1/lisp/org/ob-maxima
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-inlinetask hides /usr/local/share/emacs/30.1/lisp/org/org-inlinetask
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ox-publish hides /usr/local/share/emacs/30.1/lisp/org/ox-publish
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-num hides /usr/local/share/emacs/30.1/lisp/org/org-num
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-R hides /usr/local/share/emacs/30.1/lisp/org/ob-R
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-lilypond hides /usr/local/share/emacs/30.1/lisp/org/ob-lilypond
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-archive hides /usr/local/share/emacs/30.1/lisp/org/org-archive
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ol-info hides /usr/local/share/emacs/30.1/lisp/org/ol-info
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-sqlite hides /usr/local/share/emacs/30.1/lisp/org/ob-sqlite
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ol-docview hides /usr/local/share/emacs/30.1/lisp/org/ol-docview
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ox-html hides /usr/local/share/emacs/30.1/lisp/org/ox-html
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ol-mhe hides /usr/local/share/emacs/30.1/lisp/org/ol-mhe
/home/mwillcock/.emacs.d/elpa/org-9.7.25/org-list hides /usr/local/share/emacs/30.1/lisp/org/org-list
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-groovy hides /usr/local/share/emacs/30.1/lisp/org/ob-groovy
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-exp hides /usr/local/share/emacs/30.1/lisp/org/ob-exp
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-calc hides /usr/local/share/emacs/30.1/lisp/org/ob-calc
/home/mwillcock/.emacs.d/elpa/org-9.7.25/ob-scheme hides /usr/local/share/emacs/30.1/lisp/org/ob-scheme

Features:
(shadow sort ecomplete mail-extr gnus-msg gnus-art mm-uu mml2015 mm-view
mml-smime smime gnutls dig gnus-sum shr pixel-fill kinsoku url-file svg
dom gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap
nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range gnus-win gnus
nnheader range emacsbug switchmail message yank-media puny dired
dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils view compile text-property-search comp-run
comp-common flyspell ispell goto-addr thingatpt init which-key
visual-wrap time vc-git diff-mode track-changes vc-dispatcher shadowfile
savehist repeat tramp-cache time-stamp tramp-sh tramp rx trampver
tramp-integration files-x tramp-message tramp-compat xdg shell pcomplete
comint ansi-osc ring parse-time iso8601 time-date format-spec ansi-color
tramp-loaddefs recentf tree-widget wid-edit minibuf-eldef mb-depth
midnight ido hl-line editorconfig editorconfig-core
editorconfig-core-handle editorconfig-fnmatch
display-fill-column-indicator devil use-package-diminish corfu compat
modus-vivendi-theme modus-themes find-func edmacro kmacro pcase
use-package-bind-key bind-key easy-mmode diminish cl-extra help-mode
use-package-core ags-mode-autoloads corfu-autoloads devil-autoloads
diminish-autoloads eglot-autoloads flymake-ansible-lint-autoloads
indent-bars-autoloads inform-mode-autoloads jabber-autoloads
fsm-autoloads kixtart-mode-autoloads lua-mode-autoloads
markdown-mode-autoloads modus-themes-autoloads org-autoloads
org-msg-autoloads htmlize-autoloads package-lint-autoloads
php-mode-autoloads plantuml-mode-autoloads dash-autoloads
powershell-autoloads python-autoloads rainbow-mode-autoloads
renpy-autoloads info sly-autoloads srv-autoloads switchmail-autoloads
wgrep-autoloads yaml-mode-autoloads package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs icons password-cache json
subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib
rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt
fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode
register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo x-toolkit x multi-tty move-toolbar
make-network-process native-compile emacs)

Memory information:
((conses 16 301090 19511) (symbols 48 21713 3) (strings 32 67160 3458)
 (string-bytes 1 2109121) (vectors 16 30052)
 (vector-slots 8 377356 10921) (floats 8 353 1) (intervals 56 942 193)
 (buffers 992 15))




Acknowledgement sent to Morgan Willcock <morgan@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#76982; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 8 Apr 2025 22:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.