From 3b7f29d64de1c4796b97764adcbabea694a1f2ea Mon Sep 17 00:00:00 2001 From: Xinglu Chen Date: Mon, 25 Jan 2021 10:16:38 +0100 Subject: git-email: Don’t assume cwd to be a project MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the problem of trying to send a patch that is not in a version controlled directory. Thank you Protesilaos for pointing this out in id:87wnw2m5zm.fsf@protesilaos.com. * git-email.el (git-email--compose-email): Remove local binding for ‘default-directory’. --- git-email.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'git-email.el') diff --git a/git-email.el b/git-email.el index 2aa24fc..9bbad13 100644 --- a/git-email.el +++ b/git-email.el @@ -229,8 +229,7 @@ If the header is not found, return an empty string." "Given a PATCH-FILE, compose an email. Extracts the relevant headers and the diff from the PATCH-FILE and inserts them into the message buffer." - (let* ((default-directory (cdr (project-current))) - (headers (git-email--extract-headers patch-file)) + (let* ((headers (git-email--extract-headers patch-file)) ;; Remove empty headers. (used-headers (seq-filter (lambda (header) -- cgit v1.2.3