github-review
github-review copied to clipboard
conflicts with `(setq diff-default-read-only t)`
because I have customized diff-default-read-only to t, I get this error when trying to start a review:
Got an error from the GitHub API (buffer-read-only #<buffer val-lang___val___161___4ad8b9e769361183b16ad534847a7cdcad3b50ea.diff>)!
This change to github-review-start-internal seems to make it stop.
(let ((inhibit-read-only t)) ;; <======== HERE (plus a closing paren)
(let-alist (-second-item x)
(github-review-save-diff
(a-assoc pr-alist 'sha .data.repository.pullRequest.headRef.target.oid)
(github-review-format-diff (-first-item x) .data.repository.pullRequest))))))
However, that inhibits editing the review, so you might want to (setq buffer-read-only nil) instead.
But the overall conflict is a little larger: when a diff buffer is in read-only mode, it has all kinds of friendly navigation keybindings, which get lost when you make the buffer R/W. github-review probably should not let me delete/alter lines in the diff hunks, and should keep the diff regions read-only.