From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Philip Kaludercic <philip.kaludercic@fau.de>
Cc: Richard Stallman <rms@gnu.org>, arstoffel@gmail.com, emacs-devel@gnu.org
Subject: Re: ELPA submission: python-import
Date: Sun, 31 Jul 2022 06:46:22 -0400 [thread overview]
Message-ID: <jwvczdlsgq6.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87mtcpvdj2.fsf@fau.de> (Philip Kaludercic's message of "Sun, 31 Jul 2022 11:26:25 +0200")
> 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
next prev parent reply other threads:[~2022-07-31 10:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-29 14:15 ELPA submission: python-import Augusto Stoffel
2022-07-29 15:18 ` Eli Zaretskii
2022-07-29 15:35 ` Augusto Stoffel
2022-07-29 16:25 ` Stefan Monnier
2022-07-30 8:56 ` Augusto Stoffel
2022-07-31 3:28 ` Richard Stallman
2022-07-31 9:08 ` Augusto Stoffel
2022-07-29 15:53 ` Philip Kaludercic
2022-07-30 9:07 ` Augusto Stoffel
2022-07-30 9:12 ` Visuwesh
2022-07-30 11:14 ` Augusto Stoffel
2022-07-30 11:58 ` Philip Kaludercic
2022-07-30 19:01 ` Augusto Stoffel
2022-07-31 9:22 ` Philip Kaludercic
2022-07-31 3:32 ` Richard Stallman
2022-07-31 9:20 ` Augusto Stoffel
2022-07-31 9:26 ` Philip Kaludercic
2022-07-31 10:46 ` Stefan Monnier [this message]
2022-07-31 3:28 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvczdlsgq6.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=arstoffel@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=philip.kaludercic@fau.de \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).