From: Kyle Meyer <firstname.lastname@example.org>
To: Xinglu Chen <email@example.com>
Subject: Re: [PATCH] Support reading directory using project.el
Date: Mon, 01 Feb 2021 21:59:07 -0500 [thread overview]
Message-ID: <firstname.lastname@example.org> (raw)
Thanks for the patch. I started using projectile before project.el
existed and haven't had any motivation to explore project.el or other
options, so this is very much appreciated.
Xinglu Chen writes:
> Since Emacs 28, project.el is built-in package that offers similar
> functionality to projectile. It is also available on GNU ELPA.
Hmm, project.el has existed longer than that, I think.
lisp/progmodes/project.el has been in the Emacs repo since 2015 and was
part of the Emacs 25 release. However, if I recall correctly, it's a
bit of a moving target in terms of variable/function names.
> * piem.el (piem-inbox-coderepo-maybe-read): Add support for reading
> directory using project.el.
Sorry, no changelog entries allowed in this code base :) You could map
the gist of that onto the subject, though. Something like
piem-inbox-coderepo-maybe-read: Support project.el
> diff --git a/piem.el b/piem.el
> index 7b198d1..f6458f9 100644
> --- a/piem.el
> +++ b/piem.el
> @@ -372,6 +372,9 @@ (defun piem-inbox-coderepo-maybe-read ()
> (when-let ((current (and (fboundp 'projectile-project-root)
> (abbreviate-file-name current)))))
> + (and (bound-and-true-p project--list)
> + (expand-file-name
> + (project-prompt-project-dir)))
I'd prefer to avoid inspecting a -- symbol if possible. Maybe a good
indicator that project.el should be used is if project-list-file is
bound and the file it points to exists.
Also, `make compile' gives the following warning:
piem.el:788:1:Warning: the function ‘project-prompt-project-dir’ is not known
to be defined.
You can squelch that with
Both project-prompt-project-dir and project-list-file won't be available
until the Emacs 28 release, but, as you mention, project.el is on ELPA
too, so I think it's fine to be forward-looking here.
next prev parent reply other threads:[~2021-02-02 2:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-01 20:47 [PATCH] Support reading directory using project.el Xinglu Chen
2021-02-02 2:59 ` Kyle Meyer [this message]
2021-02-02 23:45 ` Kyle Meyer
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:
List information: https://git.kyleam.com/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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
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).