Subject: bug#21724: closed (Re: bug#21724: 25.0.50; (void-function (setf epg-context-armor)))

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 22 Oct 2015 23:58:02 +0000

Your bug report

#21724: 25.0.50; (void-function (setf epg-context-armor))

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
21724: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21724
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#21724: 25.0.50; (void-function (setf epg-context-armor))
From: Katsumi Yamaoka <[email-masked]>
To: [email-masked]
Cc: Nicolas Petton <[email-masked]>
Date: Fri, 23 Oct 2015 08:57:48 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

On Wed, 21 Oct 2015 18:03:38 +0900, Katsumi Yamaoka wrote:
> References: <http://thread.gmane.org/gmane.emacs.diffs/132036>

>>> -    (epg-context-set-armor context t)
>>> +    (setf (epg-context-armor context) t)

> Debugger entered--Lisp error: (void-function \(setf\ epg-context-armor\))

> To fix it, epg.el(c) is required when compiling auth-source.el,
> I think.

First I tried adding: (eval-when-compile (require 'epg))
It fixed the setf compilation problem.  However, the byte compiler
got to issue a new warning as follows:

In end of data:
auth-source.el:2145:1:Warning: the following functions might not be defined at
    runtime: epg-context-set-passphrase-callback, epg-decrypt-string,
    epg-encrypt-string

So, I'm not quite sure why it helps, but I wrapped the existing
autoload settings for those functions with `eval-and-compile':

<http://article.gmane.org/gmane.emacs.diffs/132162>

Subject: 25.0.50; (void-function (setf epg-context-armor))
From: Katsumi Yamaoka <[email-masked]>
To: [email-masked]
Cc: Nicolas Petton <[email-masked]>
Date: Wed, 21 Oct 2015 18:03:38 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

References: <http://thread.gmane.org/gmane.emacs.diffs/132036>

On Tue, 13 Oct 2015 09:36:28 +0900, Katsumi Yamaoka wrote:
> On Sun, 11 Oct 2015 21:03:07 +0000, Nicolas Petton wrote:
>>     * lisp/gnus/auth-source.el (auth-source-epa-make-gpg-token): Replace an
>>       usage of `epg-context-set-armor' with `setf'.
> [...]
>> -    (epg-context-set-armor context t)
>> +    (setf (epg-context-armor context) t)

> This doesn't seem to be expanded properly when building Emacs:

> In end of data:
> gnus/auth-source.el:2145:1:Warning: the function `(setf epg-context-armor)' is
>     not known to be defined.

> How do we fix it?

I got:

Debugger entered--Lisp error: (void-function \(setf\ epg-context-armor\))

Recipe:

$ emacs -Q
load: lisp/gnus/auth-source.elc
eval: (auth-source-epa-make-gpg-token "foo" "bar")

To fix it, epg.el(c) is required when compiling auth-source.el,
I think.  Though once I merged the change to the Gnus git master,
I reverted it thereafter, since old Emacsen that Gnus supports do
not have the setf-method for epg-context-armor.

Regards,