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:

Changed line 51 from:
[[!Emacs]] [[!textprocessing]]
January 31, 2014, at 11:22 AM by OtherMichael -
Added line 45:
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



(:source lang=lisp:)
(defun sort-lines-nocase ()
  (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

(: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)))

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