sshaw / git-link

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

Get filename from base-buffer when in an indirect buffer #84

Closed zaeph closed 3 years ago

zaeph commented 3 years ago

Hi there,

This is a quick PR to fix the creation of links in indirect buffer.

I’ll use the opportunity to thank you for your work on this package. :)

sshaw commented 3 years ago

Oh an indirect buffer fix. Nice. What's your use case for indirect buffers?

Thanks for the fix!

zaeph commented 3 years ago

Thanks for the merge! 🎉

What's your use case for indirect buffers?

It's particularly useful when you need to edit two places in parallel inside a single file. For example, when I'm editing a module of a bigger function, I like to keep both in sight to periodically verify the outputs; cloning and narrowing makes this a breeze.

sshaw commented 3 years ago

... when I'm editing a module of a bigger function, I like to keep both in sight to periodically verify the outputs; cloning and narrowing makes this a breeze.

Thanks. I'm going to try this. Currently I'd use multiple windows + bm for bouncing around to/from important locations but what you said sounds good.

zaeph commented 3 years ago

Currently I'd use multiple windows + bm for bouncing around to/from important locations but what you said sounds good.

That sounds interesting too; thanks for the discovery!

I'm working on a proof-of-concept patch for abo-abo/lispy that would facilitate my method. Here's a demo (lisyp-ibuf-demo.mp4).