unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Eric Blake <eblake@redhat.com>
To: David Bremner <david@tethera.net>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH] config: Inform user if config file is broken
Date: Wed, 6 Sep 2023 11:11:42 -0500	[thread overview]
Message-ID: <i4bjnjjsgxujjobbzrsza3butikeofa25af3kpvou4hdtqffpt@kriuwawlrtwk> (raw)
In-Reply-To: <87o7if1eww.fsf@tethera.net>

On Wed, Sep 06, 2023 at 12:48:15PM -0300, David Bremner wrote:
> Eric Blake <eblake@redhat.com> writes:
> 
> >
> > I'm not sure if this is the best approach (as this is my first ever
> > patch to notmuch), but it's better than nothing.
> 
> Unfortunately we can't just print from there because it is in a shared
> library (whose clients might not appreciate output).  Something _almost_
> equivalent can be done with _notmuch_database_log, but that still
> requires the caller to read those logs with
> notmuch_database_status_string.

I'm out of time to spend further on this bug today; if you would like
to take the ideas in my patch and rework it into something usable, be
my guest.  Otherwise, I might be able to return to this bug later in
the week to see if I can figure out how to grab the database_log at
the right point when status is NOTMUCH_STATUS_FILE_ERROR is returned
(open.cc:notmuch_database_load_config DONE label looks like it should
be able to grab from the database log if status_string is present).

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org

  reply	other threads:[~2023-09-06 16:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06 12:49 notmuch breaks on \. in config file with upgrade from glib2 2.76.1 to 2.76.5 Eric Blake
2023-09-06 14:37 ` Michael J Gruber
2023-09-06 15:42   ` Eric Blake
2023-09-06 15:26 ` [PATCH] config: Inform user if config file is broken Eric Blake
2023-09-06 15:48   ` David Bremner
2023-09-06 16:11     ` Eric Blake [this message]
2023-09-10  0:37 ` notmuch breaks on \. in config file with upgrade from glib2 2.76.1 to 2.76.5 David Bremner
2023-09-10 11:58   ` David Bremner
2023-09-11 15:06     ` Eric Blake

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=i4bjnjjsgxujjobbzrsza3butikeofa25af3kpvou4hdtqffpt@kriuwawlrtwk \
    --to=eblake@redhat.com \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /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).