From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms12 with LMTPS id uHZJHjmAOV/FOwAAsNZ9tg (envelope-from ) for ; Sun, 16 Aug 2020 18:51:37 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id cJcfGjmAOV+sTQAA1q6Kng (envelope-from ) for ; Sun, 16 Aug 2020 18:51:37 +0000 Received: from pb-smtp2.pobox.com (pb-smtp2.pobox.com [64.147.108.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6F4A2940367 for ; Sun, 16 Aug 2020 18:51:36 +0000 (UTC) Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id B49E47C07A; Sun, 16 Aug 2020 14:51:34 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=sasl; bh=g1x0X0n75yD/El0xceCpPSkEV GM=; b=TiLQ5isvk11Z0W4UFBYL7nq6u0iQQHI0Buf50pQP4LhCeEfthnnOkqW0h n4IMo+c/j9S9b/Egd3x+W3zygbDDB0ZYPg3haO++u/gPYfzccJjmDYKePIImDXv1 ZKOr1mYmzFsAQ/fjBGdrUQbdTZ0+9CdOdiZB06JGvqIkCBu/H8= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id A5B2D7C079; Sun, 16 Aug 2020 14:51:34 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:subject:date:message-id:in-reply-to:references:mime-version:content-transfer-encoding; s=mesmtp; bh=nRNp/ywZnMB8ozVkyoXeMsGnb4UqxKVdAB0zBGUQjGk=; b=sqL3gveygDdUIcr251Fot/khmM9NLRbmLq5i+QU5gx7JMJS949AJ6xCfR/PBVZ8Wm9Zk5AOuEirAd4KU8iaXqz1hgXO1/gIk/oiQEGSX5ZLeD7bAooEca0H4deCui38V96UZAUhQ8GV6XoUcurqQGMTKEgB1ssKJi8W5csaj9zw= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id E84A77C078; Sun, 16 Aug 2020 14:51:33 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: piem@inbox.kyleam.com Subject: [PATCH v2 1/4] piem-inbox-coderepo-maybe-read: Reject invalid empty-string inbox Date: Sun, 16 Aug 2020 14:51:27 -0400 Message-Id: <20200816185130.32703-1-kyle@kyleam.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <877dty4eme.fsf@kyleam.com> References: <877dty4eme.fsf@kyleam.com> MIME-Version: 1.0 X-Pobox-Relay-ID: 816BE1FA-DFF1-11EA-8AE0-2F5D23BA3BAF-24757444!pb-smtp2.pobox.com Content-Transfer-Encoding: quoted-printable X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=pobox.com header.s=sasl header.b=TiLQ5isv; dkim=fail (body hash did not verify) header.d=kyleam.com header.s=mesmtp header.b=sqL3gvey; dmarc=none; spf=pass (aspmx1.migadu.com: domain of kyle@kyleam.com designates 64.147.108.71 as permitted sender) smtp.mailfrom=kyle@kyleam.com X-Spam-Score: 2.50 X-TUID: kq7eZrxnCuFM --- piem.el | 22 +++++++++++++--------- 1 file 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 @@ (defun piem-inbox-url () =20 (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))) =20 (defun piem-mid () "Return the current buffer's message ID." --=20 2.28.0