Skip to content

Commit

Permalink
notmuch: Try harder to find GitHub patch URL
Browse files Browse the repository at this point in the history
Make spacemacs//notmuch-open-github-patch try harder to find a patch for
the pull request.
  • Loading branch information
Miciah authored and duianto committed May 5, 2019
1 parent 0969208 commit 0d6c568
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.develop
Original file line number Diff line number Diff line change
Expand Up @@ -1743,6 +1743,8 @@ Other:
- Use add-node-modules-path to automatically find local executables
(thanks to jupl)
- Disabled add-node-modules-path by default (thanks to Eivind Fonn)
**** Notmuch
- Try harder to find GitHub patch URL (thanks to Miciah Masters)
**** OCaml
- Allow initialization without requiring =opam= (thanks to Bernhard Schommer)
- Fixed misused functions, =merlin= is a package not a layer
Expand Down
4 changes: 3 additions & 1 deletion layers/+email/notmuch/funcs.el
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ messages in the current thread"
(goto-char (point-min))
(if (re-search-forward "https://github.com/.*\\.patch" nil t)
(match-string-no-properties 0)
(user-error "No patch found"))))))
(if (re-search-forward "https://github.com/[^/]+/[^/]+/pull/[0-9]+" nil t)
(concat (match-string-no-properties 0) ".patch")
(user-error "No patch found")))))))
(with-current-buffer (get-buffer-create
(generate-new-buffer-name "*mail-github-patch*"))
(condition-case exception
Expand Down

0 comments on commit 0d6c568

Please sign in to comment.