[R] emacs: reformat \items paragraph in .Rd
David Scott
d.scott at auckland.ac.nz
Sun Mar 28 05:54:56 CEST 2010
Hans-Peter Suter wrote:
> (emacs newb here)
>
> After having made some changes in an \items paragraph of \arguments
> the lines are no longer nicely wrapped. I was looking for a command to
> reindent/rewrap/reformat the whole \items paragraph but couldn't find
> anything.
>
> The only way, I found, was to go to the end of the first line, do
> 'c-j' (or RET) which wraps *this* line nicely, but now there is a
> hard line-break to the next line. So I go back with 'c-p', delete the
> gap to the next line with 'c-k' and some 'c-d' s. Then got to the end
> of this line and start again with 'c-j', ...
>
> There certainly must be some easier way to reformat a paragraph?
> (I tried 'm-c-q' (not defined) and 'm-c-\' (but was not able to input
> the backslash); I'm on GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600).
>
> Thanks for your help!
>
> Hans-Peter
Esc-q or M-q will wrap a whole paragraph. The only problem is that you
need to make sure the paragraph you want to wrap is separated from other
paragraphs by blank lines, i.e. it must be clear it is a paragraph.
David Scott
--
_________________________________________________________________
David Scott Department of Statistics
The University of Auckland, PB 92019
Auckland 1142, NEW ZEALAND
Phone: +64 9 923 5055, or +64 9 373 7599 ext 85055
Email: d.scott at auckland.ac.nz, Fax: +64 9 373 7018
Director of Consulting, Department of Statistics
More information about the R-help
mailing list