unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* notmuch-emacs notmuch-tag configuration
@ 2021-06-15 14:20 David Wen Riccardi-Zhu
  2021-06-15 18:23 ` David Bremner
  2021-06-16  8:28 ` Tomi Ollila
  0 siblings, 2 replies; 4+ messages in thread
From: David Wen Riccardi-Zhu @ 2021-06-15 14:20 UTC (permalink / raw)
  To: notmuch


[-- Attachment #1.1: Type: text/plain, Size: 3314 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 4421 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: notmuch-emacs notmuch-tag configuration
  2021-06-15 14:20 notmuch-emacs notmuch-tag configuration David Wen Riccardi-Zhu
@ 2021-06-15 18:23 ` David Bremner
  2021-06-17  2:12   ` Kyle Meyer
  2021-06-16  8:28 ` Tomi Ollila
  1 sibling, 1 reply; 4+ messages in thread
From: David Bremner @ 2021-06-15 18:23 UTC (permalink / raw)
  To: David Wen Riccardi-Zhu, notmuch

David Wen Riccardi-Zhu <dwrz@dwrz.net> 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

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

* Re: notmuch-emacs notmuch-tag configuration
  2021-06-15 14:20 notmuch-emacs notmuch-tag configuration David Wen Riccardi-Zhu
  2021-06-15 18:23 ` David Bremner
@ 2021-06-16  8:28 ` Tomi Ollila
  1 sibling, 0 replies; 4+ messages in thread
From: Tomi Ollila @ 2021-06-16  8:28 UTC (permalink / raw)
  To: David Wen Riccardi-Zhu, notmuch

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-leave@notmuchmail.org

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

* Re: notmuch-emacs notmuch-tag configuration
  2021-06-15 18:23 ` David Bremner
@ 2021-06-17  2:12   ` Kyle Meyer
  0 siblings, 0 replies; 4+ messages in thread
From: Kyle Meyer @ 2021-06-17  2:12 UTC (permalink / raw)
  To: David Bremner; +Cc: David Wen Riccardi-Zhu, notmuch

David Bremner writes:

> David Wen Riccardi-Zhu <dwrz@dwrz.net> 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.

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

end of thread, other threads:[~2021-06-17  2:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 14:20 notmuch-emacs notmuch-tag configuration David Wen Riccardi-Zhu
2021-06-15 18:23 ` David Bremner
2021-06-17  2:12   ` Kyle Meyer
2021-06-16  8:28 ` Tomi Ollila

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).