kflak · 2022-03-28 12:24
Hi,
Total emacs noob here, using doom as a launchpad into the wider world of lisp operating systems...
I want to open notmuch in tree view by default. When I put this into my config:
`(setq +notmuch-home-function (lambda () (notmuch-tree "tag:inbox")))`
I get this error:
`Symbol’s function definition is void: notmuch-tree`
It seems notmuch-tree is only available from within a notmuch-buffer. How can I access it programmatically from the outside?
rmurri · 2022-03-28 14:31
Looks like you're trying to run a function that hasn't been loaded yet. Try adding (require 'notmuch-tree) as the first line of your lambda and see where it gets you.
sylvain_soliman · 2022-03-28 14:47
I think the OP is using Doom (from the title) hence probably `(after! notmuch-tree (setq …))`
kflak · 2022-03-28 16:00
Yes, indeed running doom :-) Did the whole setup from scratch experience for many years with (neo)vim, but right now I would like something that works more or less out of the box...
No joy with either of the approaches. Tried
```
(after! notmuch-search
(setq +notmuch-home-function (lambda () (notmuch-tree "tag:inbox")))
)
```
and
```
(setq +notmuch-home-function (lambda () (require 'notmuch-tree "tag:inbox")))
```
There was no error, but none of them worked as I expected.
sylvain_soliman · 2022-03-29 07:45
I'm sorry, since I'm not using notmuch… I can't really help much (hu hu).
Maybe try `(after! notmuch (…))`?
T_Verron · 2022-03-29 08:20
The second one is not what you want, it should be:
```
(setq +notmuch-home-function
(lambda ()
(require 'notmuch-tree)
(notmuch-tree "tag:inbox")))
```
For the first one, `(after! notmuch-tree...` sounds better than `(after! notmuch-search`, since the point is to ensure that this is evaluated only after `notmuch-tree` is loaded (which you will have to require somewhere else).
kflak · 2022-03-29 16:41
Fantastic! Works like a charm :-) My main misunderstanding is the function of `(after`...` it seems. Thanks a lot for clarifying that.
kflak · 2022-03-29 16:43
Now I just need to figure out how to make a different font weight for read and unread messages in tree-view...
c256 · 2022-04-01 07:06
When point is on a character that you want to customize, press “C-u C-x =“. This will pop up a buffer with emacs’ detailed description of the character, including any faces (emacs parlance for styling text, plus a few other things) — the faces are at the bottom of the buffer that pops up, so you may have to scroll down to see it.
If there are different faces for unread and read messages, you can customize them individually (or just one) to get the effect you want. Using normal emacs methods, you can customize the face in your running emacs, and save the customization for later. Doom probably changes this somehow, but I’m afraid I can’t help you there. Good luck!