Giter VIP home page Giter VIP logo

Comments (3)

charignon avatar charignon commented on June 1, 2024

Have you tried https://github.com/mgalgs/diffview-mode? Essentially the review is a .diff file and this should work out of the box.

from github-review.

rakanalh avatar rakanalh commented on June 1, 2024

Nice! Thank you for that suggestion.

For those looking for the same thing, i've been able to configure it with scroll-all-mode as such:

(use-package diffview
  :config
  ;; scroll-all-mode doesn't work with mouse.
  ;; WORKAROUND: https://www.emacswiki.org/emacs/ScrollAllMode
  (defun mwheel-scroll-all-function-all (func &optional arg)
    (if (and scroll-all-mode arg)
        (save-selected-window
          (walk-windows
           (lambda (win)
             (select-window win)
             (condition-case nil
                 (funcall func arg)
               (error nil)))))
      (funcall func arg)))

  (defun mwheel-scroll-all-scroll-up-all (&optional arg)
    (mwheel-scroll-all-function-all 'scroll-up arg))

  (defun mwheel-scroll-all-scroll-down-all (&optional arg)
    (mwheel-scroll-all-function-all 'scroll-down arg))

  (setq mwheel-scroll-up-function 'mwheel-scroll-all-scroll-up-all)
  (setq mwheel-scroll-down-function 'mwheel-scroll-all-scroll-down-all)
  ;; Activate scoll-all-mode when in diffview mode
  (add-hook 'diffview-mode (lambda() (scroll-all-mode)))
  )

So triggering M-x diffview-current in the diff-file should activate diffview mode with scroll-all & mouse support.

from github-review.

agzam avatar agzam commented on June 1, 2024

what about ediff? Is there a similar trick to make it work with ediff? Afaik magit when pressed e on a diff, opens ediff buffer at that hunk location, maybe something similar would be possible here as well?

from github-review.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.