help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: operations on path lists


From: Jean Louis
Subject: Re: operations on path lists
Date: Sat, 4 Feb 2023 09:32:45 +0300
User-agent: Mutt/2.2.9+54 (af2080d) (2022-11-21)

* Samuel Wales <samologist@gmail.com> [2023-02-04 08:34]:
> suppose i do
> 
>   find . -iname '*foo*' -type d | sort

It is possible to use Emacs Lisp:

(sort 
 (delq nil 
       (mapcar
        (lambda (file)
          (cond ((file-directory-p file) (expand-file-name file))
                (t nil)))
        (directory-files-recursively 
         (expand-file-name "~/Documents/") ".*Q.*" t)))
       #'string<)

It would be better to have `directory-directories-recursively' function.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]