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

Add dwim(thingatp) smarts? #131

Open
dolzenko opened this issue Nov 15, 2024 · 3 comments
Open

Add dwim(thingatp) smarts? #131

dolzenko opened this issue Nov 15, 2024 · 3 comments

Comments

@dolzenko
Copy link
Contributor

dolzenko commented Nov 15, 2024

E.g. when I'm in magit-refs buffer opens corresponding branch if I'm on branch or just home page, when in magit-log - opens commit.

Also thank you for the neat useful project ❤️

@sshaw
Copy link
Owner

sshaw commented Nov 16, 2024

Hi,

when I'm in magit-refs buffer

Not sure what this is. How to open it?

when in magit-log - opens commit.

git-link-commit will work if on a commit hash. What do you want to do instead?

In general should work with a variety of magit buffers:

git-link/git-link.el

Lines 424 to 425 in fd33c3f

((and (string-match-p "^magit-" (symbol-name major-mode))
(fboundp 'magit-file-at-point))

In a magit-status buffer, for example, git-link will generate a file link if executed on a file name. git-link-commit will generate a commit link if executed on a commit hash.

@dolzenko
Copy link
Contributor Author

dolzenko commented Nov 18, 2024

Not sure what this is. How to open it?

with y key, its a list of branches basically

Ok, thanks, I get it know, I was expecting git-link to work when standing on commit in magit-log, I guess, maybe, the message can be adjusted, to at least hint the user at trying git-link-commit function, because currently it says 'can't figure what to link to' :)

Cheers again, looking from history it seems we've been together with gitlink for past decade so it's kind of anniversary for me heh

@sshaw
Copy link
Owner

sshaw commented Nov 20, 2024

Not sure what this is. How to open it?

with y key, its a list of branches basically

As yes, I know this :)

If the branch is expanded git-link-commit can be used on the SHA but I suppose you want do be able to link from the branch name?

Ok, thanks, I get it know, I was expecting git-link to work when standing on commit in magit-log,

Yes makes sense.

Cheers again, looking from history it seems we've been together with gitlink for past decade so it's kind of anniversary
for me heh

Yes you have first PR for this repo! 💪

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

No branches or pull requests

2 participants