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: Jean Louis
Subject: Re: How to setup default program to launch directory?
Date: Sun, 17 Oct 2021 21:58:29 +0300
User-agent: Mutt/2.0.7+183 (3d24855) (2021-05-28)

* Emanuel Berg via Users list for the GNU Emacs text editor 
<help-gnu-emacs@gnu.org> [2021-10-17 13:01]:
> 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)

If I can add that to `dired-guess-shell-alist-user' then yes. Did you
use it there? I want to add function in that variable.


-- 
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]