Code Monkey home page Code Monkey logo

Comments (8)

tarsius avatar tarsius commented on June 4, 2024 5

A quick draft is in #62.

from evil-magit.

bmag avatar bmag commented on June 4, 2024 1

Found modifying-existing-transients in Transient's manual (also available via info after installing Transient).

from evil-magit.

Silex avatar Silex commented on June 4, 2024

@tarsius: maybe you could give hints about what needs to be done.

So far I see obvious things like removing -popup everywhere relevant (e.g https://github.com/emacs-evil/evil-magit/blob/master/evil-magit.el#L532-L549).

from evil-magit.

justbur avatar justbur commented on June 4, 2024

I'll have to fix the popups later, but at least the current version of evil-magit will work now.

from evil-magit.

bmag avatar bmag commented on June 4, 2024

#63 should fix most of the remapping, but not anything forge-related (i.e. "push" and "pull" remapping). Mostly untested, but seems to work for me.

from evil-magit.

bmag avatar bmag commented on June 4, 2024

Most of the changes are of the sort:

;; old
(magit-change-popup-key 'magit-tag-popup :actions (string-to-char "k") (string-to-char "x"))
;; new
(transient-suffix-put 'magit-tag "k" :key "x")

But I'm not sure about the "revert" remapping. It contains "V" twice, and it isn't clear how to distinguish them anymore, so I just call transient-suffix-put twice (1st time catches the 1st "V", 2nd time catches the 2nd "V" because 1st isn't "V" anymore at this point):

;; old
(magit-change-popup-key 'magit-revert-popup :actions (string-to-char "V") (string-to-char "O"))
(magit-change-popup-key 'magit-revert-popup :sequence-actions (string-to-char "V") (string-to-char "O"))
;; new
(transient-suffix-put 'magit-revert "V" :key "O")
(transient-suffix-put 'magit-revert "V" :key "O")

@tarsius is there a better way?

For reference, magit-revert definition:

;;;###autoload (autoload 'magit-revert "magit-sequence" nil t)
(define-transient-command magit-revert ()
  "Revert existing commits, with or without creating new commits."
  :man-page "git-revert"
  :value '("--edit")
  ["Arguments"
   :if-not magit-sequencer-in-progress-p
   (magit-cherry-pick:--mainline)
   ("-e" "Edit commit message"       ("-e" "--edit"))
   ("-E" "Don't edit commit message" "--no-edit")
   ("=s" magit-merge:--strategy)
   ("-s" "Add Signed-off-by lines"   ("-s" "--signoff"))
   (5 magit:--gpg-sign)]
  ["Actions"
   :if-not magit-sequencer-in-progress-p
   ("V" "Revert commit(s)" magit-revert-and-commit)
   ("v" "Revert changes"   magit-revert-no-commit)]
  ["Actions"
   :if magit-sequencer-in-progress-p
   ("V" "Continue" magit-sequencer-continue)
   ("s" "Skip"     magit-sequencer-skip)
   ("a" "Abort"    magit-sequencer-abort)])

from evil-magit.

tarsius avatar tarsius commented on June 4, 2024

is there a better way?

Not yet. The plan is to support "paths" (a list of integers, i.e. a position in the tree) as LOC (which is why that argument isn't called just KEY).

from evil-magit.

tarsius avatar tarsius commented on June 4, 2024

Oh, actually there is. LOC can also be a command.

from evil-magit.

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.