Browse target page on github/bitbucket from emacs buffers
.. image:: http://melpa.org/packages/browse-at-remote-badge.svg :target: http://melpa.org/#/browse-at-remote
This package is easiest way to open particular link on github/gitlab/bitbucket/stash/git.savannah.gnu.org/sourcehut from Emacs. It supports various kind of emacs buffer, like:
C-x v gby default)
Add
browse-at-remoteto your Cask file:::
(depends-on "browse-at-remote")
Manual
Simply add this package to your emacs path, and add to
.emacs,::
(require 'browse-at-remote)
Active keybindings for
browse-at-remotefunction:::
(global-set-key (kbd "C-c g g") 'browse-at-remote)
GNU Guix
Run
guix package -i emacs-browse-at-remotethen load
browse-at-remotefrom your Emacs init.
Remote types
By default
browse-at-remoteknows how to work with popular remote types (github/gitlab..). Knowledge how to work with certain remote-type comes from mapping
browse-at-remote-remote-type-domains. It defines that
github.comshould be treat in github manner,
bitbucket.orgin bitbucket manner and so on. In your development you may have some specific git-url, and
browse-at-remotewill before confuse which remote-type map to your domain.
Two solution available:
M-x customize ... browse-at-remote-remote-type-domains). For now our package supports next remote-types:
Set specific remote-type directly in git repo. For example, if your repository is hosted on GitHub enterprise, you should add following setting to its config::
git config --add browseAtRemote.type "github"
or for private Stash repository use command::
git config --add browseAtRemote.type "stash"
Excluding line number if no region is selected
By default
browse-at-remoteadd line number when region is not selected in file attached buffer. If you don't like that and what to see no line information URL, it's possible to disable that by adding:::
(setq browse-at-remote-add-line-number-if-no-region-selected nil)
Or setting via UI with
M-x customize.
You can your own remote if you need - PRs are welcome! Please see good examples here: gnu-savannah-remote, or stash-remote.
Call function from emacs buffer::
M-x browse-at-remote
or::
M-x bar-browse
.. image:: http://i.imgur.com/rmAky8e.png
or just call
C-c g gif you've already added binding before. You can use this command in dired buffers too.
.. image:: http://i.imgur.com/wBW9Gov.png alt: screenshot of page at github
or same here is folder view at bitbucket:
.. image:: http://i.imgur.com/XuzLhcR.png alt: screenshot page tree at bibucket
.. image:: http://i.imgur.com/NzlIHYr.png alt: screenshot of magit-log-mode
.. image:: http://i.imgur.com/lpmOAz2.png alt: screen of vc-annotate-mode
C-x v gto call standard vc-annotate
browse-at-remoteon target line
@rmuslimov_
@env0der_
@ben_
@duff_
@Wilfred_
@yauhen-l_
@ieure_
@wigust_
@CyberShadow_
@kuba-orlik_
@jwhitbeck_
@microamp_
@FrostyX_
0.14.0
New remote type added Pagure by
@FrostyX_. New configuration option
browse-at-remote-add-line-number-if-no-region-selectedallowing add or not line number when target page open and region initially is not selected.
0.13.0
New remote type added Sourcehut by
@microamp_.
0.12.0
New remote type added Phabricator by
@kuba-orlik_.
0.11.0
New remote type added gist.github.com by
@CyberShadow_.
0.10.0
New remote type added git.savannah.gnu.org by
@wigust_.
0.9.0
Minor fixes, added Stash (bitbucket support) by
@yauhen-l_.
0.8.0
Drop clojure-style function namings. Add abbrev methods like
bar-browseand
bar-to-clipoboard(where
baris browse-at-remote abbrev.)
0.7.0
Major refactorings by
@ieure_. Main function renamed to
browse-at-remote/browse. (renamed in 0.8.0 to
bar-browse)
0.6.0
Added support of Gitlab by
@env0der_. Thanks!
0.5.0
Added support of Github Enterprice. Special thanks for
@env0der_ for this feature.
0.4.0
Function
browse-at-remote/to-clipboardwere added (renamed in 0.8.0 to
bar-to-clibpoard)
.. _
@rmuslimov: https://github.com/rmuslimov .. _
@env0der: https://github.com/env0der .. _
@Wilfred: https://github.com/Wilfred .. _
@ben: https://github.com/ben .. _
@duff: https://github.com/duff .. _
@ieure: https://github.com/ieure .. _
@yauhen-l: https://github.com/yauhen-l .. _
@wigust: https://github.com/wigust .. _
@CyberShadow: https://github.com/CyberShadow .. _
@kuba-orlik: https://github.com/kuba-orlik .. _
@jwhitbeck: https://github.com/jwhitbeck .. _
@microamp: https://github.com/microamp .. _
@FrostyX: https://github.com/FrostyX .. _stash-remote: https://github.com/rmuslimov/browse-at-remote/pull/34/files .. _gnu-savannah-remote: https://github.com/rmuslimov/browse-at-remote/pull/46/files