I have a table in org-mode
which has the following format:
| Name | email | number |
|------------+-----------------+--------|
| Doe, John | jod@example.org | 7 |
| Doe, Jane | jod@example.org | |
|------------+-----------------+--------|
| Foo, Pete | pf@example.com | 5 |
|------------+-----------------+--------|
| Bar, Mary | maba@127.0.0.1 | 3 |
| Quux, Mike | bz@192.168.12.1 | |
|------------+-----------------+--------|
But I want the table to be formatted to look like this:
| Name | email | number |
|------------+-----------------+--------|
| Bar, Mary | maba@127.0.0.1 | 3 |
| Quux, Mike | bz@192.168.12.1 | |
|------------+-----------------+--------|
| Doe, John | jod@example.org | 7 |
| Doe, Jane | jod@example.org | |
|------------+-----------------+--------|
| Foo, Pete | pf@example.com | 5 |
|------------+-----------------+--------|
This table should be sorted alphabetically. So the last two rows should be the first. The separation with the horizontal lines should stay. If there are different words in in grouped columns, it doesn't matter how they are sorted. So the last group in the table above can either be Bar
followed by Baz
or Baz
followed by Bar
. How can I do this with Emacs org-mode
?