* Inconsistency between `mml2015-use' and `mml2015-verify-function'
@ 2011-08-25 12:49 XeCycle
2011-08-25 20:45 ` Daiki Ueno
0 siblings, 1 reply; 11+ messages in thread
From: XeCycle @ 2011-08-25 12:49 UTC (permalink / raw)
To: ding
[-- Attachment #1: Type: text/plain, Size: 655 bytes --]
I have these lines in my ~/.gnus.el for OpenPGP signature verifying,
however, it doesn't work.
> (require 'epa)
> (require 'epg)
> (require 'epg-config)
> (setq mml2015-use 'epg)
I checked variable `mml2015-use' and it's `epg', however the variable
`mml2015-verify-function' is `mailcrypt-verify'.
Well, this problem have been bothering me for a long time, I guess it's
a configuration issue? Do I need to change the variable myself? I
believe it isn't wanted.
--
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Inconsistency between `mml2015-use' and `mml2015-verify-function'
2011-08-25 12:49 Inconsistency between `mml2015-use' and `mml2015-verify-function' XeCycle
@ 2011-08-25 20:45 ` Daiki Ueno
2011-08-26 1:42 ` XeCycle
0 siblings, 1 reply; 11+ messages in thread
From: Daiki Ueno @ 2011-08-25 20:45 UTC (permalink / raw)
To: XeCycle; +Cc: ding
XeCycle <xecycle@gmail.com> writes:
> I have these lines in my ~/.gnus.el for OpenPGP signature verifying,
> however, it doesn't work.
>
>> (require 'epa)
>> (require 'epg)
>> (require 'epg-config)
>> (setq mml2015-use 'epg)
Well, how does it not work? I have the following settings in addition:
~/.gnus:
(setq gnus-buttonized-mime-types '("multipart/signed")
mm-verify-option 'always)
~/.gnupg/gpg.conf:
keyserver-options auto-key-retrieve
keyserver hkp://keys.gnupg.net
and it successfully verifies your signature.
You could try (setq epg-debug t) and inspect " *epg-debug*" buffer (note
the first letter is a space), if the problem seems to be in EPG itself.
> I checked variable `mml2015-use' and it's `epg', however the variable
> `mml2015-verify-function' is `mailcrypt-verify'.
>
> Well, this problem have been bothering me for a long time, I guess it's
> a configuration issue? Do I need to change the variable myself? I
> believe it isn't wanted.
This shouldn't be a problem since the variable is only referred to from
`mml2015-mailcrypt-verify', which wouldn't be called when mml2015-use is
'epg. I agree that the variable name is a bit misleading though.
Regards,
--
Daiki Ueno
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Inconsistency between `mml2015-use' and `mml2015-verify-function'
2011-08-25 20:45 ` Daiki Ueno
@ 2011-08-26 1:42 ` XeCycle
2011-08-26 2:00 ` Daiki Ueno
0 siblings, 1 reply; 11+ messages in thread
From: XeCycle @ 2011-08-26 1:42 UTC (permalink / raw)
To: ding
[-- Attachment #1: Type: text/plain, Size: 6340 bytes --]
Daiki Ueno <ueno@unixuser.org> writes:
> XeCycle <xecycle@gmail.com> writes:
>
>> I have these lines in my ~/.gnus.el for OpenPGP signature verifying,
>> however, it doesn't work.
[...]
> Well, how does it not work? I have the following settings in addition:
>
> ~/.gnus:
>
> (setq gnus-buttonized-mime-types '("multipart/signed")
> mm-verify-option 'always)
>
> ~/.gnupg/gpg.conf:
>
> keyserver-options auto-key-retrieve
> keyserver hkp://keys.gnupg.net
>
> and it successfully verifies your signature.
Indeed I have more:
(require 'epa)
(setq mml2015-use 'epg)
(setq epg-debug t)
;; (require 'pgg)
;; (setq mml2015-use 'pgg)
(setq mm-verify-option 'known
mm-decrypt-option 'known
gnus-treat-x-pgp-sig t
gnus-buttonized-mime-types '("multipart/alternative"
"multipart/encrypted"
"multipart/signed"))
With PGG, it worked fine. However it'll inform me of PGG being
deprecated in favour of EasyPG, but EasyPG doesn't work for me.
> You could try (setq epg-debug t) and inspect " *epg-debug*" buffer (note
> the first letter is a space), if the problem seems to be in EPG itself.
I did, but it seems useless.
This is the debug trace when I try to display a signed message:
> Debugger entered--Lisp error: (wrong-number-of-arguments #[(target old new) "\303\b
> #\207" [old new target replace-regexp-in-string] 4] 4)
> mm-replace-in-string("\ntest encrypt.\n" "\n" "\n" t)
> byte-code("\306\307\211\211\211\211\x19^[\x1d\310\x1d\311\312\313\x1d@#\206\0\314\306#\211\203.\315\x1eA\314\307\306$\211\204R\x0e\x1f\316\317 !\211\x1e\205J\320\312\x1e@G! \x1e@%+\210\321\322\x1e\"\210\323 \324\325\306$\326\b!\327 \322\330\331\217\210\x1f\316\332\333\f\334\"! !\211\x1e\205\206\320\312\x1e@G! \x1e@%+\210\x1e.\207" [signature part signature-file plain context inhibit-redisplay t nil mm-find-raw-part-by-type get-text-property 0 protocol "application/pgp-signature" mm-find-part-by-type gnus-info "Corrupted" put-text-property throw error mm-replace-in-string "\n" "\n" mm-get-part epg-make-context (byte-code "\304\b \n#\304\207" [context signature part plain epg-verify-string] 4) ((error (byte-code "\b\305\306\x1a\211\205\0\307\310\v@G\n \v@%+\210\f@\311=\2036\b\312\313\x1a\211\2051\307\310\v@G\n \v@%+\210\202N\b\312\314\f!\x1a\211\205L\307\310\v@G\n \v@%+\210\315\304\v\"\207" [mm-security-handle value parameter handle error gnus-info "Failed" put-text-property 0 quit gnus-details "Quit." mml2015-format-error throw] 7))) epg-verify-result-to-string epg-context-result-for verify ctl handle mm-security-handle value parameter] 7)
> mml2015-epg-verify(((#<buffer *mm*<6>> ("text/plain") nil nil nil nil nil nil) (#<buffer *mm*<7>> ("application/pgp-signature") nil nil nil nil nil nil)) (#("multipart/signed" 0 16 (protocol "application/pgp-signature" micalg "pgp-sha1" boundary "=-=-=" buffer #<buffer *mm*<5>> from "xecycle@gmail.com" start nil)) (protocol . "application/pgp-signature") (micalg . "pgp-sha1") (boundary . "=-=-=")))
> mml2015-verify(((#<buffer *mm*<6>> ("text/plain") nil nil nil nil nil nil) (#<buffer *mm*<7>> ("application/pgp-signature") nil nil nil nil nil nil)) (#("multipart/signed" 0 16 (protocol "application/pgp-signature" micalg "pgp-sha1" boundary "=-=-=" buffer #<buffer *mm*<5>> from "xecycle@gmail.com" start nil)) (protocol . "application/pgp-signature") (micalg . "pgp-sha1") (boundary . "=-=-=")))
> mm-possibly-verify-or-decrypt(((#<buffer *mm*<6>> ("text/plain") nil nil nil nil nil nil) (#<buffer *mm*<7>> ("application/pgp-signature") nil nil nil nil nil nil)) (#("multipart/signed" 0 16 (protocol "application/pgp-signature" micalg "pgp-sha1" boundary "=-=-=" buffer #<buffer *mm*<5>> from "xecycle@gmail.com" start nil)) (protocol . "application/pgp-signature") (micalg . "pgp-sha1") (boundary . "=-=-=")) "xecycle@gmail.com")
> mm-dissect-multipart((#("multipart/signed" 0 16 (protocol "application/pgp-signature" micalg "pgp-sha1" boundary "=-=-=" buffer #<buffer *mm*<5>> from "xecycle@gmail.com" start nil)) (protocol . "application/pgp-signature") (micalg . "pgp-sha1") (boundary . "=-=-=")) "xecycle@gmail.com")
> mm-dissect-buffer(nil t)
> gnus-display-mime()
> gnus-article-prepare-display()
> gnus-article-prepare(15 nil)
> gnus-summary-display-article(15 nil)
> gnus-summary-select-article(nil nil pseudo)
> gnus-summary-scroll-up(1)
> call-interactively(gnus-summary-scroll-up nil nil)
and this is the *epg-debug*:
> /usr/bin/gpg --no-tty --status-fd 1 --yes --command-fd 0 --armor --textmode --output /tmp/epg-output1142m3f --detach-sign
> [GNUPG:] USERID_HINT 8D718EC47795E591 Carl Lei (XeCycle) <XeCycle@GMail.com>
> [GNUPG:] NEED_PASSPHRASE 8D718EC47795E591 8D718EC47795E591 1 0
> [GNUPG:] GET_HIDDEN passphrase.enter
> [GNUPG:] GOT_IT
> [GNUPG:] GOOD_PASSPHRASE
> [GNUPG:] BEGIN_SIGNING
> [GNUPG:] SIG_CREATED D 1 2 01 1314321893 1FB67F1FD45DF681C84527F78D718EC47795E591
> /usr/bin/gpg --no-tty --status-fd 1 --yes --command-fd 0 --armor --textmode --output /tmp/epg-output1142zBm --detach-sign
> [GNUPG:] USERID_HINT 8D718EC47795E591 Carl Lei (XeCycle) <XeCycle@GMail.com>
> [GNUPG:] NEED_PASSPHRASE 8D718EC47795E591 8D718EC47795E591 1 0
> [GNUPG:] GET_HIDDEN passphrase.enter
> [GNUPG:] GOT_IT
> [GNUPG:] GOOD_PASSPHRASE
> [GNUPG:] BEGIN_SIGNING
> [GNUPG:] SIG_CREATED D 1 2 01 1314321902 1FB67F1FD45DF681C84527F78D718EC47795E591
Seems gpg hadn't even been invoked for verifying signatures. This is
really a painful problem for me... I just installed Emacs from git
several weeks ago --- emacs-version "24.0.50.1".
>> I checked variable `mml2015-use' and it's `epg', however the variable
>> `mml2015-verify-function' is `mailcrypt-verify'.
>>
>> Well, this problem have been bothering me for a long time, I guess it's
>> a configuration issue? Do I need to change the variable myself? I
>> believe it isn't wanted.
>
> This shouldn't be a problem since the variable is only referred to from
> `mml2015-mailcrypt-verify', which wouldn't be called when mml2015-use is
> 'epg. I agree that the variable name is a bit misleading though.
Thank you, so this may not be the major problem.
--
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Inconsistency between `mml2015-use' and `mml2015-verify-function'
2011-08-26 1:42 ` XeCycle
@ 2011-08-26 2:00 ` Daiki Ueno
2011-08-26 7:57 ` XeCycle
0 siblings, 1 reply; 11+ messages in thread
From: Daiki Ueno @ 2011-08-26 2:00 UTC (permalink / raw)
To: XeCycle; +Cc: ding
XeCycle <xecycle@gmail.com> writes:
> This is the debug trace when I try to display a signed message:
>
>> Debugger entered--Lisp error: (wrong-number-of-arguments #[(target
>> old new) "\303\b
>> #\207" [old new target replace-regexp-in-string] 4] 4)
>> mm-replace-in-string("\ntest encrypt.\n" "\n" "\n" t)
So I guess the culprit is a third-party replace-regexp-in-string defined
somewhere. Could you check where it is defined, with C-h f
replace-regexp-in-string?
Regards,
--
Daiki Ueno
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Inconsistency between `mml2015-use' and `mml2015-verify-function'
2011-08-26 2:00 ` Daiki Ueno
@ 2011-08-26 7:57 ` XeCycle
2011-08-26 9:04 ` Daiki Ueno
0 siblings, 1 reply; 11+ messages in thread
From: XeCycle @ 2011-08-26 7:57 UTC (permalink / raw)
To: ding
[-- Attachment #1: Type: text/plain, Size: 995 bytes --]
Daiki Ueno <ueno@unixuser.org> writes:
> XeCycle <xecycle@gmail.com> writes:
>
>> This is the debug trace when I try to display a signed message:
>>
>>> Debugger entered--Lisp error: (wrong-number-of-arguments #[(target
>>> old new) "\303\b
>>> #\207" [old new target replace-regexp-in-string] 4] 4)
>>> mm-replace-in-string("\ntest encrypt.\n" "\n" "\n" t)
>
> So I guess the culprit is a third-party replace-regexp-in-string defined
> somewhere. Could you check where it is defined, with C-h f
> replace-regexp-in-string?
It showed these:
> replace-regexp-in-string is a compiled Lisp function in
> `subr.el'.
> (replace-regexp-in-string REGEXP REP STRING &optional FIXEDCASE
> LITERAL SUBEXP START)
I checked the file `subr.el', it is the one that comes with Emacs.
What's up with it?
--
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Inconsistency between `mml2015-use' and `mml2015-verify-function'
2011-08-26 7:57 ` XeCycle
@ 2011-08-26 9:04 ` Daiki Ueno
2011-08-26 10:44 ` XeCycle
2011-08-26 14:06 ` XeCycle
0 siblings, 2 replies; 11+ messages in thread
From: Daiki Ueno @ 2011-08-26 9:04 UTC (permalink / raw)
To: XeCycle; +Cc: ding
XeCycle <xecycle@gmail.com> writes:
>>>> Debugger entered--Lisp error: (wrong-number-of-arguments #[(target
>>>> old new) "\303\b
>>>> #\207" [old new target replace-regexp-in-string] 4] 4)
>>>> mm-replace-in-string("\ntest encrypt.\n" "\n" "\n" t)
>>
>> So I guess the culprit is a third-party replace-regexp-in-string defined
>> somewhere. Could you check where it is defined, with C-h f
>> replace-regexp-in-string?
>
> It showed these:
>
>> replace-regexp-in-string is a compiled Lisp function in
>> `subr.el'.
>
>> (replace-regexp-in-string REGEXP REP STRING &optional FIXEDCASE
>> LITERAL SUBEXP START)
Well, then how about mm-replace-in-string? Is mm-util.elc correctly
located under /usr/local/share/emacs/24.0.50/lisp/gnus/ or such?
I mean, mm-replace-in-string seems not working for you. Could you try:
(mm-replace-in-string "\ntest encrypt.\n" "\n" "\n" t)
Regards,
--
Daiki Ueno
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Inconsistency between `mml2015-use' and `mml2015-verify-function'
2011-08-26 9:04 ` Daiki Ueno
@ 2011-08-26 10:44 ` XeCycle
2011-08-26 14:06 ` XeCycle
1 sibling, 0 replies; 11+ messages in thread
From: XeCycle @ 2011-08-26 10:44 UTC (permalink / raw)
To: ding
[-- Attachment #1: Type: text/plain, Size: 787 bytes --]
Daiki Ueno <ueno@unixuser.org> writes:
[...]
> Well, then how about mm-replace-in-string? Is mm-util.elc correctly
> located under /usr/local/share/emacs/24.0.50/lisp/gnus/ or such?
Seems this is the issue:
mm-replace-in-string is an alias for `replace-in-string' in
`mm-util.el'.
(mm-replace-in-string TARGET OLD NEW)
However, mm-util.elc is under /usr/share/emacs/24.0.50/lisp/gnus/.
> I mean, mm-replace-in-string seems not working for you. Could you try:
> (mm-replace-in-string "\ntest encrypt.\n" "\n" "\n" t)
So this is annoying --- seems the "&optional literal" is ignored.
--
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Inconsistency between `mml2015-use' and `mml2015-verify-function'
2011-08-26 9:04 ` Daiki Ueno
2011-08-26 10:44 ` XeCycle
@ 2011-08-26 14:06 ` XeCycle
2011-08-26 23:29 ` Daiki Ueno
2011-09-10 22:10 ` Lars Magne Ingebrigtsen
1 sibling, 2 replies; 11+ messages in thread
From: XeCycle @ 2011-08-26 14:06 UTC (permalink / raw)
To: ding
Daiki Ueno <ueno@unixuser.org> writes:
[...]
> Well, then how about mm-replace-in-string? Is mm-util.elc correctly
> located under /usr/local/share/emacs/24.0.50/lisp/gnus/ or such?
>
> I mean, mm-replace-in-string seems not working for you. Could you try:
> (mm-replace-in-string "\ntest encrypt.\n" "\n" "\n" t)
Oops... I found out where this problem come from.
mm-replace-in-string is an alias for `replace-in-string' in
`mm-util.el'.
(mm-replace-in-string TARGET OLD NEW)
------------------------
replace-in-string is a compiled Lisp function in
`color-theme.el'.
(replace-in-string TARGET OLD NEW)
So... F**ked up. Anyway to force mm-replace-in-string use the one from
gnus?
Thank you.
--
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Inconsistency between `mml2015-use' and `mml2015-verify-function'
2011-08-26 14:06 ` XeCycle
@ 2011-08-26 23:29 ` Daiki Ueno
2011-08-27 0:26 ` XeCycle
2011-09-10 22:10 ` Lars Magne Ingebrigtsen
1 sibling, 1 reply; 11+ messages in thread
From: Daiki Ueno @ 2011-08-26 23:29 UTC (permalink / raw)
To: XeCycle; +Cc: ding
[-- Attachment #1: Type: text/plain, Size: 563 bytes --]
XeCycle <xecycle@gmail.com> writes:
> replace-in-string is a compiled Lisp function in
> `color-theme.el'.
>
> (replace-in-string TARGET OLD NEW)
>
> So... F**ked up. Anyway to force mm-replace-in-string use the one from
> gnus?
It looks your color-theme.el is too old. There is a change not defining
replace-in-string, which is available in 6.6.0 release:
http://bzr.savannah.gnu.org/lh/color-theme/trunk/revision/55
Anyway, I'll install the attached fix in Gnus side as well since mml2015
usage of mm-replace-in-string does not really need the 4th arg.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: mml2015-replace-in-string.diff --]
[-- Type: text/x-diff, Size: 493 bytes --]
=== modified file 'lisp/gnus/mml2015.el'
--- lisp/gnus/mml2015.el 2011-06-30 23:27:10 +0000
+++ lisp/gnus/mml2015.el 2011-08-26 23:27:42 +0000
@@ -923,7 +923,7 @@
(mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "Corrupted")
(throw 'error handle))
- (setq part (mm-replace-in-string part "\n" "\r\n" t)
+ (setq part (mm-replace-in-string part "\n" "\r\n")
signature (mm-get-part signature)
context (epg-make-context))
(condition-case error
[-- Attachment #3: Type: text/plain, Size: 25 bytes --]
Regards,
--
Daiki Ueno
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Inconsistency between `mml2015-use' and `mml2015-verify-function'
2011-08-26 23:29 ` Daiki Ueno
@ 2011-08-27 0:26 ` XeCycle
0 siblings, 0 replies; 11+ messages in thread
From: XeCycle @ 2011-08-27 0:26 UTC (permalink / raw)
To: ding
Daiki Ueno <ueno@unixuser.org> writes:
[...]
> It looks your color-theme.el is too old. There is a change not defining
> replace-in-string, which is available in 6.6.0 release:
>
> http://bzr.savannah.gnu.org/lh/color-theme/trunk/revision/55
Thank you for pointing this out. But they didn't seem to fix it in the
release, so I just modified it myself.
> Anyway, I'll install the attached fix in Gnus side as well since mml2015
> usage of mm-replace-in-string does not really need the 4th arg.
>
>
> === modified file 'lisp/gnus/mml2015.el'
> --- lisp/gnus/mml2015.el 2011-06-30 23:27:10 +0000
> +++ lisp/gnus/mml2015.el 2011-08-26 23:27:42 +0000
> @@ -923,7 +923,7 @@
> (mm-set-handle-multipart-parameter
> mm-security-handle 'gnus-info "Corrupted")
> (throw 'error handle))
> - (setq part (mm-replace-in-string part "\n" "\r\n" t)
> + (setq part (mm-replace-in-string part "\n" "\r\n")
> signature (mm-get-part signature)
> context (epg-make-context))
> (condition-case error
After all it was solved, I don't want to change this. If there's
another application using `replace-in-string' which needs the 4th arg,
this change will be useless.
--
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Inconsistency between `mml2015-use' and `mml2015-verify-function'
2011-08-26 14:06 ` XeCycle
2011-08-26 23:29 ` Daiki Ueno
@ 2011-09-10 22:10 ` Lars Magne Ingebrigtsen
1 sibling, 0 replies; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-09-10 22:10 UTC (permalink / raw)
To: XeCycle; +Cc: ding
XeCycle <xecycle@gmail.com> writes:
> So... F**ked up. Anyway to force mm-replace-in-string use the one from
> gnus?
Alter your load path the first thing in your .emacs.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-09-10 22:10 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-25 12:49 Inconsistency between `mml2015-use' and `mml2015-verify-function' XeCycle
2011-08-25 20:45 ` Daiki Ueno
2011-08-26 1:42 ` XeCycle
2011-08-26 2:00 ` Daiki Ueno
2011-08-26 7:57 ` XeCycle
2011-08-26 9:04 ` Daiki Ueno
2011-08-26 10:44 ` XeCycle
2011-08-26 14:06 ` XeCycle
2011-08-26 23:29 ` Daiki Ueno
2011-08-27 0:26 ` XeCycle
2011-09-10 22:10 ` Lars Magne Ingebrigtsen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).