New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use sign using gpg (--gpg-sign=) had problem #1349
Comments
Can you please specify what version of Magit and Emacs are you running and on what OS? |
magit-version: magit-20140416.1539 Is need the other message of debug ? |
Does the error happen right after you chose the GPG key, when you press c, after saving the commit message, or at some other point? |
@afrepues The error was happen right after I chosed the GPG key, than that buffer is crash. |
I cannot reproduce this with either the If the problem persists, then please do |
I use last version on Melpa, magit-20140505.301 try again. Debugger entered--Lisp error: (wrong-type-argument stringp ("Kai-Yuan Cheng (superbil) <superbil@gmail.com>"))
propertize(("Kai-Yuan Cheng (superbil) <superbil@gmail.com>") face magit-key-mode-args-face)
#[(x) "\302\303\304�8\305\306\304�8 \307#\310\311##\207" [x magit-key-mode-current-args format "(%s) %s" 2 propertize gethash "" face magit-key-mode-args-face] 8](("=S" "Sign using gpg" "--gpg-sign=" magit-read-gpg-secret-key))
#[(x) "\306�@\307\310#��A@��\205����!�\311\312 \n\f\203��\313\202 �\314\f\206%�\314%�\306
\315�@#,\207" [x head desc maker more text propertize face magit-key-mode-button-face format " %s: %s%s%s" " " "" key-group-executor] 6](("=S" "Sign using gpg" "--gpg-sign=" magit-read-gpg-secret-key))
mapcar(#[(x) "\306�@\307\310#��A@��\205����!�\311\312 \n\f\203��\313\202 �\314\f\206%�\314%�\306
\315�@#,\207" [x head desc maker more text propertize face magit-key-mode-button-face format " %s: %s%s%s" " " "" key-group-executor] 6] (("=A" "Override the author" "--author=" read-from-minibuffer) ("=S" "Sign using gpg" "--gpg-sign=" magit-read-gpg-secret-key)))
magit-key-mode-draw-buttons("Args" (("=A" "Override the author" "--author=" read-from-minibuffer) ("=S" "Sign using gpg" "--gpg-sign=" magit-read-gpg-secret-key)) #[(x) "\302\303\304�8\305\306\304�8 \307#\310\311##\207" [x magit-key-mode-current-args format "(%s) %s" 2 propertize gethash "" face magit-key-mode-args-face] 8] t)
magit-key-mode-draw-args((("=A" "Override the author" "--author=" read-from-minibuffer) ("=S" "Sign using gpg" "--gpg-sign=" magit-read-gpg-secret-key)))
magit-key-mode-draw(committing)
magit-key-mode-redraw(committing)
magit-key-mode-add-argument(committing "--gpg-sign=" magit-read-gpg-secret-key)
(lambda nil (interactive) (magit-key-mode-add-argument (quote committing) "--gpg-sign=" (quote magit-read-gpg-secret-key)))()
ad-Orig-call-interactively((lambda nil (interactive) (magit-key-mode-add-argument (quote committing) "--gpg-sign=" (quote magit-read-gpg-secret-key))) nil nil)
call-interactively((lambda nil (interactive) (magit-key-mode-add-argument (quote committing) "--gpg-sign=" (quote magit-read-gpg-secret-key))) nil nil) |
Try |
I had another look at the code and cannot see how this could possibly happen. (I did however notice that the history variable was not actually used as intended, which I fixed.) Also I vaguely remember an issue similar to this one and that I then fixed. Are you sure you are using the Magit version you mentioned, maybe there is an old version laying around somewhere early on Also try |
@tarsius I checked it again, magit version is and I eval Debugger entered--Lisp error: (wrong-number-of-arguments (lambda (prompt) (let ((keys (mapcar (function (lambda (key) (list (epg-sub-key-id (car (epg-key-sub-key-list key))) (let ((id-obj (car (epg-key-user-id-list key))) (id-str nil)) (if id-obj (progn (setq id-str (epg-user-id-string id-obj)) (if (stringp id-str) id-str (epg-decode-dn id-obj)))))))) (epg-list-keys (epg-make-context epa-protocol) nil t)))) (magit-completing-read prompt keys nil t nil nil (or (car magit-gpg-secret-key-hist) (car keys))))) 0)
magit-read-gpg-secret-key()
eval((magit-read-gpg-secret-key))
pp-eval-expression((magit-read-gpg-secret-key))
ad-Orig-call-interactively(pp-eval-expression nil nil)
call-interactively(pp-eval-expression nil nil) |
That indeed is the |
What version of Emacs are you using? Maybe the return value of one of the |
@tarsius My Emacs version is when I eval |
Did you do that? Also don't forget to update Magit once more. |
I use Debugger entered--Lisp error: (wrong-number-of-arguments #[(prompt) "\304\305\306\307�!\310\311#\"�\312
\310\311\310\303�\206�� @&�)\207" [epa-protocol keys prompt magit-gpg-secret-key-hist mapcar #[(key) "\303\304�!@!\305�!@\306�\211�\205!�\307
!\211�;\203�� \202!�\310
!*D\207" [key id-str id-obj epg-sub-key-id epg-key-sub-key-list epg-key-user-id-list nil epg-user-id-string epg-decode-dn] 4] epg-list-keys epg-make-context nil t magit-completing-read] 8] 0)
magit-read-gpg-secret-key()
eval((magit-read-gpg-secret-key))
pp-eval-expression((magit-read-gpg-secret-key))
ad-Orig-call-interactively(pp-eval-expression nil nil)
call-interactively(pp-eval-expression nil nil) |
Do you actually have another key?
You forgot the mandatory PROMPT argument. |
Yea, that is a sub key. I had try use Oh, sorry about that I forgot the PROMPT argument, I make a clean |
I have just pushed cdf7e11 to make it possible to enter a subkey. Subkeys are not offered for completion but once you have manually entered such a subkey, it is available from the history, so this shouldn't be to inconvenient. |
I use
magit-key-mode-popup-committing
to popup commit menu, then use=S
to chose my gpg-key.After that, I got somethings wrong like this (from Message)
committing menu is not working again, It is broken.
my gpg key like this
The text was updated successfully, but these errors were encountered: