unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / Atom feed
* [PATCH] emacs/tree: declare notmuch-search functions
@ 2020-09-08 17:15 William Casarin
       [not found] ` <20200908230132.dxc2likcbmpngrmy@t480.local>
  0 siblings, 1 reply; 3+ messages in thread
From: William Casarin @ 2020-09-08 17:15 UTC (permalink / raw)
  To: notmuch; +Cc: Danilo G . Baio

Some are running into undeclarated function errors:

> emacs/notmuch-tree.el:1143:1:Warning: the following functions are
>     not known to be defined: notmuch-search-previous-thread,
>     notmuch-search-next-thread, notmuch-tree-from-search-thread

Fixes: 874f14ec ("emacs/tree: enable moving to next thread in search results")
Reported-by: Danilo G. Baio <dbaio@FreeBSD.org>
Signed-off-by: William Casarin <jb55@jb55.com>
---

Hey there,

"Danilo G. Baio" <dbaio@FreeBSD.org> writes:
> Hi William.
>
> I'm updating notmuch on FreeBSD (to 0.31) and I'm getting this issue:
>
>
> ```
> [...]
> =======================<phase: stage          >============================
> ===>  Staging for notmuch-emacs27-0.31
> ===>   notmuch-emacs27-0.31 depends on executable: notmuch - found
> ===>   notmuch-emacs27-0.31 depends on file: /usr/local/bin/emacs-27.1 - found
> ===>   notmuch-emacs27-0.31 depends on executable: indexinfo - found
> ===>   Generating temporary packing list
> gmake[1]: Entering directory '/wrkdirs/usr/ports/mail/notmuch-emacs/work-full/notmuch-0.31'
> /usr/local/bin/emacs-27.1 --directory emacs -batch -f batch-byte-compile emacs/notmuch-compat.el
> /usr/local/bin/emacs-27.1 --directory emacs -batch -f batch-byte-compile emacs/notmuch-version.el
> /usr/local/bin/emacs-27.1 --directory emacs -batch -f batch-byte-compile emacs/notmuch-lib.el
> /usr/local/bin/emacs-27.1 --directory emacs -batch -f batch-byte-compile emacs/notmuch-parser.el
> /usr/local/bin/emacs-27.1 --directory emacs -batch -f batch-byte-compile emacs/notmuch-tag.el
> /usr/local/bin/emacs-27.1 --directory emacs -batch -f batch-byte-compile emacs/notmuch-query.el
> /usr/local/bin/emacs-27.1 --directory emacs -batch -f batch-byte-compile emacs/coolj.el
> /usr/local/bin/emacs-27.1 --directory emacs -batch -f batch-byte-compile emacs/notmuch-wash.el
> /usr/local/bin/emacs-27.1 --directory emacs -batch -f batch-byte-compile emacs/notmuch-company.el
> /usr/local/bin/emacs-27.1 --directory emacs -batch -f batch-byte-compile emacs/notmuch-address.el
> /usr/local/bin/emacs-27.1 --directory emacs -batch -f batch-byte-compile emacs/notmuch-maildir-fcc.el
> /usr/local/bin/emacs-27.1 --directory emacs -batch -f batch-byte-compile emacs/notmuch-draft.el
> /usr/local/bin/emacs-27.1 --directory emacs -batch -f batch-byte-compile emacs/notmuch-message.el
> /usr/local/bin/emacs-27.1 --directory emacs -batch -f batch-byte-compile emacs/notmuch-mua.el
> /usr/local/bin/emacs-27.1 --directory emacs -batch -f batch-byte-compile emacs/notmuch-crypto.el
> /usr/local/bin/emacs-27.1 --directory emacs -batch -f batch-byte-compile emacs/notmuch-print.el
> /usr/local/bin/emacs-27.1 --directory emacs -batch -f batch-byte-compile emacs/notmuch-show.el
> /usr/local/bin/emacs-27.1 --directory emacs -batch -f batch-byte-compile emacs/notmuch-hello.el
> /usr/local/bin/emacs-27.1 --directory emacs -batch -f batch-byte-compile emacs/notmuch-jump.el
> /usr/local/bin/emacs-27.1 --directory emacs -batch -f batch-byte-compile emacs/notmuch-tree.el
>
> In end of data:
> emacs/notmuch-tree.el:1143:1:Warning: the following functions are not known to
>     be defined: notmuch-search-previous-thread, notmuch-search-next-thread,
>     notmuch-tree-from-search-thread
>
> [...]
> ```
>
> I don't use Emacs and don't have a clue in how fix this.
>
> Could you help me?
>
> Regards.
> -- 
> Danilo G. Baio (dbaio)

I got this report from user with the new notmuch-tree updates. I didn't
run into this, but it looks like these functions are supposed to be
forwardly declared first? 

I don't have a way of testing this and I'm waiting to see if it fixes
their issue, but thought I'd would post the patch here as well for
review.

Cheers,
Will

emacs/notmuch-tree.el | 3 +++
1 file changed, 3 insertions(+)

diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index f342f85a..3336139e 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -41,6 +41,9 @@
 (declare-function notmuch-read-query "notmuch" (prompt))
 (declare-function notmuch-search-find-thread-id "notmuch" (&optional bare))
 (declare-function notmuch-search-find-subject "notmuch" ())
+(declare-function notmuch-search-next-thread "notmuch" ())
+(declare-function notmuch-search-previous-thread "notmuch" ())
+(declare-function notmuch-tree-from-search-thread "notmuch" ())
 
 ;; the following variable is defined in notmuch.el
 (defvar notmuch-search-query-string)
-- 
2.28.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] emacs/tree: declare notmuch-search functions
       [not found] ` <20200908230132.dxc2likcbmpngrmy@t480.local>
@ 2020-09-09 23:17   ` David Bremner
       [not found]     ` <20200910010230.z7ggna5nprd56r3v@t480.local>
  0 siblings, 1 reply; 3+ messages in thread
From: David Bremner @ 2020-09-09 23:17 UTC (permalink / raw)
  To: Danilo G. Baio, William Casarin; +Cc: notmuch

"Danilo G. Baio" <dbaio@FreeBSD.org> writes:
> Hi William.
>
> I can confirm this patch fixes that issue on
> `emacs/notmuch-tree.el:1143` I'm seeing here. Thank you!
>
>
> Now I have other issue, on the docs:
>
> ```
> gmake -C doc/_build/texinfo info
> [...]
> mkdir -m0755 -p "/wrkdirs/usr/ports/mail/notmuch-emacs/work-full/stage/usr/local/share/info"
> install -m0644 doc/_build/texinfo/notmuch-address.info doc/_build/texinfo/notmuch-compact.info doc/_build/texinfo/notmuch-config.info doc/_build/texinfo/notmuch-count.info doc/_build/texinfo/notmuch-dump.info doc/_build/texinfo/notmuch-emacs-mua.info doc/_build/texinfo/notmuch-insert.info doc/_build/texinfo/notmuch-new.info doc/_build/texinfo/notmuch-reindex.info doc/_build/texinfo/notmuch-reply.info doc/_build/texinfo/notmuch-restore.info doc/_build/texinfo/notmuch-search.info doc/_build/texinfo/notmuch-show.info doc/_build/texinfo/notmuch-tag.info doc/_build/texinfo/notmuch.info doc/_build/texinfo/notmuch-hooks.info doc/_build/texinfo/notmuch-properties.info doc/_build/texinfo/notmuch-search-terms.info doc/_build/texinfo/notmuch-emacs.info /wrkdirs/usr/ports/mail/notmuch-emacs/work-full/stage/usr/local/share/info
> install: doc/_build/texinfo/notmuch-emacs.info: No such file or directory
> gmake[1]: *** [doc/Makefile.local:135: install-info] Error 71
> gmake[1]: Leaving directory '/wrkdirs/usr/ports/mail/notmuch-emacs/work-full/notmuch-0.31'
> *** Error code 2
> ```

I guess I'm curious what is in the [...]. There should be a call to
sphinx-build that produces the info files. Whether emacs.info is
produced is controlled by the (generated) file sphinx.config, which
e.g. on my Debian machine looks like

,----
| # Generated by configure, run from doc/conf.py
| tags.add('WITH_EMACS')
| tags.add('WITH_PYTHON')
| rsti_dir = '/home/bremner/software/upstream/notmuch/emacs'
`----

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] emacs/tree: declare notmuch-search functions
       [not found]     ` <20200910010230.z7ggna5nprd56r3v@t480.local>
@ 2020-09-10 16:07       ` David Bremner
  0 siblings, 0 replies; 3+ messages in thread
From: David Bremner @ 2020-09-10 16:07 UTC (permalink / raw)
  To: Danilo G. Baio; +Cc: notmuch

"Danilo G. Baio" <dbaio@FreeBSD.org> writes:

>
> That helps, thanks!
>
> In fact, the notmuch-emacs port on FreeBSD is not executing the
> './configure'. [1]

I guess this issue is exactly the sort of change in the behaviour of
configure that might bite you in that case. It might be worth scanning
the upstream git log for configure if you're going do this.

> I'll add sphinx.config for now and take a look on these dependencies
> for building it in the proper way.

There is also sh.config generated by configure. It is currently only
used by the test suite, which I'm guessing you are not running.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-10 16:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-08 17:15 [PATCH] emacs/tree: declare notmuch-search functions William Casarin
     [not found] ` <20200908230132.dxc2likcbmpngrmy@t480.local>
2020-09-09 23:17   ` David Bremner
     [not found]     ` <20200910010230.z7ggna5nprd56r3v@t480.local>
2020-09-10 16:07       ` David Bremner

unofficial mirror of notmuch@notmuchmail.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/notmuch/0 notmuch/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 notmuch notmuch/ https://yhetil.org/notmuch \
		notmuch@notmuchmail.org
	public-inbox-index notmuch

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.mail.notmuch.general
	nntp://news.gmane.io/gmane.mail.notmuch.general


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git