[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Somebody needs to (require 'pgg)



on Mon Jul 11 2011, Kazuhiro Ito <kzhr-AT-d1.dion.ne.jp> wrote:

> Hi,
>
>> I'm getting this backtrace when I view messages with encrypted parts
>> without first explicitly loading pgg
>> 
>> Debugger entered--Lisp error: (void-variable pgg-decrypt-automatically)
>
> Theoretically, if you load pgg-def.el while calling
> wl-draft-preview-message() from wl-draft-send-confirm(),
> `pgg-decrypt-automatically' is not defined and an error raises when
> viewing messages with encrypted part.
>
> In wl/wl-draft.el
>> (defun wl-draft-send-confirm ()
>>   (unwind-protect
>>       (condition-case nil
>> 	  (progn
>> 	    (when wl-draft-send-confirm-with-preview
>> 	      (let (wl-draft-send-hook
>> 		    (pgg-decrypt-automatically nil))
>> 		(wl-draft-preview-message)))
> (snip)
>
> In this case, adding (require 'pgg-def) at the beginning of
> wl-draft.el can avoid the problem.

I have my own workaround for this (which works). I don't want to have to
modify wl; IMO that should be done upstream, which is why I reported
this as a bug.

> Another posibility is that Emacs including pgg-def.el is loaded
> instead of SEMI including one.  The cause of the problem in this case
> is that Emacs including pgg-def.el does not define
> `pgg-decrypt-automatically'.  You can confirm which pgg-def.el is
> loaded by M-x list-load-path-shadows.

Unfortunately it looks like there are many copies of pgg lying around.

/Users/dave/.emacs.d/el-get/nognus/lisp/pgg hides /Users/dave/.emacs.d/el-get/semi/site-lisp/semi/pgg
/Users/dave/.emacs.d/el-get/nognus/lisp/pgg-pgp5 hides /Users/dave/.emacs.d/el-get/semi/site-lisp/semi/pgg-pgp5
/Users/dave/.emacs.d/el-get/nognus/lisp/pgg-pgp hides /Users/dave/.emacs.d/el-get/semi/site-lisp/semi/pgg-pgp
/Users/dave/.emacs.d/el-get/nognus/lisp/pgg-parse hides /Users/dave/.emacs.d/el-get/semi/site-lisp/semi/pgg-parse
/Users/dave/.emacs.d/el-get/nognus/lisp/pgg-gpg hides /Users/dave/.emacs.d/el-get/semi/site-lisp/semi/pgg-gpg
/Users/dave/.emacs.d/el-get/nognus/lisp/pgg-def hides /Users/dave/.emacs.d/el-get/semi/site-lisp/semi/pgg-def
/Users/dave/.emacs.d/el-get/nognus/lisp/pgg hides /Applications/Emacs.app/Contents/Resources/lisp/pgg
/Users/dave/.emacs.d/el-get/nognus/lisp/pgg-pgp5 hides /Applications/Emacs.app/Contents/Resources/lisp/pgg-pgp5
/Users/dave/.emacs.d/el-get/nognus/lisp/pgg-pgp hides /Applications/Emacs.app/Contents/Resources/lisp/pgg-pgp
/Users/dave/.emacs.d/el-get/nognus/lisp/pgg-parse hides /Applications/Emacs.app/Contents/Resources/lisp/pgg-parse
/Users/dave/.emacs.d/el-get/nognus/lisp/pgg-gpg hides /Applications/Emacs.app/Contents/Resources/lisp/pgg-gpg
/Users/dave/.emacs.d/el-get/nognus/lisp/pgg-def hides /Applications/Emacs.app/Contents/Resources/lisp/pgg-def

It seems like emacs ever-more-desperately needs package dependency
management.  el-get provides that, but only if the packages themselves
don't deliver other packages as though they were sub-parts.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com