unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Defer notmuch.el setup
@ 2022-06-02 19:01 artur.brzozowski
  2022-06-02 22:10 ` David Bremner
  0 siblings, 1 reply; 5+ messages in thread
From: artur.brzozowski @ 2022-06-02 19:01 UTC (permalink / raw)
  To: notmuch@notmuchmail.org


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

Hi.

I am trying out notmuch and notmuch.el as an Emacs user. When adding some
funcitonality to Emacs, I usually wrap its setup inside a (with-eval-after-load)
block to defer it for when it is needed. I noticed that in case of notmuch.el,
some settings are not properly set if included in in the macro - here I mean a
quite important option 'notmuch-search-oldest-first' which I set to nil. When
included inside the (with-eval-after-load) body it remains unchanged. Of course
italso makes me wonder if any other variable acts in this way and needs to be
set at Emacs runtime.

Is that a bug?

~Artur

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

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



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

* Re: Defer notmuch.el setup
  2022-06-02 19:01 Defer notmuch.el setup artur.brzozowski
@ 2022-06-02 22:10 ` David Bremner
  2022-06-03 10:14   ` Dan Čermák
  2022-06-03 12:57   ` David Bremner
  0 siblings, 2 replies; 5+ messages in thread
From: David Bremner @ 2022-06-02 22:10 UTC (permalink / raw)
  To: artur.brzozowski, notmuch@notmuchmail.org

"artur.brzozowski" <artur.brzozowski@protonmail.com> writes:

> I am trying out notmuch and notmuch.el as an Emacs user. When adding some
> funcitonality to Emacs, I usually wrap its setup inside a (with-eval-after-load)
> block to defer it for when it is needed. I noticed that in case of notmuch.el,
> some settings are not properly set if included in in the macro - here I mean a
> quite important option 'notmuch-search-oldest-first' which I set to nil. When
> included inside the (with-eval-after-load) body it remains unchanged. Of course
> italso makes me wonder if any other variable acts in this way and needs to be
> set at Emacs runtime.

I'm not sure about with-eval-after-load, but

1) you need to use setq-default for this variable (or use customize),
   because it is buffer-local.

2) You can achieve the same deferral of settings by adding your settings
   to ~/.emacs.d/notmuch-config.el

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

* Re: Defer notmuch.el setup
  2022-06-02 22:10 ` David Bremner
@ 2022-06-03 10:14   ` Dan Čermák
  2022-06-03 12:00     ` David Bremner
  2022-06-03 12:57   ` David Bremner
  1 sibling, 1 reply; 5+ messages in thread
From: Dan Čermák @ 2022-06-03 10:14 UTC (permalink / raw)
  To: David Bremner; +Cc: artur.brzozowski, notmuch@notmuchmail.org

Hi David,

David Bremner <david@tethera.net> writes:

> 2) You can achieve the same deferral of settings by adding your settings
>    to ~/.emacs.d/notmuch-config.el

Does notmuch automatically load that file upon launching?


Thanks,

Dan

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

* Re: Defer notmuch.el setup
  2022-06-03 10:14   ` Dan Čermák
@ 2022-06-03 12:00     ` David Bremner
  0 siblings, 0 replies; 5+ messages in thread
From: David Bremner @ 2022-06-03 12:00 UTC (permalink / raw)
  To: Dan Čermák; +Cc: artur.brzozowski, notmuch@notmuchmail.org

Dan Čermák <dan.cermak@posteo.net> writes:

> Hi David,
>
> David Bremner <david@tethera.net> writes:
>
>> 2) You can achieve the same deferral of settings by adding your settings
>>    to ~/.emacs.d/notmuch-config.el
>
> Does notmuch automatically load that file upon launching?

Yep, see [1] for the details.

[1]: https://notmuchmail.org/doc/latest/notmuch-emacs.html#init-file\r

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

* Re: Defer notmuch.el setup
  2022-06-02 22:10 ` David Bremner
  2022-06-03 10:14   ` Dan Čermák
@ 2022-06-03 12:57   ` David Bremner
  1 sibling, 0 replies; 5+ messages in thread
From: David Bremner @ 2022-06-03 12:57 UTC (permalink / raw)
  To: notmuch@notmuchmail.org

David Bremner <david@tethera.net> writes:

> "artur.brzozowski" <artur.brzozowski@protonmail.com> writes:
>
>> I am trying out notmuch and notmuch.el as an Emacs user. When adding some
>> funcitonality to Emacs, I usually wrap its setup inside a (with-eval-after-load)
>> block to defer it for when it is needed. I noticed that in case of notmuch.el,
>> some settings are not properly set if included in in the macro - here I mean a
>> quite important option 'notmuch-search-oldest-first' which I set to nil. When
>> included inside the (with-eval-after-load) body it remains unchanged. Of course
>> italso makes me wonder if any other variable acts in this way and needs to be
>> set at Emacs runtime.
>
> I'm not sure about with-eval-after-load, but
>
> 1) you need to use setq-default for this variable (or use customize),
>    because it is buffer-local.

Artur reported off list that using setq-default was the fix.

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

end of thread, other threads:[~2022-06-03 12:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-02 19:01 Defer notmuch.el setup artur.brzozowski
2022-06-02 22:10 ` David Bremner
2022-06-03 10:14   ` Dan Čermák
2022-06-03 12:00     ` David Bremner
2022-06-03 12:57   ` David Bremner

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).