I find it helpful to look at it this way:
If you are spending "from your income", then you are essentially really paying from your tax-deferred accounts (by not funding them fully). Conversely, if you are spending from your non-qualified accounts, then you are essentially transferring money from those accounts to your retirement accounts (by spending faster than your savings accounts can accumulate).
So your decision can be framed more simply as: How much do you need in savings? If you have more than you need, "transfer" it to a 401(k) by funding the 401(k) and living off your savings. If you have less than you need, "transfer" it from your 401(k) by living from your income, and shorting your 401(k). Once you have your savings balance at the ideal level, put the amount into your 401(k) that will keep your take-home pay equal to your expenses.
The fundamental question "How much do you need in savings?" is, of course very personal and depends on your own plans, predictions, and risk tolerance.
A note on the subject of emergency funds: Ultimately, an "emergency fund" is nothing but a label on a number. You have savings, and some amount of it is "emergency fund" and some of it is "expenses". Some people like to have separate accounts, to keep track of what is what. Some people are able to just keep track of the number. In either case, if you use it for regular and predictable expenses, it's not part of the emergency fund. Psychologically, to avoid using your emergency fund for non-emergencies, stop using that term for your savings in general.