Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Emacs, editing C, and trying to execute sort-fields doesn't seem to be working. I enter M-x sort-fields after highlighting a region. At one point it was letting me pass a field number, but then suddenly it stopped, and now it reports [Sole Completion] when I enter space to pass the field number. I was thinking that maybe in C-mode it doesn't like that command, but I'm not sure. Any guidance on how to get this to work, or what I might be doing wrong?

share|improve this question
up vote 4 down vote accepted

AFAIK sort-fields has no interactive way to specify the field number, you have to give it as a C-u argument. E.g for the 3rd field: C-u 3 M-x sort-fields

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.