all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Sort data in buffer.
@ 2007-09-06  9:10 Dave Pawson
  2007-09-06  9:48 ` Peter Dyballa
  0 siblings, 1 reply; 6+ messages in thread
From: Dave Pawson @ 2007-09-06  9:10 UTC (permalink / raw)
  To: emac

I guess it's there, but I couldn't find it.

I have a list of data
! H4
% E5
%CHG E5
() D4
(I) H2
(J) H3
+/- D2
, H2
->C E2
->cm F4
->DEG E4
->F E2
->gal G3
->HMS E3
->IN F4
->kg F2
->kM F3
->lb  F2
->MILE F3
->RAD E4
->| G3
/c H3
1/x C6
10^x c6
<- D5
<=ENG D3
= D2
[] D4
A A1
ABS D2
ACOS C2


I.e. not really simple text. I want to sort it alphabetically (ASCII based say),
and I can't find out how?


How do I do it please.
 I had to mail it to myself, open in a windows editor, sort it, then mail
it back to myself!

TIA

-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

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

* Re: Sort data in buffer.
       [not found] <mailman.407.1189069833.18990.help-gnu-emacs@gnu.org>
@ 2007-09-06  9:31 ` Thien-Thi Nguyen
  2007-09-06  9:49   ` Dave Pawson
       [not found]   ` <mailman.412.1189072188.18990.help-gnu-emacs@gnu.org>
  2007-09-06  9:33 ` David Kastrup
  1 sibling, 2 replies; 6+ messages in thread
From: Thien-Thi Nguyen @ 2007-09-06  9:31 UTC (permalink / raw)
  To: help-gnu-emacs

() "Dave Pawson" <dave.pawson@gmail.com>
() Thu, 6 Sep 2007 10:10:27 +0100

   I guess it's there, but I couldn't find it.

how did you search?

thi

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

* Re: Sort data in buffer.
       [not found] <mailman.407.1189069833.18990.help-gnu-emacs@gnu.org>
  2007-09-06  9:31 ` Thien-Thi Nguyen
@ 2007-09-06  9:33 ` David Kastrup
  1 sibling, 0 replies; 6+ messages in thread
From: David Kastrup @ 2007-09-06  9:33 UTC (permalink / raw)
  To: help-gnu-emacs

"Dave Pawson" <dave.pawson@gmail.com> writes:

> I guess it's there, but I couldn't find it.

[...]

> I.e. not really simple text. I want to sort it alphabetically (ASCII
> based say), and I can't find out how?

Huh?  Use the menu Help/Search Documentation/Find Commands by Name
and type "^sort" into it.  This spews out various sort commands.

>  I had to mail it to myself, open in a windows editor, sort it, then mail
> it back to myself!

Please take a look at the "Help" menu.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: Sort data in buffer.
  2007-09-06  9:10 Sort data in buffer Dave Pawson
@ 2007-09-06  9:48 ` Peter Dyballa
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Dyballa @ 2007-09-06  9:48 UTC (permalink / raw)
  To: Dave Pawson; +Cc: emac


Am 06.09.2007 um 11:10 schrieb Dave Pawson:

> I.e. not really simple text. I want to sort it alphabetically  
> (ASCII based say),
> and I can't find out how?

There are three functions:

	• sort-lines
	• sort-regexp-fields
	• shell-command-on-region, which offers to use some command (chain)  
from your system.

The second option seems to be the most promising: you can mask out  
characters or character classes before sorting the remains.

--
Greetings

   Pete

Never be led astray onto the path of virtue

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

* Re: Sort data in buffer.
  2007-09-06  9:31 ` Thien-Thi Nguyen
@ 2007-09-06  9:49   ` Dave Pawson
       [not found]   ` <mailman.412.1189072188.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Dave Pawson @ 2007-09-06  9:49 UTC (permalink / raw)
  To: Thien-Thi Nguyen; +Cc: help-gnu-emacs

On 06/09/07, Thien-Thi Nguyen <ttn@gnuvola.org> wrote:
> () "Dave Pawson" <dave.pawson@gmail.com>
> () Thu, 6 Sep 2007 10:10:27 +0100
>
>    I guess it's there, but I couldn't find it.
>
> how did you search?

Clearly not in the right place?
The O'Reilly book isn't much help, and the Linux  sort didn't do what I want.

David Kastrup said,
Use the menu Help/Search Documentation/Find Commands by Name
and type "^sort" into it.  This spews out various sort commands.

which gives me the sort I wanted. M-x sort-lines.

Perfect.
I wonder how many more corners there are to find in emacs :-)

Many thanks to you both.


regards




-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

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

* Re: Sort data in buffer.
       [not found]   ` <mailman.412.1189072188.18990.help-gnu-emacs@gnu.org>
@ 2007-09-06 10:32     ` Thien-Thi Nguyen
  0 siblings, 0 replies; 6+ messages in thread
From: Thien-Thi Nguyen @ 2007-09-06 10:32 UTC (permalink / raw)
  To: help-gnu-emacs

() "Dave Pawson" <dave.pawson@gmail.com>
() Thu, 6 Sep 2007 10:49:39 +0100

   > how did you search?

   Clearly not in the right place?
   The O'Reilly book isn't much help,
   and the Linux  sort didn't do what I want.

   the sort I wanted. M-x sort-lines.

   Perfect.

there's no need to go outside emacs in this case.
try typing:

 M-x apropos RET sort RET

you will see sort-lines (and lots of other stuff).

thi

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

end of thread, other threads:[~2007-09-06 10:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-06  9:10 Sort data in buffer Dave Pawson
2007-09-06  9:48 ` Peter Dyballa
     [not found] <mailman.407.1189069833.18990.help-gnu-emacs@gnu.org>
2007-09-06  9:31 ` Thien-Thi Nguyen
2007-09-06  9:49   ` Dave Pawson
     [not found]   ` <mailman.412.1189072188.18990.help-gnu-emacs@gnu.org>
2007-09-06 10:32     ` Thien-Thi Nguyen
2007-09-06  9:33 ` David Kastrup

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.