The answer to your question depends very much on your definition of "long-term".
Because let's make something clear: an investment horizon of three to six months is not long term. And you need to consider the length of time from when an "emergency" develops until you will need to tap into the money. Emergencies almost by definition are unplanned.
When talking about investment risk, the real word that should be used is volatility. Stocks aren't inherently riskier than bonds issued by the same company. They are likely to be a more volatile instrument, however. This means that while stocks can easily gain 15-20 percent or more in a year if you are lucky (as a holder), they can also easily lose just as much (which is good if you are looking to buy, unless the loss is precipitated by significantly weaker fundamentals such as earning lookout). Most of the time stocks rebound and regain lost valuation, but this can take some time. If you have to sell during that period, then you lose money.
The purpose of an emergency fund is generally to be liquid, easily accessible without penalties, stable in value, and provide a cushion against potentially large, unplanned expenses. If you live on your own, have good insurance, rent your home, don't have any major household (or other) items that might break and require immediate replacement or repair, then just looking at your emergency fund in terms of months of normal outlay makes sense. If you own your home, have dependents, lack insurance and have major possessions which you need, then you need to factor those risks into deciding how large an emergency fund you might need, and perhaps consider not just normal outlays but also some exceptional situations. What if the refrigerator and water heater breaks down at the same time that something breaks a few windows, for example? What if you also need to make an emergency trip near the same time because a relative becomes seriously ill?
Notice that the purpose of the emergency fund is specifically not to generate significant interest or dividend income. Since it needs to be stable in value (not depreciate) and liquid, an emergency fund will tend towards lower-risk and thus lower-yield investments, the extreme being cash or the for many more practical option of a savings account.
Account forms geared toward retirement savings tend to not be particularly liquid. Sure, you can usually swap out one investment vehicle for another, but you can't easily withdraw your money without significant penalties if at all.
Bonds are generally more stable in value than stocks, which is a good thing for a longer-term portion of an emergency fund. Just make sure that you are able to withdraw the money with short notice without significant penalties, and pick bonds issued by stable companies (or a fund of investment-grade bonds). However, in the present investment climate, this means that you are looking at returns not significantly better than those of a high-yield savings account while taking on a certain amount of additional risk. Bonds today can easily have a place if you have to pick some form of investment vehicle, but if you have the option of keeping the cash in a high-yield savings account, that might actually be a better option.
Any stock market investments should be seen as investments rather than a safety net. Hopefully they will grow over time, but it is perfectly possible that they will lose value. If what triggers your financial emergency is anything more than local, it is certainly possible to have that same trigger cause a decline in the stock market. Money that you need for regular expenses, even unplanned ones, should not be in investments.
Thus, you first decide how large an emergency fund you need based on your particular situation. Then, you build up that amount of money in a savings vehicle rather than an investment vehicle. Once you have the emergency fund in savings, then by all means continue to put the same amount of money into investments instead. Just make sure to, if you tap into the emergency fund, replenish it as quickly as possible.