Re: notmuch-emacs notmuch-tag configuration

2021-06-16 Thread Kyle Meyer
David Bremner writes:

> David Wen Riccardi-Zhu  writes:
>
>> I'm using notmuch 0.32.1, Emacs 27.2, and version 20210605.1839 of
>> notmuch-emacs. When I try to mark a message as read using a custom
>> keybinding, I'm getting the following error:
>
> Can you duplicate your problem with matching versions of notmuch and
> notmuch-emacs, i.e. either both 0.32.1 or both from git master? It's
> probably not the issue, but I don't really want to deal with melpa's
> creative version numbers.

While the offending code in the backtrace is from 319dcfb5 (emacs:
restore tag-changes and query bindings for tag hooks, 2021-05-15), to me
it smells like some sort of mixed installation (perhaps stale elc
files), so I think the above suggestion is a good one.  Also, looking at
the output of list-load-path-shadows might point to the problem.
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: notmuch-emacs notmuch-tag configuration

2021-06-16 Thread Tomi Ollila
On Tue, Jun 15 2021, David Wen Riccardi-Zhu wrote:

> I'm using notmuch 0.32.1, Emacs 27.2, and version 20210605.1839 of
> notmuch-emacs. When I try to mark a message as read using a custom
> keybinding, I'm getting the following error:
>
> notmuch-tag: Symbol’s function definition is void: query

I recall some related/relevant/whatornot lexical-binding talk...

Also, this is mentioned in latest NEWS (for 0.32.1):

  Emacs
  -

  Restore the dynamically bound variables `tag-changes` and `query` in
  in `notmuch-before-tag-hook` and `notmuch-after-tag-hook`.

may or may not help. no time to dig deeper for now :D


Tomi


>
> Here's the backtrace:
>
> Debugger entered--Lisp error: (void-function query)
>   query("(id:pX7JAnfzR_GtdCfx1KGqCA@geopod-ismtpd-4-0)")
>   notmuch-tag("(id:pX7JAnfzR_GtdCfx1KGqCA@geopod-ismtpd-4-0)" ("-new"
> "-unread"))
>   notmuch-search-tag(("-new" "-unread"))
>   (lambda nil "unmark message as new and unread" (interactive)
> (notmuch-search-tag (list "-new" "-unread")) (forward-line))()
>   funcall-interactively((lambda nil "unmark message as new and unread"
> (interactive) (notmuch-search-tag (list "-new" "-unread")) (forward-line)))
>   call-interactively((lambda nil "unmark message as new and unread"
> (interactive) (notmuch-search-tag (list "-new" "-unread")) (forward-line))
> nil nil)
>   command-execute((lambda nil "unmark message as new and unread"
> (interactive) (notmuch-search-tag (list "-new" "-unread")) (forward-line)))
>
> And following is my notmuch-emacs configuration:
>
> (with-eval-after-load 'notmuch
>   (customize-set-variable 'notmuch-search-oldest-first nil)
>   (setq notmuch-address-command 'internal
> notmuch-address-internal-completion '(sent nil)
> notmuch-address-save-filename "~/some/dir/file"
> notmuch-address-use-company t
> notmuch-crypto-process-mime t
> notmuch-fcc-dirs "sent"
> notmuch-hello-hide-tags '("killed"))
>   ;; Search tags
>   (setq notmuch-saved-searches
> '((:name "inbox" :query "tag:inbox" :key "i")
>   (:name "unread" :query "tag:unread" :key "u")
>   (:name "new" :query "tag:new" :key "n")
>   (:name "sent" :query "tag:sent" :key "e")
>   (:name "drafts" :query "tag:draft" :key "d")
>   (:name "all mail" :query "*" :key "a")
>   (:name "todo" :query "tag:todo" :key "t")))
>   ;; Keybindings
>   (define-key notmuch-search-mode-map "S"
> (lambda ()
>   "mark message as spam"
>   (interactive)
>   (notmuch-search-tag (list "-new" "-unread" "-inbox" "+spam"))
>   (forward-line)))
>   (define-key notmuch-show-mode-map "S"
> (lambda ()
>   "mark message as spam"
>   (interactive)
>   (notmuch-show-tag (list "-new" "-unread" "-inbox" "+spam"
>   (define-key notmuch-search-mode-map "N"
> (lambda ()
>   "unmark message as new and unread"
>   (interactive)
>   (notmuch-search-tag (list "-new" "-unread"))
>   (forward-line)))
>   (define-key notmuch-show-mode-map "N"
> (lambda ()
>   "unmark message as new and unread"
>   (interactive)
>   (notmuch-show-tag (list "-new" "-unread"
>   (define-key notmuch-show-mode-map "r" 'notmuch-show-reply)
>   (define-key notmuch-show-mode-map "R" 'notmuch-show-reply-sender)
>   (define-key notmuch-search-mode-map "r" 'notmuch-search-reply-to-thread)
>   (define-key notmuch-search-mode-map "R"
> 'notmuch-search-reply-to-thread-sender))
>
> I'm a little confused as to why this isn't working -- I don't believe that
> my configuration has strayed from what's listed in the online documentation.
>
> Any insights? I don't know Emacs Lisp well enough to understand why query
> is a void function.
>
> Many thanks!
>
> David
> ___
> notmuch mailing list -- notmuch@notmuchmail.org
> To unsubscribe send an email to notmuch-le...@notmuchmail.org
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: notmuch-emacs notmuch-tag configuration

2021-06-15 Thread David Bremner
David Wen Riccardi-Zhu  writes:

> I'm using notmuch 0.32.1, Emacs 27.2, and version 20210605.1839 of
> notmuch-emacs. When I try to mark a message as read using a custom
> keybinding, I'm getting the following error:

Can you duplicate your problem with matching versions of notmuch and
notmuch-emacs, i.e. either both 0.32.1 or both from git master? It's
probably not the issue, but I don't really want to deal with melpa's
creative version numbers.

d
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


notmuch-emacs notmuch-tag configuration

2021-06-15 Thread David Wen Riccardi-Zhu
I'm using notmuch 0.32.1, Emacs 27.2, and version 20210605.1839 of
notmuch-emacs. When I try to mark a message as read using a custom
keybinding, I'm getting the following error:

notmuch-tag: Symbol’s function definition is void: query

Here's the backtrace:

Debugger entered--Lisp error: (void-function query)
  query("(id:pX7JAnfzR_GtdCfx1KGqCA@geopod-ismtpd-4-0)")
  notmuch-tag("(id:pX7JAnfzR_GtdCfx1KGqCA@geopod-ismtpd-4-0)" ("-new"
"-unread"))
  notmuch-search-tag(("-new" "-unread"))
  (lambda nil "unmark message as new and unread" (interactive)
(notmuch-search-tag (list "-new" "-unread")) (forward-line))()
  funcall-interactively((lambda nil "unmark message as new and unread"
(interactive) (notmuch-search-tag (list "-new" "-unread")) (forward-line)))
  call-interactively((lambda nil "unmark message as new and unread"
(interactive) (notmuch-search-tag (list "-new" "-unread")) (forward-line))
nil nil)
  command-execute((lambda nil "unmark message as new and unread"
(interactive) (notmuch-search-tag (list "-new" "-unread")) (forward-line)))

And following is my notmuch-emacs configuration:

(with-eval-after-load 'notmuch
  (customize-set-variable 'notmuch-search-oldest-first nil)
  (setq notmuch-address-command 'internal
notmuch-address-internal-completion '(sent nil)
notmuch-address-save-filename "~/some/dir/file"
notmuch-address-use-company t
notmuch-crypto-process-mime t
notmuch-fcc-dirs "sent"
notmuch-hello-hide-tags '("killed"))
  ;; Search tags
  (setq notmuch-saved-searches
'((:name "inbox" :query "tag:inbox" :key "i")
  (:name "unread" :query "tag:unread" :key "u")
  (:name "new" :query "tag:new" :key "n")
  (:name "sent" :query "tag:sent" :key "e")
  (:name "drafts" :query "tag:draft" :key "d")
  (:name "all mail" :query "*" :key "a")
  (:name "todo" :query "tag:todo" :key "t")))
  ;; Keybindings
  (define-key notmuch-search-mode-map "S"
(lambda ()
  "mark message as spam"
  (interactive)
  (notmuch-search-tag (list "-new" "-unread" "-inbox" "+spam"))
  (forward-line)))
  (define-key notmuch-show-mode-map "S"
(lambda ()
  "mark message as spam"
  (interactive)
  (notmuch-show-tag (list "-new" "-unread" "-inbox" "+spam"
  (define-key notmuch-search-mode-map "N"
(lambda ()
  "unmark message as new and unread"
  (interactive)
  (notmuch-search-tag (list "-new" "-unread"))
  (forward-line)))
  (define-key notmuch-show-mode-map "N"
(lambda ()
  "unmark message as new and unread"
  (interactive)
  (notmuch-show-tag (list "-new" "-unread"
  (define-key notmuch-show-mode-map "r" 'notmuch-show-reply)
  (define-key notmuch-show-mode-map "R" 'notmuch-show-reply-sender)
  (define-key notmuch-search-mode-map "r" 'notmuch-search-reply-to-thread)
  (define-key notmuch-search-mode-map "R"
'notmuch-search-reply-to-thread-sender))

I'm a little confused as to why this isn't working -- I don't believe that
my configuration has strayed from what's listed in the online documentation.

Any insights? I don't know Emacs Lisp well enough to understand why query
is a void function.

Many thanks!

David
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org