I don’t usually dedicate an entire post to something I’ve already done in a
previous one, but this nugget is so useful it deserves the attention. Remember
how you can create Github PRs straight from Magit? Magit 2.1.0 is barely
two weeks away, and it brings so many (awesome) changes that our little snippet is
going to break.
Luckily for you, I’ve been using Magit’s next version for a couple of months
now, so I have a fix all shiny and ready for you. This function is also slightly
more robust, and fixes some corner-case issues in the other. So if you found
that the previous function didn’t cover your use-case, you should definitely try
the new one.
Note that I’ve changed the keybind to v. In Magit 2.1, that key is bound in
buffer overlays, not on the mode-map, which means we can just bind it in the map
and we’ll get a semi “do-what-I-mean” functionality.
Update 24 Jan 2016
The latest Magit from Melpa deals with branches in a slightly different way, so
the code above won’t quite work. If you run into that problem, the update below
should work fine.
Create Github PRs from Emacs with Magit (again)
22 Jun 2015, by Artur Malabarba.GitHub Integration post series
I don’t usually dedicate an entire post to something I’ve already done in a previous one, but this nugget is so useful it deserves the attention. Remember how you can create Github PRs straight from Magit? Magit
2.1.0
is barely two weeks away, and it brings so many (awesome) changes that our little snippet is going to break.Luckily for you, I’ve been using Magit’s next version for a couple of months now, so I have a fix all shiny and ready for you. This function is also slightly more robust, and fixes some corner-case issues in the other. So if you found that the previous function didn’t cover your use-case, you should definitely try the new one.
Note that I’ve changed the keybind to v. In Magit
2.1
, that key is bound in buffer overlays, not on the mode-map, which means we can just bind it in the map and we’ll get a semi “do-what-I-mean” functionality.Update 24 Jan 2016
The latest Magit from Melpa deals with branches in a slightly different way, so the code above won’t quite work. If you run into that problem, the update below should work fine.
Tags: magit, init.el, emacs,
How I blog: One year of posts in a single org file »
« Better compile command
Related Posts
It’s Magit! And you’re the magician! in magit
Content © 2019, All rights reserved. Icons under CC3.0.