diff options
author | Kyle Meyer <kyle@kyleam.com> | 2020-08-16 14:51:27 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2020-08-16 21:39:40 -0400 |
commit | 56314bc68e52464bf85784d759886798e1e446f0 (patch) | |
tree | ec24a387d765bda53062dd633c189fe7fc50fd2d | |
parent | ff3b7724a75427c8d73a9b80f9ee5057250479cd (diff) | |
download | piem-56314bc68e52464bf85784d759886798e1e446f0.tar.gz |
piem-inbox-coderepo-maybe-read: Reject invalid empty-string inbox
Message-Id: <20200816185130.32703-1-kyle@kyleam.com>
-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." |