discussion and development of piem
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Xinglu Chen <public@yoctocell.xyz>
Cc: piem@inbox.kyleam.com
Subject: Re: [PATCH] piem-inbox-coderepo-maybe-read: Support project.el
Date: Tue, 02 Feb 2021 18:43:08 -0500	[thread overview]
Message-ID: <87lfc6xchf.fsf@kyleam.com> (raw)
In-Reply-To: <8ce1733ac0d0f63622d9060015949f31ce83d6ee.1612294275.git.public@yoctocell.xyz>

Xinglu Chen writes:

> diff --git a/piem.el b/piem.el
> index 7b198d1..b07c4f3 100644
> --- a/piem.el
> +++ b/piem.el
> @@ -372,6 +372,11 @@ (defun piem-inbox-coderepo-maybe-read ()
>                      (when-let ((current (and (fboundp 'projectile-project-root)
>                                               (projectile-project-root))))
>                        (abbreviate-file-name current)))))
> +             (and (bound-and-true-p project-list-file)
> +                  (file-exists-p project-list-file)
> +                  (expand-file-name
> +                   (when (fboundp 'project-prompt-project-dir)
> +                     (project-prompt-project-dir))))

Untested on my end, but looks good.  I've moved the fboundp call above
expand-file-name (diff below).  That's mostly just a cosmetic
preference, though if project-prompt-project-dir were ever
dropped/renamed, it'd also prevent a type error by avoiding
(expand-file-name nil).

Pushed (c468c6b).  Thanks!

diff --git a/piem.el b/piem.el
index b07c4f3..99c1937 100644
--- a/piem.el
+++ b/piem.el
@@ -374,9 +374,9 @@ (defun piem-inbox-coderepo-maybe-read ()
                       (abbreviate-file-name current)))))
              (and (bound-and-true-p project-list-file)
                   (file-exists-p project-list-file)
+                  (fboundp 'project-prompt-project-dir)
                   (expand-file-name
-                   (when (fboundp 'project-prompt-project-dir)
-                     (project-prompt-project-dir))))
+                   (project-prompt-project-dir)))
              (and piem-use-magit
                   (fboundp 'magit-read-repository)
                   (magit-read-repository))


      parent reply	other threads:[~2021-02-02 23:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02 19:32 [PATCH] piem-inbox-coderepo-maybe-read: Support project.el Xinglu Chen
2021-02-02 19:45 ` Xinglu Chen
2021-02-02 23:42   ` Kyle Meyer
2021-02-02 23:43 ` Kyle Meyer [this message]

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://git.kyleam.com/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lfc6xchf.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=piem@inbox.kyleam.com \
    --cc=public@yoctocell.xyz \
    /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.kyleam.com/piem/

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).