I've gone at it from the handle bar/throttle end.
There are several ways of doing this.
The first is the built up silver solder onto a CLEANED and fluxed stainless steel cable end, this is much easier than you might think. Regular solder will not stick to a stainless cable.
I start with a hunk of ceramic based modeling clay-
(plastic based clay wont work)
ALWAYS make sure that the cable housing and adjusters are installed on your new cable or your gonna feel REALLY STUPID when you cant put the cable you just made together (trust me on this one)
#1- Using two small slabs of clay, press the barrel cable end that is to be reproduced into one half of the clay and lay the other slab of clay over it GENTLY, you are trying to create a part able mold here, not trying to get the clay to stick together, now extend the opposite side of the impression a bit to use as a port to fill the mold with the molten solder.
(this might take several trys to get just right, but its not that difficult).
#2- Turn your new mold upright in a vise or wire it together and stand it up.
#3- Using a metal bottle cap as a melting pot, grab it with a pair of vise grips to melt the solder in, no need to melt to much solder, this stuffs a little expensive.
#4- Snip the end of the cable to the correct length and make sure its clean of all oil or grease, then dip it into some good quality soldering flux paste or liquid flux-
(I've had great success using my wife's liquid flux that she uses to make stained glass with, its very pure)
Now, CAREFULLY insert the end of the cable into your mold and make sure it goes slightly past the new barrel, its ok if the new barrel is a little large, you can file it down a bit.
Pour the melted solder into the mold and let it cool fully.
(this is the most difficult part because you want to see if it worked but be patient).
#5- once it has cooled, remove it from the mold and give it a good tug to make sure it stuck, grind and file off all the casting flash and V'iola! new cable end.
Method #2- From the carb end.
Measure your cable very carefully, theres nothing more annoying than messing this step up (trust me on this one)
Make sure you give yourself a little extra slack, but not to much to be taken up by the cable adjuster.
This method is very easy but takes a little finesse.
#1- Snip clean and flux the end of the cable and place it in a vise sticking up... its ok if its a little long.
#2- I use some very thin brass tubing, like the ink tube you might find in a pen, its got to be brass or stainless steel. If you use the pen tube trick make sure its clean and free of any ink.
Cut the length of tube and slide it over the exposed end of the cable.
#3- Using a good hot torch, heat the end of the cable and hold the solder directly over the opening, the heat, gravity and flux will draw the solder into the tube bonding it to the cable end.
#4- Cut and file to the desired length.
I developed these methods because I cant stand incorrectly fitted or over long cables.
I hope this helps.
BBB