Lugaru's Epsilon
Programmer's
Editor 14.04

Context:
Epsilon User's Manual and Reference
   Commands by Topic
      Changing Text
         . . .
         Regular Expressions
            Entering Special Characters
            Character Classes
            Regular Expression Examples
            . . .
            Regular Expression Commands
         Rearranging
            Sorting
            Comparing By Lines
            Transposing
            . . .
         Indenting Commands
         . . .

Previous   Up    Next
Regular Expression Commands  Commands by Topic   Comparing By Lines


Epsilon User's Manual and Reference > Commands by Topic > Changing Text > Rearranging >

Sorting

Epsilon provides several commands to sort buffers, or parts of buffers.

The sort-buffer command lets you sort the lines of the current buffer. The command asks for the name of a buffer in which to place the sorted output. The sort-region command sorts the part of the current buffer between point and mark, in place. The commands reverse-sort-buffer and reverse-sort-region operate like the above commands, but reverse the sorting order.

By default, all the sorting commands sort the lines by considering all the characters in the line. If you prefix a numeric argument of n to any of these commands, they will compare lines starting at column n.

When comparing lines of text during sorting, Epsilon normally folds lower case letters to upper case before comparison, if the case-fold variable has a nonzero value. If the case-fold variable has a value of 0, Epsilon compares characters as-is. However, setting the buffer-specific sort-case-fold variable to 0 or 1 overrides the case-fold variable, for sorting purposes. By default, sort-case-fold has a value of 2, which means to defer to case-fold.

Standard bindings:

    sort-buffer
   sort-region
   reverse-sort-buffer
   reverse-sort-region
 



Previous   Up    Next
Regular Expression Commands  Commands by Topic   Comparing By Lines


Lugaru Epsilon Programmer's Editor 14.04 manual. Copyright (C) 1984, 2021 by Lugaru Software Ltd. All rights reserved.