Re: (wrong-type-argument keymapp notmuch-show-mode-map) in emacs on upgrade to notmuch from master

2021-05-27 Thread David Bremner
Daniel Kahn Gillmor  writes:

> If we don't want to go through the full hassle of deprecation and delay
> before final removal, it seems like a mention in NEWS is at least
> worthwhile.
>

Since the change is released, it's a bit late to uh, not release it ;).
No objection to adding to NEWS retroactively.

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


Re: (wrong-type-argument keymapp notmuch-show-mode-map) in emacs on upgrade to notmuch from master

2021-05-27 Thread Daniel Kahn Gillmor
On Wed 2021-05-26 23:34:47 -0400, Kyle Meyer wrote:
> Daniel Kahn Gillmor writes:
>
>> I worry that this is due to one of the two following commits but my
>> elisp-foo is weak enough that i don't know what the right next steps are:
>
> It's due to the second commit, 05a436f7 (emacs: don't fset keymaps,
> 2020-11-11).  You could avoid the error by dropping the quote from the
> keymap variable, changing
>
>   (define-key 'notmuch-show-mode-map "j" 'dkg-notmuch-show-handle-junk)
>
> to
>
>   (define-key notmuch-show-mode-map "j" 'dkg-notmuch-show-handle-junk)

Thanks, this does resolve the issue for me.  I see the patch was
discussed briefly on-list back in November before being merged.

I wonder how many other users will have this problem when upgrading, i
don't know how widespread the use of the quoted variables are in
~/.emacs.  In some sense their removal is a change to the elisp API :/

The conservative API designer in me suggests that rather than removing
these elements directly, we should deprecate first, warning if people
use them (and those warnings should include guidance on how to avoid the
warnings).  Then, after sufficient time has passed, drop the deprecated
element.

This isn't important for me anymore (the issue is resolved for me,
thanks Kyle!), but maybe it will be for others?

If we don't want to go through the full hassle of deprecation and delay
before final removal, it seems like a mention in NEWS is at least
worthwhile.

Regards,

--dkg


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: (wrong-type-argument keymapp notmuch-show-mode-map) in emacs on upgrade to notmuch from master

2021-05-26 Thread Kyle Meyer
Daniel Kahn Gillmor writes:

> I worry that this is due to one of the two following commits but my
> elisp-foo is weak enough that i don't know what the right next steps are:

It's due to the second commit, 05a436f7 (emacs: don't fset keymaps,
2020-11-11).  You could avoid the error by dropping the quote from the
keymap variable, changing

  (define-key 'notmuch-show-mode-map "j" 'dkg-notmuch-show-handle-junk)

to

  (define-key notmuch-show-mode-map "j" 'dkg-notmuch-show-handle-junk)
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


(wrong-type-argument keymapp notmuch-show-mode-map) in emacs on upgrade to notmuch from master

2021-05-26 Thread Daniel Kahn Gillmor
I just tried to upgrade notmuch to the head of development.  my ~/.emacs
contains a stanza for a shortcut for dealing with junk mail, which has
given me no problems at all for notmuch 0.31.4-1:

-
;; notmuch junk handling
(defun dkg-notmuch-show-handle-junk ()
  "Mark the message as spam, archive the thread, and display the next thread."
  (interactive)
  (notmuch-show-tag-all '("-inbox" "+spam"))
  (notmuch-show-next-thread t))
(define-key 'notmuch-show-mode-map "j" 'dkg-notmuch-show-handle-junk)
-

After the upgrade, though, if i restart emacs, i get a failure when
loading my ~/.emacs:

Debugger entered--Lisp error: (wrong-type-argument keymapp 
notmuch-show-mode-map)
  define-key(notmuch-show-mode-map "j" dkg-notmuch-show-handle-junk)
  eval-buffer(# nil "/home/dkg/.emacs" nil t)  ; Reading at 
buffer position 23847
  load-with-code-conversion("/home/dkg/.emacs" "/home/dkg/.emacs" t t)
  load("~/.emacs" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #) #f(compiled-function () #) t)
  command-line()
  normal-top-level()


I'll try downgrading again to see what's replicable, but i'm kind of
confused by this, as it's been working for years.

 --dkg


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org