diff options
-rw-r--r-- | piem.el | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -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." |