all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: <tomas@tuxteam.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Is there something like `file-name-concat', but for urls?
Date: Tue, 25 Jul 2023 19:24:54 +0200	[thread overview]
Message-ID: <ZMAFZtzf+IZJCAwG@tuxteam.de> (raw)
In-Reply-To: <877cqoynaa.fsf@dataswamp.org>

[-- Attachment #1: Type: text/plain, Size: 1507 bytes --]

On Tue, Jul 25, 2023 at 06:21:49PM +0200, Emanuel Berg wrote:
> Marcin Borkowski wrote:
> 
> > given e.g. "https", "example.com" (or "example.com/") and
> > "page", I want to get "https://example.com/page". Is there
> > a built-in Elisp function to do that?
> 
> Do it yourself Marcin :) Even more so because you already did
> something like that, with the filename normalizer, I remember!
> 
> If so, you can use the correct URL terminology, which is
> 
> 1. scheme:
> 2. //server
> 3. [:port]
> 4. [/path]
> 5. [/program?q=argument]
> 6. [#fragment]
> 
> See this page,
> 
>   https://dataswamp.org/~incal/distsys/url.html
> 
> BTW thanks for letting me realize I should modernize that, it
> is so old https isn't even included :$

Plus URL encoding. Plus deciding in fringe cases whether encoding
is in order or not (and perhaps avoiding those cases where it would
be in order but there are botched implementations around so better
don't (ISTR there was a security hole where the reverse proxy
charged with securing access had a different idea than the server
behind it). So RFC 3986 plus perhaps RFC 8820 plus a couple plus
"Real Life" (TM).

I mean: it sure is fun, and I've caught myself doing this too, but
some working library with the most egregious botches already fixed
and where new fixes can go to seems to be a good idea, in general :)

That doesn't mean one shouldn't try: you sure understand better
how that lib works once you have.

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2023-07-25 17:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-24  5:14 Is there something like `file-name-concat', but for urls? Marcin Borkowski
2023-07-24 11:58 ` Eli Zaretskii
2023-07-24 15:26   ` Marcin Borkowski
2023-07-25 16:21 ` Emanuel Berg
2023-07-25 17:24   ` tomas [this message]
2023-07-25 18:33     ` Emanuel Berg
2023-07-26  4:34       ` tomas
2023-07-26 12:13         ` Emanuel Berg
2023-07-25 19:00     ` Marcin Borkowski
2023-07-25 19:07       ` Emanuel Berg
2023-07-25 19:38         ` Emanuel Berg
2023-07-25 17:35   ` Yuri Khan
2023-07-25 18:23     ` Emanuel Berg
2023-07-25 20:01       ` Yuri Khan
2023-07-25 21:51         ` Emanuel Berg
2023-07-26 12:44         ` Emanuel Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZMAFZtzf+IZJCAwG@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.