Emacs.Sorting History

Hide minor edits - Show changes to output - Cancel

 
 
February 18, 2014, at 10:16 AM by MichaelPaulukonis -
Changed lines 3-5 from:
to:
[[EmacsWiki:SortWords]]

Changed line 51 from:
[[!Emacs]]
to:
[[!Emacs]] [[!textprocessing]]
 
 
January 31, 2014, at 11:22 AM by OtherMichael -
Added line 45:
[[RegularExpressions]]
 
 
January 31, 2014, at 10:54 AM by OtherMichael -
Added lines 3-42:

!! Case insensitive [@sort-lines@] in emacs.

(:source lang=text:)
M-x set-variable [RETURN] sort-fold-case [RETURN] t [RETURN]
M-x sort-lines
(:sourceend:)

->([[http://heyrod.com/snippet/s/emacs-case-insensitive-sort.html|source]])


also:

(:source lang=lisp:)
(defun sort-lines-nocase ()
  (interactive)
  (let ((sort-fold-case t))
    (call-interactively 'sort-lines)))
(:sourceend:)

->([[http://stackoverflow.com/a/20967895/41153|source]])

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


!! sort by "rhyme" -- really, by word-endings

(:source lang=text:)
(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)))
(:sourceend:)

See [[http://www.xradiograph.com/interference/2012/05/31/rhymers-gonna-rhyme-art/|my original blog post]] for examples

 
 
August 31, 2009, at 11:29 AM by OtherMichael -
Added lines 1-8:
!! General
[[http://curiousprogrammer.wordpress.com/2009/08/31/sorting-records-with-emacs/|Sorting Records With Emacs]]

!! See Also


!! Tags
[[!Emacs]]