I'm experiencing with ways to configure Emacs to enable me to type less, but achieving the same thing, by exploiting the fact that in programming, you do (type) more or less the same thing over and over. I need this for medical reasons, but also because it makes sense in general.The Emacs-interface I envisage is basically mixing commands with arguments. I'll just show an example and you'll understand immediately.OK, you don't have to be that sharp to see, that in C, the for loop, less than something, increment by one, is very common. So I thought I'd write something like this:(defun C-for-loop-new-int-less-inc (var start stop)  Shortcut for putting a C for loop at point.   Note: There are some specifics to i.  (interactive sVariable: \nnStarts at: \nnLess than: )  (insert   (format for (int %s = %d; %s < %d; %s++) {\n\n}           var start var stop var) )  (previous-line)  (c-indent-line-or-region) )And to reduce typing:(defalias 'fnili 'C-for-loop-new-int-less-inc)Now, M-x fnili RET i RET 0 RET 10 RET should get youfor (int i = 0; i < 10; i++) {}with the cursor at the second row, with indentation.While that's an improvement, how can I fire off the command like this:fnii0l10iThat way, all the RET-wait-reorient cycles would vanish, instead you'd write the entire command, once, and it would be visible all the time.Now, I now I could write a function that takes a string, and then parses it, but I won't do that if Emacs already has support for such an interface that I seek.EditSo, template facility is the designation?I don't think it is that hard to do. If you want this for the entire C language, and for all possible twists and turns, then I agree. But to identify just a few time consuming cases (for, switch-case, the guard in header files) and implement those, that would be a helpful feature.Of course, if work has been done, I'm not doing it from scratch (as I said :), so I'll check out your links for sure.But... I think my example was too complicated so it overshadowed the actual question, which is about the interface: instead of hitting RET and getting a blank line for each argument, putting it all on a single command line.A much more simple example: Instead of M-x man RET irssi RET, how can I do M-x manirssi RET? In this example, it is not really beneficial (slightly perhaps) because it is only a single argument, and there is nothing complicated to it (that you need to keep in your brain), and you will seldom make a mistake that you have to backtrack to correct. But, in the for loop example command in the original post (fictitious, as I've never seen it, if it exists) - in that case, you would really benefit from it.
Emacs: Interface that mixes commands and arguments
emacs