emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Query: Nested sort in table?
@ 2010-09-14 10:44 Christian Moe
  0 siblings, 0 replies; only message in thread
From: Christian Moe @ 2010-09-14 10:44 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Is there a technique or strategy to get nested sorts in Org tables, i. 
e. sorting first by column B, then by column A, ...?

e.g. a list of publications sorted by title:

| Author    | Year | Title            | Type    |
|-----------+------+------------------+---------|
| Smith, J. | 2006 | Mazes for mice   | Article |
| Jones, S. | 2003 | Mice for Dummies | Book    |
| Smith, J. | 2002 | Rodents          | Book    |
| Jones, S. | 2007 | Say 'Cheese'!    | Article |
| Jones, S. | 2000 | Pet care         | Book    |

For bibliographical order you would want to sort first by author, then 
by year (ascending or sometimes adecending). In other circumstances 
you might also want to sort by type first of all, to have separate 
lists of books and articles. You can sort by author

| Author    | Year | Title            | Type    |
|-----------+------+------------------+---------|
| Jones, S. | 2003 | Mice for Dummies | Book    |
| Jones, S. | 2007 | Say 'Cheese'!    | Article |
| Jones, S. | 2000 | Pet care         | Book    |
| Smith, J. | 2006 | Mazes for mice   | Article |
| Smith, J. | 2002 | Rodents          | Book    |

but how to get the works of each author sorted by date? Manually 
selecting a region from "2003" to the end of the "Jones" lines, 
sorting, and then selecting a region from "2006" to the end of the 
"Smith" lines, and sorting again, works:

| Author    | Year | Title            | Type    |
|-----------+------+------------------+---------|
| Jones, S. | 2000 | Pet care         | Book    |
| Jones, S. | 2003 | Mice for Dummies | Book    |
| Jones, S. | 2007 | Say 'Cheese'!    | Article |
| Smith, J. | 2002 | Rodents          | Book    |
| Smith, J. | 2006 | Mazes for mice   | Article |

-- but is there a shortcut?

Yours,
CM

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-09-14 10:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-14 10:44 Query: Nested sort in table? Christian Moe

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).