summaryrefslogtreecommitdiff
path: root/piem.el
diff options
context:
space:
mode:
Diffstat (limited to 'piem.el')
-rw-r--r--piem.el22
1 files changed, 13 insertions, 9 deletions
diff --git a/piem.el b/piem.el
index 6a3c2b3..55915f6 100644
--- a/piem.el
+++ b/piem.el
@@ -292,15 +292,19 @@ intended to be used by libraries implementing a function for
(defun piem-inbox-coderepo-maybe-read ()
"Like `piem-inbox-coderepo', but fall back to reading the repo."
- (or (piem-inbox-coderepo)
- (and (fboundp 'projectile-relevant-known-projects)
- (completing-read
- "Project: "
- (projectile-relevant-known-projects)))
- (and piem-use-magit
- (fboundp 'magit-read-repository)
- (magit-read-repository))
- (read-directory-name "Git repository: ")))
+ (let ((inbox
+ (or (piem-inbox-coderepo)
+ (and (fboundp 'projectile-relevant-known-projects)
+ (completing-read
+ "Project: "
+ (projectile-relevant-known-projects)))
+ (and piem-use-magit
+ (fboundp 'magit-read-repository)
+ (magit-read-repository))
+ (read-directory-name "Git repository: "))))
+ (if (equal inbox "")
+ (user-error "No inbox specified")
+ inbox)))
(defun piem-mid ()
"Return the current buffer's message ID."