diff --git a/github-review.el b/github-review.el index f0108ee..032f431 100644 --- a/github-review.el +++ b/github-review.el @@ -329,7 +329,10 @@ ACC is an alist accumulating parsing state." (erase-buffer) (insert diff) (save-buffer) - (github-review-mode))) + (github-review-mode) + ;; Use `C-c C-c' in diff-mode to go to source code + (setq default-directory forge-current-dir) + (goto-char (point-min)))) (defun github-review-parsed-review-from-current-buffer () "Return a code review given the current buffer containing a diff." @@ -508,10 +511,12 @@ Github API provides only the originalPosition in the query.") (if (not (forge-pullreq-p pullreq)) (message "We can only review PRs at the moment. You tried on something else.") - (github-review-start-internal (a-alist 'owner (oref repo owner) - 'repo (oref repo name) - 'apihost (oref repo apihost) - 'num (oref pullreq number)))))) + (progn + (setq forge-current-dir default-directory) + (github-review-start-internal (a-alist 'owner (oref repo owner) + 'repo (oref repo name) + 'apihost (oref repo apihost) + 'num (oref pullreq number))))))) ;;;###autoload (defun github-review-start (url)