notmuch-crypto.el: "‘notmuch-show-get-message-id’ is not known to be defined"

classic Classic list List threaded Threaded
5 messages Options
Daniel Kahn Gillmor Daniel Kahn Gillmor
Reply | Threaded
Open this post in threaded view
|

notmuch-crypto.el: "‘notmuch-show-get-message-id’ is not known to be defined"

When building the current version of notmuch on debian testing/unstable,
i see the following warning:

```
EMACS emacs/notmuch-crypto.elc

In end of data:
emacs/notmuch-crypto.el:266:1:Warning: the function
    ‘notmuch-show-get-message-id’ is not known to be defined.
```

No part of the test suite fails so i assume it's not a problem, but
having spurious warnings makes it harder to notice real warnings in the
future.

I don't know what the warning means exactly, but maybe someone who is
better with elisp than i am could take a look at it and try to resolve
it?

thanks,

        --dkg

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch

signature.asc (233 bytes) Download Attachment
Örjan Ekeberg Örjan Ekeberg
Reply | Threaded
Open this post in threaded view
|

Re: notmuch-crypto.el: "‘notmuch-show-get-message-id’ is not known to be defined"

Daniel Kahn Gillmor <[hidden email]> writes:

> When building the current version of notmuch on debian testing/unstable,
> i see the following warning:
>
> ```
> EMACS emacs/notmuch-crypto.elc
>
> In end of data:
> emacs/notmuch-crypto.el:266:1:Warning: the function
>     ‘notmuch-show-get-message-id’ is not known to be defined.
> ```
>
> No part of the test suite fails so i assume it's not a problem, but
> having spurious warnings makes it harder to notice real warnings in the
> future.
>
> I don't know what the warning means exactly, but maybe someone who is
> better with elisp than i am could take a look at it and try to resolve
> it?

Adding this line in notmuch-crypto.el solves this:

(declare-function notmuch-show-get-message-id "notmuch-show" (&optional bare))

As a matter of style, I am not sure where to put it.  Normally, these
declarations are put in the beginning of the file; right after the
require-statements.  In notmuch-crypto.el, however, the only other
declaration is put just in front of where the function is called.

/Örjan
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
David Edmondson David Edmondson
Reply | Threaded
Open this post in threaded view
|

Re: notmuch-crypto.el: "‘notmuch-show-get-message-id’ is not known to be defined"

On Wednesday, 2020-03-18 at 10:49:14 +01, Örjan Ekeberg wrote:

> Daniel Kahn Gillmor <[hidden email]> writes:
>
>> When building the current version of notmuch on debian testing/unstable,
>> i see the following warning:
>>
>> ```
>> EMACS emacs/notmuch-crypto.elc
>>
>> In end of data:
>> emacs/notmuch-crypto.el:266:1:Warning: the function
>>     ‘notmuch-show-get-message-id’ is not known to be defined.
>> ```
>>
>> No part of the test suite fails so i assume it's not a problem, but
>> having spurious warnings makes it harder to notice real warnings in the
>> future.
>>
>> I don't know what the warning means exactly, but maybe someone who is
>> better with elisp than i am could take a look at it and try to resolve
>> it?
>
> Adding this line in notmuch-crypto.el solves this:
>
> (declare-function notmuch-show-get-message-id "notmuch-show" (&optional bare))
>
> As a matter of style, I am not sure where to put it.  Normally, these
> declarations are put in the beginning of the file; right after the
> require-statements.  In notmuch-crypto.el, however, the only other
> declaration is put just in front of where the function is called.

As you say, we normally gather them near to the top of the file.

dme.
--
My girl Friday, she no square.
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Daniel Kahn Gillmor Daniel Kahn Gillmor
Reply | Threaded
Open this post in threaded view
|

[PATCH] emacs: avoid warning about notmuch-show-get-message-id

In reply to this post by Daniel Kahn Gillmor
Without this change, we see the following warning when compiling the
elisp:

```
EMACS emacs/notmuch-crypto.elc

In end of data:
emacs/notmuch-crypto.el:266:1:Warning: the function
    ‘notmuch-show-get-message-id’ is not known to be defined.
```

Thanks to Örjan Ekeberg and David Edmondson for their followup about
this.

Signed-off-by: Daniel Kahn Gillmor <[hidden email]>
---
 emacs/notmuch-crypto.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/emacs/notmuch-crypto.el b/emacs/notmuch-crypto.el
index 4035ee37..928de0bb 100644
--- a/emacs/notmuch-crypto.el
+++ b/emacs/notmuch-crypto.el
@@ -163,6 +163,7 @@ by user FROM."
       (recenter -1))))
 
 (declare-function notmuch-show-refresh-view "notmuch-show" (&optional reset-state))
+(declare-function notmuch-show-get-message-id "notmuch-show" (&optional bare))
 
 (defun notmuch-crypto--async-key-sentinel (process event)
   "When the user asks for a GPG key to be retrieved
--
2.25.1

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] emacs: avoid warning about notmuch-show-get-message-id

Daniel Kahn Gillmor <[hidden email]> writes:

> Without this change, we see the following warning when compiling the
> elisp:
>

pushed

d
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch