Hot answers tagged

3

There are many ways to write loops/iterative/repetitive behaviour in elisp. C-hig (elisp)Iteration has the basic options, including dotimes, which is the canonical way to repeat something N times. E.g.: (dotimes (_ 10) (insert "X")) For the specific example of repeating a character N times, you might alternatively use make-string. (insert (make-string ...


3

If you want to insert the character interactively, do C-u 10 X. This will give you XXXXXXXXXX. This repeats the self-insert-command (here, for "X"), 10 times. See the manual node on repeating.


1

Here's an implementation of exactly what the OP is asking for, although I don't think it is of any use to anybody (except possibly the OP, but even there I have my doubts, as the extended discussion in the comments shows). It assumes that there is one long line starting at the beginning of the buffer and that you want to reformat it as a block of some ...


Only top voted, non community-wiki answers of a minimum length are eligible