all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Sorting on compound keys?
@ 2011-05-24 20:57 Tim Landscheidt
  2011-05-25  5:58 ` Andreas Röhler
  2011-05-29 21:50 ` Mark Tilford
  0 siblings, 2 replies; 10+ messages in thread
From: Tim Landscheidt @ 2011-05-24 20:57 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

sometimes I want to sort unified diffs of CSV files (sepa-
rated by tabs (here: \t)):

| +A 1\t1\tx
| +A 1\t2\ty
| +B 2\t3\tz
| -A 1\t1\tx
| -B 2\t2\ty
| -B 2\t3\tz

by the second column, then the first column, then "+" vs.
"-". Unfortunately, it seems that sort-regexp-fields doesn't
allow more than one match field as a key. sort-fields
doesn't work either as it requires the fields to be sur-
rounded by white space (no "+" vs. "-") and doesn't allow
white space inside the fields.

  Is there any function in vanilla Emacs (23.1.1) that I
missed? I looked at pimping sort-regexp-fields, but it seems
to me that sort-subr would have to be rewritten from scratch
to achieve sorting on compound keys.

Tim




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-06-13  7:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-24 20:57 Sorting on compound keys? Tim Landscheidt
2011-05-25  5:58 ` Andreas Röhler
2011-05-25 22:08   ` Tim Landscheidt
2011-05-26  6:28     ` Andreas Röhler
2011-05-26 22:49       ` Tim Landscheidt
2011-05-29 20:17         ` Andreas Röhler
2011-06-10  0:26           ` Tim Landscheidt
2011-06-13  7:32             ` Andreas Röhler
2011-05-29 21:50 ` Mark Tilford
2011-06-10  0:27   ` Tim Landscheidt

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.