sshaw / git-link

Emacs package to get the GitHub/Bitbucket/GitLab/... URL for a buffer location
394 stars 73 forks source link

Feature request: git-link-open-homepage #124

Closed psibi closed 3 months ago

psibi commented 3 months ago

I have a use case, where sometimes I would want to open the repository's homepage in browser.

Currently, we have this variable git-link-open-in-browser, but that will always make it open via the browser.

I can also probably implement this if there are no objections, once I find some spare time. Would you be open to supporting a separate interactive function for this ?

sshaw commented 3 months ago

So you want to call git-link-homepage and sometimes you want it to copy and other times you want it to copy and open the page in the browser?

sshaw commented 3 months ago

So you want to call git-link-homepage and sometimes you want it to copy and other times you want it to copy and open the page in the browser?

What determines when you want it to open vs just copy the URL?

psibi commented 3 months ago

So you want to call git-link-homepage and sometimes you want it to copy and other times you want it to copy and open the page in the browser?

Yes

What determines when you want it to open vs just copy the URL?

When someone is asking me to send a repository link (which seems to happening more recently these days), I send them the copy of the URL. When I want to visit the homepage because I want to probably browse some issues - I will use the git-link-open-homepage.

sshaw commented 3 months ago

What about adding a prefix argument to git-link-homepage to force an open? 🔗

psibi commented 3 months ago

Yeah, agree. That would be more idiomatic.

psibi commented 3 months ago

This seems to be working fine for my usecase: https://github.com/sshaw/git-link/pull/125