Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pivaldi/nefle
Emacs package to search the nearest file from a given file-system location
https://github.com/pivaldi/nefle
Last synced: 15 days ago
JSON representation
Emacs package to search the nearest file from a given file-system location
- Host: GitHub
- URL: https://github.com/pivaldi/nefle
- Owner: pivaldi
- License: gpl-3.0
- Created: 2024-09-11T17:31:58.000Z (2 months ago)
- Default Branch: master
- Last Pushed: 2024-09-12T01:13:37.000Z (2 months ago)
- Last Synced: 2024-09-12T10:55:09.404Z (2 months ago)
- Language: Emacs Lisp
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
#+title: NeFle
[[https://github.com/pivaldi/nefle][NeFle]] is an Emacs package to search the
"nearest" file from a given file-system location.* Feature
- ~(nefle-get-up-dir-containing-file "plop.txt")~ returns the first directory
containing the file =plop.txt= traversing up the directory +tree+ from the
default directory to the root directory.
- ~(nefle-get-up-dir-containing-file "plop.txt" "/from/this/dir/")~ the same behavior
of previous but starting from the directory =/from/this/dir/=.
- ~(nefle-get-up-dir-containing-file "plop.txt" "/from/this/dir/" "/form")~ the same
behavior of previous but stop searching above =/from/=.If called interactively, ask for the file-name to search and, if found, open the
first directory containing the file.* Example of Usage
** Compiling with upward Makefile
Key binding for compiling from any sub-directory relative to an
upward Makefile.#+begin_src lisp
(global-set-key
[f9] (lambda ()
(interactive)
(compile
(format "make -f %sMakefile"
(nefle-get-up-dir-containing-file "Makefile")))))
#+end_src* TODO Todo
- Write the same feature traversing up all the directories' tree.
- Write the same feature for the "nearest" downward file.
- Sugar function to return a file instead of a directory.
- Function that admit a numeric parameter "max up level" instead of a directory.