emacs-devel
[Top][All Lists]
Advanced

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

Re: ELPA submission: python-import


From: Philip Kaludercic
Subject: Re: ELPA submission: python-import
Date: Sun, 31 Jul 2022 11:26:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > I am not saying it isn't impossible, but if there is a dependency on
>   > project.el, it might make sense to raise the minimum version of ELPA's
>   > python.el?
>
> Is it necessary for any of these python files depend on project.el?
> If these features such as python-import  are added to python.el,
> doesn't it eliminate the need for that?

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.



reply via email to

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