From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:267::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms12 with LMTPS id IAKDD5HjGWA2BAAAsNZ9tg (envelope-from ) for ; Tue, 02 Feb 2021 23:43:13 +0000 Received: from out0.migadu.com ([2001:41d0:2:267::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id uGzDA4/jGWB8bQAA1q6Kng (envelope-from ) for ; Tue, 02 Feb 2021 23:43:11 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1612309390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jNZ1ONZ5s95B9RxZUMhnEKzBk1YQkdp795DXG1d5+os=; b=eZrojOujcCWuAGRSC0FqdJRcpQDFLVDulS+0uu2zBGG9QDSm8gepUdFdRxj9KORW+Rxtl3 yHnQcRKa69bMT1Y4hRPExiTBU0lga2vAkGiUf01wnRSNqebTP6G3IRsZmsH19NkqnO59OC 1YuLZXVw5eQhVsaXRkkCfjkJtQuNpoxJo8avgYclGBcAOxfc71n1lnkwVYIFutMr8kMAL8 SSC/3QJ4gZCJmwWh3g9Wsj6mb08tc4+GIaQq6hGqjm4fGMHX0LA2944niVhdbOAAi2Zla9 S/Tl7Ruj8zVdvFzCQbJ4aM49/7pxx/gmOvpT+4RTEn0BK7kS9LYXA+9AeQqfeA== From: Kyle Meyer To: Xinglu Chen Cc: piem@inbox.kyleam.com Subject: Re: [PATCH] piem-inbox-coderepo-maybe-read: Support project.el In-Reply-To: <8ce1733ac0d0f63622d9060015949f31ce83d6ee.1612294275.git.public@yoctocell.xyz> References: <8ce1733ac0d0f63622d9060015949f31ce83d6ee.1612294275.git.public@yoctocell.xyz> Date: Tue, 02 Feb 2021 18:43:08 -0500 Message-ID: <87lfc6xchf.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: kyle@kyleam.com X-TUID: SO04ru9OHYDC 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))