[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is there a function to sort file names by file version number, like
From: |
Pascal J. Bourguignon |
Subject: |
Re: Is there a function to sort file names by file version number, like "ls -v"? |
Date: |
Thu, 23 May 2013 22:18:33 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
florian@fsavigny.de (Florian v. Savigny) writes:
> Hi Sean,
>
> thanks so much for being so helpful!
>
> > I don't think so, but it's easy to write one:
>
> You call that easy ... I'm wondering how long it took you? In any
> case, I honestly admire you. (It only ever LOOKS easy when I try, but
> it always ends up being complicated.)
>
> > (defun versioned-filename-lessp (a b)
> > (labels ((parse (str)
>
> I was wondering about these two functions, "labels" and "parse", but
> emacs does not seem to know them either. Are you assuming that some
> library is loaded, maybe? (I am using Emacs 24.3.1.)
Sure: (require 'cl) should be the first line of all ~/.emacs files.
--
__Pascal Bourguignon__ http://www.informatimago.com/
A bad day in () is better than a good day in {}.
You can take the lisper out of the lisp job, but you can't take the lisp out
of the lisper (; -- antifuchs