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

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

Re: How to setup default program to launch directory?


From: Emanuel Berg
Subject: Re: How to setup default program to launch directory?
Date: Sun, 17 Oct 2021 11:59:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

You can get the files of a directory like this.

Then sort by extension and have an association list get you
a program for that extension ...

Maybe?

(require 'seq)

(defun dir-common-files (&optional dir)
  "Get a list of all files in the working directory."
  (let*((all-files (directory-files (or dir default-directory)))
        (files     (seq-difference all-files '("." ".."))) )
    files) )
;; (dir-common-files)
-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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