unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Bug: Unrecognized option: --sort=newest-first
@ 2021-08-06  8:56 Firmin Martin
  2021-08-06 10:16 ` David Bremner
  0 siblings, 1 reply; 5+ messages in thread
From: Firmin Martin @ 2021-08-06  8:56 UTC (permalink / raw)
  To: notmuch

If I remember correctly, after upgrading notmuch.el through MELPA,
I have experienced a strange bug when calling
notmuch-tree-from-search-thread in Emacs: it failed due
to the error "Unrecognized option: --sort=newest-first"

The first thing I did was building Notmuch from source to the last
version 0.32.2 (M-x notmuch-version and the CLI command notmuch version
return the same version).

But the error was still there. After investigating a bit, the bug resides
in the notmuch-tree function: it wrongly passes sort-arg to "notmuch
show" which, I believe, doesn't have the option "--sort" at all. Removing it
fixes the bug. Would be grateful if anyone can patch it.

Thanks,

Firmin Martin

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

* Re: Bug: Unrecognized option: --sort=newest-first
  2021-08-06  8:56 Bug: Unrecognized option: --sort=newest-first Firmin Martin
@ 2021-08-06 10:16 ` David Bremner
  2021-08-06 10:32   ` Firmin Martin
  0 siblings, 1 reply; 5+ messages in thread
From: David Bremner @ 2021-08-06 10:16 UTC (permalink / raw)
  To: Firmin Martin, notmuch

Firmin Martin <firminmartin24@gmail.com> writes:

> If I remember correctly, after upgrading notmuch.el through MELPA,
> I have experienced a strange bug when calling
> notmuch-tree-from-search-thread in Emacs: it failed due
> to the error "Unrecognized option: --sort=newest-first"

Yep. If you choose to use MELPA, you need to (somehow) keep the notmuch
binary in sync.

d

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

* Re: Bug: Unrecognized option: --sort=newest-first
  2021-08-06 10:16 ` David Bremner
@ 2021-08-06 10:32   ` Firmin Martin
  2021-08-06 11:45     ` Adam Plaice
  0 siblings, 1 reply; 5+ messages in thread
From: Firmin Martin @ 2021-08-06 10:32 UTC (permalink / raw)
  To: David Bremner, notmuch

David Bremner <david@tethera.net> writes:

> Firmin Martin <firminmartin24@gmail.com> writes:
>
>> If I remember correctly, after upgrading notmuch.el through MELPA,
>> I have experienced a strange bug when calling
>> notmuch-tree-from-search-thread in Emacs: it failed due
>> to the error "Unrecognized option: --sort=newest-first"
>
> Yep. If you choose to use MELPA, you need to (somehow) keep the notmuch
> binary in sync.

Yeah, that's exactly what I've done. And the bug is unrelated to the
binary: it's in the notmuch-tree function (see the lower part of the bug
report).

    command: notmuch show --body\=false --format\=sexp --format-version\=4 --sort\=newest-first --entire-thread thread\:000000000000b4ea\ and\ \(date\:today\ and\ tag\:inbox\)
    exit status: 1
    stderr:
    Unrecognized option: --sort=newest-first

It calls notmuch show with the option --sort, which is wrong.

Firmin

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

* Re: Bug: Unrecognized option: --sort=newest-first
  2021-08-06 10:32   ` Firmin Martin
@ 2021-08-06 11:45     ` Adam Plaice
  2021-08-06 12:06       ` Firmin Martin
  0 siblings, 1 reply; 5+ messages in thread
From: Adam Plaice @ 2021-08-06 11:45 UTC (permalink / raw)
  To: Firmin Martin; +Cc: notmuch

> > Yep. If you choose to use MELPA, you need to (somehow) keep the notmuch
> > binary in sync.
>
> Yeah, that's exactly what I've done. And the bug is unrelated to the
> binary: it's in the notmuch-tree function (see the lower part of the bug
> report).

I'm not a notmuch developer, but I think that the point is that if
you're using "unstable" MELPA (i.e. not Stable MELPA), then your emacs
package will be based on the latest development version (tip of git
master).  If you've built the notmuch binary from a release, then the
notmuch binary and the emacs package won't be in sync.

The latest development version of notmuch does have a sort option:

https://git.notmuchmail.org/git?p=notmuch;a=commit;h=32f42581e35ee0ebdd89c4cb44292e7979dc5eb7

but it hasn't yet been included in any "released" version of notmuch.


If you use use-package, then I'd recommend adding MELPA stable to your
package-archives and pinning notmuch to melpa-stable:

(use-package notmuch :pin melpa-stable)

It won't solve the issue of notmuch-emacs being out of sync with
repository packages (at least not on stable distros), but it will make
it easier to keep up with from-source binary builds (or binaries from
Nix/Guix if you use that).

Adam

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

* Re: Bug: Unrecognized option: --sort=newest-first
  2021-08-06 11:45     ` Adam Plaice
@ 2021-08-06 12:06       ` Firmin Martin
  0 siblings, 0 replies; 5+ messages in thread
From: Firmin Martin @ 2021-08-06 12:06 UTC (permalink / raw)
  To: Adam Plaice, David Bremner; +Cc: notmuch

Adam Plaice <plaice.adam+notmuch@gmail.com> writes:

> I'm not a notmuch developer, but I think that the point is that if
> you're using "unstable" MELPA (i.e. not Stable MELPA), then your emacs
> package will be based on the latest development version (tip of git
> master).  If you've built the notmuch binary from a release, then the
> notmuch binary and the emacs package won't be in sync.
>
> The latest development version of notmuch does have a sort option:
>
> https://git.notmuchmail.org/git?p=notmuch;a=commit;h=32f42581e35ee0ebdd89c4cb44292e7979dc5eb7
>
> but it hasn't yet been included in any "released" version of notmuch.
>
>
> If you use use-package, then I'd recommend adding MELPA stable to your
> package-archives and pinning notmuch to melpa-stable:
>
> (use-package notmuch :pin melpa-stable)
>
> It won't solve the issue of notmuch-emacs being out of sync with
> repository packages (at least not on stable distros), but it will make
> it easier to keep up with from-source binary builds (or binaries from
> Nix/Guix if you use that).

Ah, that's make a lot of sense. Thanks, Adam.
I Will opt for that solution.
Also thank you David, I didn't understand immediately your reply.

Have a good day,

Firmin

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

end of thread, other threads:[~2021-08-06 12:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06  8:56 Bug: Unrecognized option: --sort=newest-first Firmin Martin
2021-08-06 10:16 ` David Bremner
2021-08-06 10:32   ` Firmin Martin
2021-08-06 11:45     ` Adam Plaice
2021-08-06 12:06       ` Firmin Martin

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