M-x set-variable [RETURN] sort-fold-case [RETURN] t [RETURN]
M-x sort-lines
On this page... (hide)
General
Sorting Records With Emacs
EmacsWiki:SortWords
Case insensitive sort-lines
in emacs.
(source)
also:
(defun sort-lines-nocase ()
(interactive)
(let ((sort-fold-case t))
(call-interactively 'sort-lines)))
(interactive)
(let ((sort-fold-case t))
(call-interactively 'sort-lines)))
(source)
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)))
(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
Tags
Comments
No comments yet.
Add Comment