Newbie question defining deleted map

classic Classic list List threaded Threaded
5 messages Options
Jürgen Beier Jürgen Beier
Reply | Threaded
Open this post in threaded view
|

Newbie question defining deleted map

Hi,

I am trying to set up notmuch-emacs.

I found the advice in the faq to define an key map "d" to add a "deleted
tag" to the mail to be used in the notmuch message mode.

I put according to the advice the following in my .emacs file:


(define-key notmuch-show-mode-map "d"
     (lambda ()
       (interactive)
        (notmuch-show-tag "+deleted")))


and I get the following error:


Warning (initialization): An error occurred while loading
`/home/beier/.emacs':

Symbol's value as variable is void: notmuch-show-mode-map

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the `--debug-init' option to view a complete error backtrace.

Doing this I get the following:


Debugger entered--Lisp error: (void-variable notmuch-show-mode-map)
   (define-key notmuch-show-mode-map "d" (function (lambda nil
(interactive) (notmuch-show-tag "+deleted"))))
   eval-buffer(#<buffer  *load*> nil "/home/beier/.emacs" nil t)  ;
Reading at buffer position 17386
   load-with-code-conversion("/home/beier/.emacs" "/home/user/.emacs" t t)
   load("~/.emacs" t t)

[...]

[init-file-user system-type delayed-warnings-list user-init-file
inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs"
windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$"
"~/.emacs" "^_emacs\\(\\.elc?\\)?$" (initialization "`_emacs' init file
is deprecated, please use `.emacs'") "~/_emacs" t load expand-file-name
"init" file-name-as-directory "/.emacs.d" file-name-extension "elc"
file-name-sans-extension ".el" file-exists-p file-newer-than-file-p
message "Warning: %s is newer than %s" sit-for 1 "default"] 7 "\n\n(fn)"]()
   command-line()
   normal-top-level()

I am using:

GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
  of 2017-09-20 on lcy01-07, modified by Debian

Could you give me some advice? Thank you.


Juergen


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

Re: Newbie question defining deleted map

On Wed, Oct 25 2017, Jürgen Beier wrote:

> Hi,
>
> I am trying to set up notmuch-emacs.
>
> I found the advice in the faq to define an key map "d" to add a "deleted
> tag" to the mail to be used in the notmuch message mode.
>
> I put according to the advice the following in my .emacs file:

where is that advice?

perhaps putting that to ~/.emacs.d/notmuch-config.el helps ?

that file is loaded *after* notmuch is loaded so the keymap is defined

Tomi

>
>
> (define-key notmuch-show-mode-map "d"
>      (lambda ()
>        (interactive)
>         (notmuch-show-tag "+deleted")))
>
>
> and I get the following error:
>
>
> Warning (initialization): An error occurred while loading
> `/home/beier/.emacs':
>
> Symbol's value as variable is void: notmuch-show-mode-map
>
> To ensure normal operation, you should investigate and remove the
> cause of the error in your initialization file.  Start Emacs with
> the `--debug-init' option to view a complete error backtrace.
>
> Doing this I get the following:
>
>
> Debugger entered--Lisp error: (void-variable notmuch-show-mode-map)
>    (define-key notmuch-show-mode-map "d" (function (lambda nil
> (interactive) (notmuch-show-tag "+deleted"))))
>    eval-buffer(#<buffer  *load*> nil "/home/beier/.emacs" nil t)  ;
> Reading at buffer position 17386
>    load-with-code-conversion("/home/beier/.emacs" "/home/user/.emacs" t t)
>    load("~/.emacs" t t)
>
> [...]
>
> [init-file-user system-type delayed-warnings-list user-init-file
> inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs"
> windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$"
> "~/.emacs" "^_emacs\\(\\.elc?\\)?$" (initialization "`_emacs' init file
> is deprecated, please use `.emacs'") "~/_emacs" t load expand-file-name
> "init" file-name-as-directory "/.emacs.d" file-name-extension "elc"
> file-name-sans-extension ".el" file-exists-p file-newer-than-file-p
> message "Warning: %s is newer than %s" sit-for 1 "default"] 7 "\n\n(fn)"]()
>    command-line()
>    normal-top-level()
>
> I am using:
>
> GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
>   of 2017-09-20 on lcy01-07, modified by Debian
>
> Could you give me some advice? Thank you.
>
>
> Juergen
>
>
> _______________________________________________
> notmuch mailing list
> [hidden email]
> https://notmuchmail.org/mailman/listinfo/notmuch
_______________________________________________
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: Newbie question defining deleted map

Tomi Ollila <[hidden email]> writes:

> On Wed, Oct 25 2017, Jürgen Beier wrote:
>
>> Hi,
>>
>> I am trying to set up notmuch-emacs.
>>
>> I found the advice in the faq to define an key map "d" to add a "deleted
>> tag" to the mail to be used in the notmuch message mode.
>>
>> I put according to the advice the following in my .emacs file:
>
> where is that advice?
>
> perhaps putting that to ~/.emacs.d/notmuch-config.el helps ?
>
> that file is loaded *after* notmuch is loaded so the keymap is defined

It seems worth noting that recent versions of notmuch-emacs have a
binding 'k d' that addes the deleted tag. This works at least in
notmuch-search, notmuch-show and notmuch-tree mode.
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Tomi Ollila-2 Tomi Ollila-2
Reply | Threaded
Open this post in threaded view
|

Re: Newbie question defining deleted map

On Wed, Oct 25 2017, David Bremner wrote:

> Tomi Ollila <[hidden email]> writes:
>
>> On Wed, Oct 25 2017, Jürgen Beier wrote:
>>
>>> Hi,
>>>
>>> I am trying to set up notmuch-emacs.
>>>
>>> I found the advice in the faq to define an key map "d" to add a "deleted
>>> tag" to the mail to be used in the notmuch message mode.
>>>
>>> I put according to the advice the following in my .emacs file:
>>
>> where is that advice?
>>
>> perhaps putting that to ~/.emacs.d/notmuch-config.el helps ?
>>
>> that file is loaded *after* notmuch is loaded so the keymap is defined
>
> It seems worth noting that recent versions of notmuch-emacs have a
> binding 'k d' that addes the deleted tag. This works at least in
> notmuch-search, notmuch-show and notmuch-tree mode.

Indeed! I always forgot to remove my current alternative binding for doing
that!

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Jürgen Beier Jürgen Beier
Reply | Threaded
Open this post in threaded view
|

Re: Newbie question defining deleted map



Am 25.10.2017 um 22:32 schrieb Tomi Ollila:

> On Wed, Oct 25 2017, David Bremner wrote:
>
>> Tomi Ollila <[hidden email]> writes:
>>
>>> On Wed, Oct 25 2017, Jürgen Beier wrote:
>>>
>>>> Hi,
>>>>
>>>> I am trying to set up notmuch-emacs.
>>>>
>>>> I found the advice in the faq to define an key map "d" to add a "deleted
>>>> tag" to the mail to be used in the notmuch message mode.
>>>>
>>>> I put according to the advice the following in my .emacs file:
>>> where is that advice?
I found it here:

https://notmuchmail.org/excluding/
>>>
>>> perhaps putting that to ~/.emacs.d/notmuch-config.el helps ?
>>>
>>> that file is loaded *after* notmuch is loaded so the keymap is defined
My system is Linux Mint 18.1 Cinnamon on Ubuntu. There is no
notmuch-config.el in ~/-emacs.d/
>>> It seems worth noting that recent versions of notmuch-emacs have a
>>> binding 'k d' that addes the deleted tag. This works at least in
>>> notmuch-search, notmuch-show and notmuch-tree mode.
> Indeed! I always forgot to remove my current alternative binding for doing
> that!
I have notmuch and notmuch-emacs version 0.21-3ubuntu2, GNU Emacs 24.5.1,

Obviously too old.


> Best wishes
Jürgen
>

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