forge
forge copied to clipboard
Easily browse or kill permalink to file with line number
I often find myself wanting to send a GitHub permalink URL to someone. Often I want to point out a particular line or range of lines in a particular file at a particular revision, and to do this I have to go to GitHub, find the file (cumbersome), maybe find the exact commit (also cumbersome), select the range of lines, and choose "Copy Permalink" from the little menu thing.
It seems to me that Magit+Forge together should have enough information to generate the permalink from within Emacs. I am imagining something like forge-browse-dwim
or forge-copy-url-at-point-as-kill
being invocable on any line of a git-managed buffer. When a range is present the link would point to the full range of lines, like:
https://github.com/magit/forge/blob/551e51511e25505d14e05699a1707fd57e394a9a/Makefile#L8-L20
I use git-link for that purposes.
Thanks! I'll check that out.
If this functionality is better left to other packages like git-link then feel free to close this ticket.
Closing in favor of #91.