General

Sorting Records With Emacs
EmacsWiki:SortWords

 

 

Case insensitive sort-lines in emacs.

 

M-x set-variable [RETURN] sort-fold-case [RETURN] t [RETURN]
M-x sort-lines

 

 

 

also:

 

(defun sort-lines-nocase ()
  (interactive)
  (let ((sort-fold-case t))
    (call-interactively 'sort-lines)))

 

 

This suggests another function that takes an optional (M-u) arg to sort insensitively...

 

 

sort by “rhyme” -- really, by word-endings

 

(setq words "haters gonna hate....")
(apply 'string (reverse (string-to-list words)))
delete quotes
select region
M-x sort-lines
add quotes
setq words
(apply 'string (reverse (string-to-list words)))

 

See my original blog post for examples

 

 

See Also

RegularExpressions

 

 

Tags

Emacs textprocessing


 

Comments

No comments yet.

 

 

Add Comment

Heading:
 Your Message
 
 Enter value ← Have you entered the code number?
Author: