Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return link #38

Closed
wants to merge 1 commit into from
Closed

Return link #38

wants to merge 1 commit into from

Conversation

dougharris
Copy link

#37

@sshaw
Copy link
Owner

sshaw commented Jan 28, 2017

Hi, thanks for this. It's been something I've been meaning to do for a while.

One question: don't you think it would be better to move this to a non-interactive function that doesn't touch the kill ring or open the link?

Something like:

(defun git-link-url (remote &optional start end)
  ;; build url
)

(defun git-link (remote start end)
  ;; interactive stuff
  (git-link--new (git-link-url remote start end)))

@truthdoug
Copy link

Yes - non-interactive would be better. The other thing I was thinking about was a shortcut that wouldn't require the remote param because most uses have only a single remote.

@sshaw
Copy link
Owner

sshaw commented Jan 28, 2017

The reason I included remote is so one can use it without having to depend on a buffer's contents.

It could default to the current buffer, but in general I think it's good for functions to not assume anything about global state.

@sshaw
Copy link
Owner

sshaw commented Jan 28, 2017

Also, what's your use case for getting the URL?

@dougharris
Copy link
Author

I have a hand made, half-assed function that opens the commit but it relies on a manually maintained map of directories to remote repo URLs. I found git-link and it did much of the hard stuff that I wasn't doing.

So, I'm basically looking for the git-link-commit functionality but leaving without setting a variable that always opens the link. There are times where I want the URL without opening (e.g. for sharing with colleagues).

@sshaw sshaw added this to the v1.0 milestone Sep 26, 2017
@futuro
Copy link

futuro commented Apr 9, 2020

Hey y'all, I'd love to help push this across the finish line! My use case is I'm writing out org-mode capture templates and I want to be able to programmatically call git-link so that I share my exports with others in a meaningful way.

Let me know what I can do to help!

@sshaw
Copy link
Owner

sshaw commented Apr 17, 2020

Closing to to lack of activity and #69

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants