Coder Social home page Coder Social logo

browse-at-remote's Introduction

image

image

browse-at-remote.el

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:

  • file buffer
  • dired buffer
  • magit-mode buffers representing code
  • vc-annotate mode (use get there by pressing C-x v g by default)

Installation:

Add browse-at-remote to 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-remote function::

(global-set-key (kbd "C-c g g") 'browse-at-remote)

GNU Guix

Run guix install emacs-browse-at-remote then load browse-at-remote from your Emacs init.

Customization

Remote types

By default browse-at-remote knows 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.com should be treat in github manner, bitbucket.org in bitbucket manner and so on. In your development you may have some specific git-url, and browse-at-remote will before confuse which remote-type map to your domain.

Two solution available:

  1. In that case you can to customize that. (M-x customize ... browse-at-remote-remote-type-domains). For now our package supports next remote-types:
    • bitbucket.com
    • gitlab.com
    • github.com
    • Stash
    • git.savannah.gnu.org
    • gist.github.com
    • Phabricator
    • git.sr.ht
    • pagure.io
    • vs-ssh.visualstudio.com
  2. 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-remote add 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.

Customize how the host is resolved

There are cases where you might need to resolve a remote host to a particular value. For example, one common strategy to manage multiple SSH keys is to add an entry to `~/.ssh.config`:

Host mycompany.github.com
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_rsa_mycompany

For such cases, you can use the :actual-host property:

(add-to-list 'browse-at-remote-remote-type-regexps
             `(:host ,(rx bol "mycompany.github.com" eol)
               :type "github"
               :actual-host "github.com"))

You can also directly configure the repository:

git config --add browseAtRemote.actualHost "github.com"

Adding new remote type

You can add your own remote if you need - PRs are welcome! Please see good examples here: gnu-savannah-remote, or stash-remote.

Usage:

  1. Call function from emacs buffer:

    M-x browse-at-remote

    or:

    M-x bar-browse

    image

    or just call C-c g g if you've already added binding before. You can use this command in dired buffers too.

  2. Target page at github/bitbucket will be opened using your default browser:

    or same here is folder view at bitbucket:

  3. Opening github commit's page at magit-commit-mode, magit-log-mode:

  4. Open last commit which added target line:

    • Press C-x v g to call standard vc-annotate
    • Call browse-at-remote on target line

Contributors:

Changelog: --------

0.15.0

Added new feature allowing customize how hosts are resolved by @ilmotta.

0.14.0

New remote type added Pagure by @FrostyX. New configuration option browse-at-remote-add-line-number-if-no-region-selected allowing 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-browse and bar-to-clipoboard (where bar is 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-clipboard were added (renamed in 0.8.0 to bar-to-clibpoard)

TODO:

  • Add mercurial support

browse-at-remote's People

Contributors

ackalker avatar antonyshchenko avatar ben avatar blaenk avatar cybershadow avatar eoranged avatar frostyx avatar ieure avatar ilmotta avatar jackrosenthal avatar jgarte avatar jimblandy avatar jwhitbeck avatar kuba-orlik avatar lafrenierejm avatar legendary-mich avatar legoscia avatar lululau avatar microamp avatar mpereira avatar peterbecich avatar purcell avatar rmuslimov avatar syohex avatar whilp avatar wigust avatar wilfred avatar xuhdev avatar yauhen-l avatar zenspider avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

browse-at-remote's Issues

Can't get it to work

When I call browse-at-remote from a buffer viewing a file in a github repo, here's what I get:

Symbol's function definition is void: nil

Unfortunately I can't debug this problem (yet) since I am very new to emacs lisp. I don't even know how to get more information than the above status line, like which symbol's function definition is void, or where evaluation was at the time...

Private bitbucket repos are not supported

Enterprise bitbucket seems to have a different format from what is currently supported.

Would it be possible to specify a formatter in our git config or emacs tools? This would alleviate needing to support any future URL changes or for git sources that are entirely unknown to browse-at-remote.

Expected:
https://bitbucket.enterprise.com/projects/{org}/repos/{repo}/browse/path/to/file.go?at=refs%2Fheads%2F{branch uri encoded}

Got:
https://bitbucket.enterprise.com/projects/{org}/src/{branch}/path/to/file.go#cl-17

Add the variable of git.exe path on windows when someone use portable git-for-windows

Hi maintainer :)

Happy chinese new year!

I'm one windows emacs user and I use the portable git-for-windows pack and hate the installer and registy of program also with adding path in windows .

So can you add one git path variable in browse-at-remote package for some one like me to let this package use portale git applications?

Regards ...

Bitbucket's line-jump syntax has changed

Right now, browse-at-remote specifies the line to jump to in Bitbucket like this:

#cl-108

However, the working format seems to be this:

#core.clj-108

Where "core.clj" is the name of the file. As in, for "x/y/z/core.clj", it's "core.clj", ignoring the parent directories.

Tag version 0.14.0

Commit 771a307 bumped the package's version to 0.14.0, but the latest tag is still 0.10.0. Can 0.14.0 be tagged in git? This would help with packaging efforts.

Sorry, not sure what to do with repo ‘(nil . https://nil/nil)’

When invoking browse-at-remote at point, I see the following error:

Debugger entered--Lisp error: (error "Sorry, not sure what to do with repo ‘(nil . https://nil/nil)’")
  signal(error ("Sorry, not sure what to do with repo ‘(nil . https://nil/nil)’"))
  error("Sorry, not sure what to do with repo `(nil . https://nil/nil)'")
  browse-at-remote--get-remote-type((nil . "https://nil/nil"))
  browse-at-remote--file-url("/home/joni/Scratch/go/src/github.com/appcanary/agent/package/packager_mgmt.rb" 377)
  browse-at-remote-get-url()
  browse-at-remote()
  funcall-interactively(browse-at-remote)
  call-interactively(browse-at-remote record nil)
  command-execute(browse-at-remote record)
  #[257 "\304\305!\203\f�\306\307�!!\210��\307�!\211��\310\307�!\311\")\207" [current-prefix-arg prefix-arg this-command real-this-command featurep smex smex-rank intern command-execute record] 4 "\n\n(fn CMD)"]("browse-at-remote")
  ivy-call()
  ivy-read("M-x " ("toggle-debug-on-error" "mu4e" "list-packages" "git-link" "github-browse-file" "bar-browse" "load-theme" "disable-theme" "twit" "cider-jack-in" "replace-regexp" "fill-region-as-paragraph" "undo-tree-redo" "deft" "chruby-use" "circe" "customize-light-or-dark" "slime" "eww" "cider-connect" "shell" "toggle-frame-fullscreen" "describe-face" "make-directory" "rename-file" "insert-shrug" "apply-font-settings" "auto-fill-mode" "customize-group" "hyperspec-lookup" "godoc" "eshell" "eval-buffer" "godoc-at-point" "highlight-parentheses-mode" "psci" "beacon-mode" "describe-mode" "fill-paragraph" "speed-type-text" "rainbow-delimiters-mode" "browse-url" "menu-bar-mode" "dumb-jump-mode" "blink-matching-open" "circe-reconnect-all" "dired" "woman" "sml/setup" "eval-defun" ...) :predicate nil :require-match t :history extended-command-history :action #[257 "\304\305!\203\f�\306\307�!!\210��\307�!\211��\310\307�!\311\")\207" [current-prefix-arg prefix-arg this-command real-this-command featurep smex smex-rank intern command-execute record] 4 "\n\n(fn CMD)"] :sort nil :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input "^" :caller counsel-M-x)
  counsel-M-x()
  funcall-interactively(counsel-M-x)
  call-interactively(counsel-M-x nil nil)
  command-execute(counsel-M-x)

Installed via melpa.org (melpa version 20170302.2236), running with emacs master (26.0.50 - 74f87fd111904e5156727c72590d6fc4f67e8366).

Note this is NOT a released version of emacs.

Thanks!

Line numbers in URL even though I didn't select any line

I believe there is a bug with appending line numbers even when we don't want them. Or maybe I have just different expectations, in that case, please just close the issue.

I would expect that if

  1. I have no line visually selected, do M-x bar-browse, no line number should be in the link
  2. I have one line (or some text on one line) visually selected, the line number should be attached to the link
  3. I have multiple lines selected, the range of line numbers should be attached to the link

Both 2 and 3 works as expected, but 1 not. Even though I have nothing selected, line number appears in the link.

github enterprise branch producing wrong-type-argument stringp nil

When I try to M-x browse-at-remote from a github enterprise non-master branch, I get the following error.

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  compare-strings("git" nil nil nil 0 3 nil)
  string-prefix-p("git" nil nil)
  s-starts-with\?("git" nil)
  browse-at-remote/get-url-from-remote(nil)
  browse-at-remote/file-url("/Users/me/code/my-lib-js/lib/file.js" 1)
  browse-at-remote/get-url()
  browse-at-remote()
  call-interactively(browse-at-remote record nil)
  command-execute(browse-at-remote record)
  execute-extended-command(nil "browse-at-remote")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

I already ran git config --add browseAtRemote.type "github" from the project root.

Any thoughts?

Naming conventions and obsolete alias warning

Hey! Thanks for browse-at-remote -- it's a really useful package.

I noticed that calling browse-at-remote (ie. the main useful command in the package) produces an obsolete alias warning, telling me to instead call browse-at-remote/browse.

That seems clunky for two reasons: firstly, it's unnecessarily long and redundant, and secondly, / is not a standard separator for elisp symbols.

According to the official elisp conventions, the prefix should be browse-at-remote- in this case, particularly for public symbols such as command names. / has come from emacs users who work with Clojure, but we should all be consistently using the established conventions for each language so that the community can collaborate as smoothly as possible.

I hope you'll consider renaming the affected symbols, and if you'd like me to submit a corresponding pull request I'd be more than happy to do so.

browse-at-remote/get-remote-type: Sorry, not sure what to do with repo ‘(nil . https://nil/nil)’

Occurs after running browse-at-remote/browse or browse-at-remote/to-clipboard. Tested in 5 different repos (some clean, some dirty).

Backtrace

Debugger entered--Lisp error: (error "Sorry, not sure what to do with repo ‘(nil . https://nil/nil)’")
  signal(error ("Sorry, not sure what to do with repo ‘(nil . https://nil/nil)’"))
  error("Sorry, not sure what to do with repo `(nil . https://nil/nil)'")
  browse-at-remote/get-remote-type((nil . "https://nil/nil"))
  browse-at-remote/file-url("/Volumes/hlissner/.emacs.d/init.el" 4276)
  browse-at-remote/get-url()
  browse-at-remote/browse()
  (if bang (message "Url copied to clipboard: %s" (browse-at-remote/to-clipboard)) (browse-at-remote/browse))
  narf:git-remote-browse(nil nil)
  funcall-interactively(narf:git-remote-browse nil nil)
  call-interactively(narf:git-remote-browse)
  evil-ex-call-command(nil #("browse" 0 1 (ex-index 1) 1 2 (ex-index 2) 2 3 (ex-index 3) 3 4 (ex-index 4) 4 5 (ex-index 5) 5 6 (ex-index 6)) nil)
  eval((evil-ex-call-command nil #("browse" 0 1 (ex-index 1) 1 2 (ex-index 2) 2 3 (ex-index 3) 3 4 (ex-index 4) 4 5 (ex-index 5) 5 6 (ex-index 6)) nil))
  evil-ex-execute(#("browse" 0 1 (ex-index 1) 1 2 (ex-index 2) 2 3 (ex-index 3) 3 4 (ex-index 4) 4 5 (ex-index 5) 5 6 (ex-index 6)))
  evil-ex(nil)
  funcall-interactively(evil-ex nil)
  call-interactively(evil-ex nil nil)
  command-execute(evil-ex)

Details

From inside browse-at-remote/remote-ref in one of my clean repos.

letvar expression return value
local-branch (vc-git-working-revision ".") c9833d9b82333282ee300ccd333b2e2094efb575
remote (and local-branch (browse-at-remote/get-from-config (format "branch.%s.remote" local-branch))) ""
remote (when remote (browse-at-remote/get-remote-url remote)) ""
remote-branch (s-chop-prefix "refs/heads/" (browse-at-remote/get-from-config (format "branch.%s.merge" local-branch))) ""

Running Emacs 25.1.50.1 on Mac OSX 10.10. I've tested this with emacs -Q and will try it on an earlier version of emacs once I get home.

`apply: Wrong number of arguments: #<subr cons>, 1` when tracking local branches

If you are tracking a local branch (remote = .) the command fails with the following error:

apply: Wrong number of arguments: #<subr cons>, 1

This is due to the remote-and-branch being just master for example instead of origin/master.

This happens if you use the configuration autosetupmerge = always and do a git checkout -b newbranch. Then it will track whatever branch you branched of from.

Not sure how this should be tackled, but perhaps use the remote for the local branch you target.

Release version

I noticed that the version listed in the code is 0.13.0, but the latest version featured as a release is 0.10.0. It would be nice to see a new release version, so that people who install this package via their distro's package manager can benefit from the recent changes.

Unsure what remote type should be used for heroku

Heroku integrates with git by adding its remotes to a git repository, which confuses browse-at-remote. It's not used for browsing, so it would be helpful to add a "no-op" remote type or something, unless someone has a better idea?

Steps to reproduce:

  1. Add a remote like https://git.heroku.com/your-repo.git
  2. Try to browse-at-remote

Desired behavior:

Browse-at-remote ignores heroku remotes

refs%2Fheads%2F is added to URL for type stash, resulting in broken link

Context

I have a stash repo, for which I ran git config --add browseAtRemote.type "stash". I then open a file, app/file.js, within the repo in emacs and run M-x browse-at-remote on the first line of code.

Expected behavior:

I expected a URL to be opened of the format:

https://stash...com/projects/org/repos/repo/browse/app/file.js?at=abcdef1234567890abcdef01234567890abcdef0#1

Actual behavior:

A URL is opened wit the format:

https://stash...com/projects/org/repos/repo/browse/app/file.js?at=refs%2Fheads%2Fabcdef1234567890abcdef01234567890abcdef0#1

(note that refs%2Fheads%2F is prepended to the value of the at URL parameter)

which results in a broken webpage in Stash with the error

The path "app" does not exist at revision "refs/heads/abcdef1234567890abcdef01234567890abcdef0"

Comment

How can I prevent refs%2Fheads%2F from being erroneously added to the at URL parameter?

Support vc-region-history

browse-at-remote supports vc-annotate i.e. I can C-x v g, move to some line and I can browse-at-remote and it takes me to the commit.
Since vc-region-history (C-x v h) is similar, it would be great if it worked there as well.

Wrong remote selected

I have a repository that uses gerrit code review. How that works is that you set up a remote.

I tried out browse-at-remote with this repository and it selected the gerrit remote, when I wanted to select the 'origin' remote.
If you do git remote, it list them in alphabetical order :-( so gerrit gets selected.

I thought of a couple of ways to solve this:

  1. Provide a custom variable which filters out repos you don't want.
  2. Provide a custom variable which selects a preferred remote
  3. Provide a popup menu when there are multiple remotes and let the user select the appropriate remote

Anyway, thoughts?

prefer-symbolic nil causes 404 in bitbucket

I have customized Prefer Symbolic to the value nil.

But when I invoke M-x browse-at-remote on a line in a Stash (Bitbucket Server) hosted repo, it produces an invalid at URL parameter.

Example:

I'm currently browsing the source code of a repo at revision 84ae96e198c9d37292a5fbe3b79bf68192c3c40d.
I then invoke M-x browse-at-remote on a line of code.

Expected behavior:

I expected the following URL to be opened in my browser (I am only including the tail end of the URL) :
/repos/myrepo/browse/file.txt?at=84ae96e198c9d37292a5fbe3b79bf68192c3c40e#26

Actual behavior:

the following URL path is opened in my browser, which cannot be found by bitbucket:
/repos/myrepo/browse/file.txt?at=refs%2Fheads%2F84ae96e198c9d37292a5fbe3b79bf68192c3c40e#26

There's an extra refs%2Fheads%2F produced in the URL parameter which seems to break the URL. If refs%2Fheads%2F is removed, then the URL works

open with gitlab without starting with `https://`

Hi, I want to access custom gitlab repository to open with browser in gitlab.
After adding the following line
(add-to-list 'browse-at-remote-remote-type-regexps '("^gitlab.<custom>.com$" . "gitlab"))
and it's working except that https:// needs to be removed from the website.
So every time I open it remotely, I go to the address-bar and remove https:// manually from the beginning.

Is there a way to automate this?
Thanks!

Can't browse at remove after the package update

Right now when I call browse-at-remote function I get the message

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

but I already have GitHub domain in a variable

browse-at-remote-remote-type-domains is a variable defined in ‘browse-at-remote.el’.
Its value is shown below.

  You can customize this variable.

Documentation:
Alist of domain names to remote types.

Value:
(("bitbucket.org" . "bitbucket")
 ("github.com" . "github")
 ("gitlab.com" . "gitlab")
 ("git.savannah.gnu.org" . "gnu")
 ("gist.github.com" . "gist")
 ("git.sr.ht" . "sourcehut")
 ("vs-ssh.visualstudio.com" . "ado")
 ("pagure.io" . "pagure")
 ("src.fedoraproject.org" . "pagure"))

[back]

My version is 20210527.451 and I didn't make any modifications related to this package.

support SSH session

I do most of my emacs work on the far side of an SSH session. Can you add support for putting the URL somewhere on the screen so it can be clicked from the terminal?

How to select or change remote

Right now, we can only browse the origin remote. And if I want to change it, I have to go to .git/config to switch the remote names. Do we have a feature so that we can easily change the remote when browsing? For example, when specifying the remote branch, we can do upstream/master and it will go to the upstream's url instead of the origin's.

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

Seems similar to #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

Allow more customization of domain based on remote

I'm using a remote host mycompany.github.com which is set in my ssh config to resolve to github.com:

Host mycompany.github.com
    HostName github.com
    # User git
    IdentityFile ~/.ssh/id_rsa_mycompany
    IdentitiesOnly yes

This enables me to use multiple different ssh keys with git easily.

Currently when I run browse-at-remote it navigates to mycompany.github.com which does not exist. I would like to have some option of explicitly specifying the base host for a remote. I suspect extending browse-at-remote-remote-type-domains with a third option might do the trick, or even migrating the simple cons to a plist so there is more options to customize it in the future.

We can of course keep the current data structure for backwards compatibility. So my entry ("mycompany.github.com" . "github") would turn into (:domain "mycompany.github.com" :type "github" :base "github.com").

Another option is to introduce a second configuration, but that feels like duplication (having the same "primary key" in two places).

Let me know what you think!

[Feature request] On 404, fall back on a default branch or the repo root url

When browse-at-remote encounters a file whose url cannot be resolved (e.g. is untracked, or on an untracked branch, etc), an error occurs and that's that. I'd like to suggest one of the following as alternatives:

  1. It falls back to a default branch. Either master, or from a variable like browse-at-remote-default-branch.
  2. Have browse-at-remote/get-url or browse-at-remote/file-url accept an optional branch argument, then we can write it ourselves.
  3. Or it falls back to the root of the repository.

The rationale is that when I use browse-at-remote, I have a good idea of where I want to end up. If it doesn't find the exact url, I find it preferrable that it take me somewhere close to the target, rather than stop me dead in my tracks with an error.

I'd be happy to do a PR for this, if you'll let me know which approach (or another) you'd prefer.

Let me know! And thanks for this plugin by the way!

browse-at-remote/prefer-symbolic broken?

I'm on emacs 25 if that matters.

In browse-at-remote/remote-ref we set revision to:

(revision (if (fboundp 'vc-git--symbolic-ref)
                   (vc-git--symbolic-ref (or filename "."))
                 (vc-git-working-revision (or filename "."))))

The thing is that vc-git--symbolic-ref is defined, so it uses that and it gets set to "master" for me. Then later on we use the revision if the user set browse-at-remote/prefer-symbolic to nil, which ends up being "master" because it didn't use vc-git-working-revision like it should have. Or am I missing something?

       (if (and browse-at-remote/prefer-symbolic remote-branch)
           ;; If the user has requested an URL with a branch name, and we
           ;; have a remote branch, use that.
           remote-branch
         ;; Otherwise, just use the commit hash.
         revision)

browse-at-remote/browse not finding remote github enterprise branches

Hi,
I'm not able to M-x browse-at-remote/browse successfully on github enterprise branch other than master.
First I ran git config --add browseAtRemote.type "github"
Then I pushed my branch to github enterprise.
Then when I edit a file and try M-x browse-at-remote/browse, I'm shown a prompt that says Select remote branch:

  1. I expected browse-at-remote to automatically know the current branch name
  2. When I enter my branch name at the Select remote branch: prompt, it opens my browser to a different, unrelated repository on github enterprise, and always on the master branch

Let me know if I can provide additional information.

Thanks

git version 2.8.3
GNU Emacs 24.5.1
OSX 10.10.5

remote-url-to-clipboard

Could you add a function which is similar to browse-at-remote, but puts the url into clipboard instead of opening the url. Most of the time I just want to paste the url in the issue tracker or some other place

I am rebinding browse-url in my local config to get the same effect.

(defun remote-url-to-clipboard ()
  (interactive)
  (flet ((browse-url (url &rest args)
                     (kill-new url)))
    (browse-at-remote)))

browse-at-remote broken in MELPA / on master with 28.1

Hi I'm using Emacs 28.1 and I recently updated all my packages, and noticed that browse-at-remote is completely broken on master and in the version on MELPA. Whenever I run browse-at-remote I get the following traceback on the version from master manually installed, or the latest from MELPA fetched w/ use-package or package-install

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  browse-at-remote--get-remote-type("github.com")
  browse-at-remote--file-url("/home/iwhitlock/.emacs.d/ian.org" 3043)
  browse-at-remote-get-url()
  browse-at-remote()
  funcall-interactively(browse-at-remote)
  call-interactively(browse-at-remote nil nil)
  command-execute(browse-at-remote)

nota bene that this occurs even with a completely vanilla GitHub repository -- this one isn't doing anything fancy and merely points to my Emacs configs here on GitHub.

I am able to work around this issue by installing the last tagged release, so something between that and master appears to be breaking things.

I hope this report helps bring your attention to the issue and sorry that I don't know what else info might be helpful to resolve it!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.