[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ELPA submission: python-import
From: |
Stefan Monnier |
Subject: |
Re: ELPA submission: python-import |
Date: |
Sun, 31 Jul 2022 06:46:22 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
> If the Augusto's propose features were to be added, then python.el would
> depend on project.el, at the very least because of this function:
>
> --8<---------------cut here---------------start------------->8---
> (defun python-import--project-files ()
> "Return a list of all Python files in the current project.
> If not in a project, just return the `default-directory'."
> (if-let (proj (project-current))
> (seq-filter (lambda (s) (string-suffix-p ".py" s))
> (project-files proj))
> default-directory))
> --8<---------------cut here---------------end--------------->8---
>
> (where btw. `string-suffix-p' could be replaced by
> `file-name-extension').
>
> The alternative would be to reimplement `project-files' in python.el,
> but I would consider that an undesirable duplication of effort that
> would most likely not do what the user would want.
The package doesn't need to depend on `project`: the code can simply
signal an error if project is not available.
Stefan
- Re: ELPA submission: python-import, (continued)
Re: ELPA submission: python-import, Richard Stallman, 2022/07/30