unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Edmondson <dme@dme.org>
To: Sean Whitton <spwhitton@spwhitton.name>, notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs: Respect `load-prefer-newer` when loading `notmuch-init-file'
Date: Mon, 01 Jun 2020 09:16:46 +0100	[thread overview]
Message-ID: <m24krvcia9.fsf@dme.org> (raw)
In-Reply-To: <20200601061704.24071-1-spwhitton@spwhitton.name>

On Sunday, 2020-05-31 at 23:17:04 -07, Sean Whitton wrote:

> Before this change, `load-prefer-newer' was ignored.
>
> Set NOERROR and MUST-SUFFIX arguments of `load' to t, and NOSUFFIX
> argument to nil, to preserve the behaviour of the deleted `let' form.

Reviewed-by: David Edmondson <dme@dme.org>

> ---
> I've observed that the way that the code at the end of notmuch.el
> loads the user's notmuch-init-file means that the variable
> load-prefer-newer is effectively ignored: notmuch.el will always load
> notmuch-config.elc in preference to notmuch-config.el, even if the
> latter is newer than the former.  This patch should fix the problem
> without changing anything else.
>
>  emacs/notmuch.el | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/emacs/notmuch.el b/emacs/notmuch.el
> index a980c7a2..5a24d8a7 100644
> --- a/emacs/notmuch.el
> +++ b/emacs/notmuch.el
> @@ -1148,8 +1148,6 @@ beginning of the line."
>  
>  ;; After provide to avoid loops if notmuch was require'd via notmuch-init-file.
>  (if init-file-user ; don't load init file if the -q option was used.
> -    (let ((init-file (locate-file notmuch-init-file '("/")
> -				  (get-load-suffixes))))
> -      (if init-file (load init-file nil t t))))
> +    (load notmuch-init-file t t nil t))
>  
>  ;;; notmuch.el ends here
> -- 
> 2.26.2
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch

dme.
-- 
I went starin' out of my window, been caught doin' it once or twice.

  reply	other threads:[~2020-06-01  8:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-01  6:17 [PATCH] emacs: Respect `load-prefer-newer` when loading `notmuch-init-file' Sean Whitton
2020-06-01  8:16 ` David Edmondson [this message]
2020-06-01 10:59   ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m24krvcia9.fsf@dme.org \
    --to=dme@dme.org \
    --cc=notmuch@notmuchmail.org \
    --cc=spwhitton@spwhitton.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).