9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Philip Silva <philip.silva@protonmail.com>
To: "9front@9front.org" <9front@9front.org>
Subject: [9front] [Patch] acme open filenames with at
Date: Mon, 22 Feb 2021 19:37:37 +0000	[thread overview]
Message-ID: <cl-jVnm8iFr764Z07D5pOIH80pFa4Qv4SRYZdbt2N_l9lvBxJOmGpX7IMPDx9MIVDRLvPO3gZEzkpTPdzRqufOs0TSkj0G8ekJgrCYgMLNs=@protonmail.com> (raw)

Hi!

I've seen in plan9port there's a commit allowing @s in filenames:

commit ac487c754e009b0f3c01c2a8ad5bda2143da4a6b
Author: Russ Cox <rsc@swtch.com>
Date:   Wed Dec 30 14:42:47 2020 -0500

    acme: allow @ in file names

    For upspin and other tools that put email addresses in names.

diff --git a/src/cmd/acme/look.c b/src/cmd/acme/look.c
index 35667c6c..a7172b50 100644
--- a/src/cmd/acme/look.c
+++ b/src/cmd/acme/look.c
@@ -378,7 +378,7 @@ search(Text *ct, Rune *r, uint n)
 int
 isfilec(Rune r)
 {
-       static Rune Lx[] = { '.', '-', '+', '/', ':', 0 };
+       static Rune Lx[] = { '.', '-', '+', '/', ':', '@', 0 };
        if(isalnum(r))
                return TRUE;
        if(runestrchr(Lx, r))

In the Go module paths this is used in path names actually to delimit the version. Here's a patch for this, would be great if it could get merged!

diff -r 318117d314ad sys/src/cmd/acme/look.c
--- a/sys/src/cmd/acme/look.c   Mon Feb 22 19:27:49 2021 +0100
+++ b/sys/src/cmd/acme/look.c   Mon Feb 22 20:23:07 2021 +0100
@@ -314,7 +314,7 @@ isfilec(Rune r)
 {
        if(isalnum(r))
                return TRUE;
-       if(runestrchr(L".-+/:", r))
+       if(runestrchr(L".-+/:@", r))
                return TRUE;
        return FALSE;
 }


Greetings, Philip

             reply	other threads:[~2021-02-22 22:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22 19:37 Philip Silva [this message]
2021-03-02 21:09 ` [9front] " Philip Silva

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='cl-jVnm8iFr764Z07D5pOIH80pFa4Qv4SRYZdbt2N_l9lvBxJOmGpX7IMPDx9MIVDRLvPO3gZEzkpTPdzRqufOs0TSkj0G8ekJgrCYgMLNs=@protonmail.com' \
    --to=philip.silva@protonmail.com \
    --cc=9front@9front.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).