GNU bug report logs - #21724
25.0.50; (void-function (setf epg-context-armor))

Previous Next

Package: emacs;

Reported by: Katsumi Yamaoka <yamaoka <at> jpl.org>

Date: Wed, 21 Oct 2015 09:04:02 UTC

Severity: normal

Found in version 25.0.50

Done: Katsumi Yamaoka <yamaoka <at> jpl.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21724 in the body.
You can then email your comments to 21724 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#21724; Package emacs. (Wed, 21 Oct 2015 09:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Katsumi Yamaoka <yamaoka <at> jpl.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 21 Oct 2015 09:04:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: bug-gnu-emacs <at> gnu.org
Cc: Nicolas Petton <nicolas <at> petton.fr>
Subject: 25.0.50; (void-function (setf epg-context-armor))
Date: Wed, 21 Oct 2015 18:03:38 +0900
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,




Added indication that bug 21724 blocks19759 Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 21 Oct 2015 16:47:02 GMT) Full text and rfc822 format available.

Reply sent to Katsumi Yamaoka <yamaoka <at> jpl.org>:
You have taken responsibility. (Thu, 22 Oct 2015 23:58:02 GMT) Full text and rfc822 format available.

Notification sent to Katsumi Yamaoka <yamaoka <at> jpl.org>:
bug acknowledged by developer. (Thu, 22 Oct 2015 23:58:02 GMT) Full text and rfc822 format available.

Message #12 received at 21724-done <at> debbugs.gnu.org (full text, mbox):

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: 21724-done <at> debbugs.gnu.org
Cc: Nicolas Petton <nicolas <at> petton.fr>
Subject: Re: bug#21724: 25.0.50; (void-function (setf epg-context-armor))
Date: Fri, 23 Oct 2015 08:57:48 +0900
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>




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21724; Package emacs. (Fri, 23 Oct 2015 00:28:02 GMT) Full text and rfc822 format available.

Message #15 received at 21724 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 21724 <at> debbugs.gnu.org
Cc: yamaoka <at> jpl.org
Subject: Re: bug#21724: 25.0.50; (void-function (setf epg-context-armor))
Date: Thu, 22 Oct 2015 20:27:16 -0400
Katsumi Yamaoka wrote:

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

IMO it is better to move the epg autoloads after the epg eval-when-compile.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21724; Package emacs. (Fri, 23 Oct 2015 02:41:02 GMT) Full text and rfc822 format available.

Message #18 received at 21724 <at> debbugs.gnu.org (full text, mbox):

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 21724 <at> debbugs.gnu.org
Subject: Re: bug#21724: 25.0.50; (void-function (setf epg-context-armor))
Date: Fri, 23 Oct 2015 11:40:09 +0900
On Thu, 22 Oct 2015 20:27:16 -0400, Glenn Morris wrote:
> Katsumi Yamaoka wrote:
>> So, I'm not quite sure why it helps, but I wrapped the existing
>> autoload settings for those functions with `eval-and-compile':

> IMO it is better to move the epg autoloads after the epg eval-when-compile.

Thanks.  I see why adding (eval-when-compile (require 'epg))
caused a new warning.  It marked all the epg functions including
those autoloads maybe non-existent at the run-time, didn't it?
Committed.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21724; Package emacs. (Fri, 23 Oct 2015 04:06:01 GMT) Full text and rfc822 format available.

Message #21 received at 21724 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Katsumi Yamaoka <yamaoka <at> jpl.org>
Cc: 21724 <at> debbugs.gnu.org
Subject: Re: bug#21724: 25.0.50; (void-function (setf epg-context-armor))
Date: Fri, 23 Oct 2015 00:05:09 -0400
Katsumi Yamaoka wrote:

> Thanks.  I see why adding (eval-when-compile (require 'epg))
> caused a new warning.  It marked all the epg functions including
> those autoloads maybe non-existent at the run-time, didn't it?

Yes. I didn't investigate, but it's probably a compiler bug.
It doesn't properly track autoloaded-but-not-actually-defun'd definitions
before eval-when-compile, so whatever statement comes last wins.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 20 Nov 2015 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 213 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.