I have the following line in my
, because I usually like to have a terminal running in my emacs. The problem is that sometimes I don't, for instance, when I just do some quick edit, like when I
git commit. In this case, exiting emacs involves prompts about running processes, and usually I like these safety warnings. I know I can create an
alias something along the lines of
alias emax='emacs --eval "(ansi-term \"/usr/bin/bash\")"'
This leaves the normal
emacs command unchanged and everything would be fine, if I only start emacs from terminals. If I want to start it from the "Start" menu however, then I'm out of luck again.
So, the question is, is there some clever mechanism, where emacs usually starts with an
ansi-term, but somehow knows, when I don't want one. One such possibility would be creating something like a custom
emax.desktop file, but I'd also have to use the
alias above and I'd like to avoid maintaining code in two different places.
So hopefully this question is understandable. I'm open to any linuxy hints, but simpler is better of course.