This package is easiest way to open particular link on github/gitlab/bitbucket from Emacs. It supports various kind of emacs buffer, like:
- file buffer
- dired buffer
- magit-mode buffers represinting code
- vc-annotate mode (use get there by pressing
C-x v g
by default)
Add browse-at-remote
to your Cask file::
(depends-on "browse-at-remote")
Simply add this package to your emacs path, and add to .emacs
,:
(require 'browse-at-remote)
Active keybindings for browse-at-remote
function::
(global-set-key (kbd "C-c g g") 'browse-at-remote/browse)
If your repository is hosted on GitHub enterprise, you should add following setting to its config::
git config --add browseAtRemote.type "github"
Call function from emacs buffer:
M-x browse-at-remote/browse
or just call
C-c g g
if you've already added binding before. You can use this command in dired buffers too.Target page at github/bitbucket will be opened using your default browser:
or same here is folder view at bitbucket:
Opening github commit's page at magit-commit-mode, magit-log-mode:
Open last commit which added target line:
- Press C-x v g to call standard vc-annotate
- Call browse-at-remote on target line
Major refactorings by @ieure. Main function renamed to browse-at-remote/browse.
- Added support of Gitlab by @env0der. Thanks!
- Added support of Github Enterprice. Special thanks for @env0der for this feature.
- Function browse-at-remote/to-clipboard were added
- Add mercurial support