rmuslimov / browse-at-remote

Browse target page on github/bitbucket from emacs buffers
232 stars 53 forks source link

Can't browse custom domain even with set browse-at-remote-remote-type-domains #82

Closed cpaulik closed 1 year ago

cpaulik commented 3 years ago

Seems similar to https://github.com/rmuslimov/browse-at-remote/issues/79

I get the error

browse-at-remote--get-remote-type: Sorry, not sure what to do with domain ‘gitlab.vandersat.com’ (consider adding it to ‘browse-at-remote-remote-type-domains’)

In my case I'm trying to browse at our custom gitlab.vandersat.com domain.

browse-at-remote-remote-type-domains is set to:

browse-at-remote-remote-type-domains’s value is
(("bitbucket.org" . "bitbucket")
 ("github.com" . "github")
 ("gitlab.com" . "gitlab")
 ("git.savannah.gnu.org" . "gnu")
 ("gist.github.com" . "gist")
 ("git.sr.ht" . "sourcehut")
 ("gitlab.vandersat.com" . "gitlab"))

Looking at this function with my limited lisp knowledge it seems that browse-at-remote-remote-type-domains is no longer used?

I've got version 20210528.1935

rmuslimov commented 3 years ago

Hi Christoph! You're right, we break your setup with previous update. Can you please update, your settings and add your to other defcustom browse-at-remote-remote-type-regexps which is used instead of browse-at-remote-remote-type-domains.

Should be something like:

    ("^gitlab\\vandersat\\.com$" . "gitlab")

We moved from hardcoded names of plain string describing domain, to regexp doing the same.

Sorry for inconvenience.

cpaulik commented 3 years ago

Thanks.

Would it be an idea to have a more lenient regex by default?

I can imagine quite a few companies having gitlab.company-name.com as their private gitlab URL

willxie commented 3 years ago

I concur. Even .com is not guaranteed depending on the org and domain. Maybe the following is sufficient?

("^github\\.*" . "github")
# Or
("^github\\.*\\.*" . "github")
cpaulik commented 1 year ago

Closing this.