sshaw / git-link

Emacs package to get the GitHub/Bitbucket/GitLab/... URL for a buffer location
399 stars 74 forks source link

Define function to get absolute filename #63

Closed lafrenierejm closed 4 years ago

lafrenierejm commented 5 years ago

This provides a cleaner, more functional approach than the existing setq-heavy implementation. Additionally, a fallback of default-directory (which is guaranteed to exist) will be used if no other method of obtaining the filename is valid.

sshaw commented 5 years ago

Hi, thanks.

Before filename defaulted to (buffer-file-name) and only used the cond to get the file's name if (buffer-file-name) was nil. Now (buffer-file-name) is never used and one cannot get a link to the file in the buffer.

lafrenierejm commented 5 years ago

Thank you for catching that oversight. It should be fixed now.

lafrenierejm commented 5 years ago

@sshaw Would you like me to squash my commits?

sshaw commented 5 years ago

Hi yes please squash but... let me test first. Give me a day. Sadly I have no automated tests here. 😢

sshaw commented 5 years ago

@lafrenierejm I have not forgotten. Will review in Nov!

lafrenierejm commented 5 years ago

@sshaw What would you think of my just removing the default-directory fallback for now? I can revisit that in a separate PR.

sshaw commented 4 years ago

Hi, sorry missed your last comment. Give me 24 hours to get caught up. Feel free to harass me if I don't get back to you... ⏳

sshaw commented 4 years ago

What would you think of my just removing the default-directory fallback for now?

Sounds good 👍. Please squash into a single commit, thanks.

sshaw commented 4 years ago

Closing. Feel free to reopen with updated changes.