* ## error when running notmuch from emacsclient, but not from standalone emacs instance
@ 2023-01-18 5:14 ricardomartins
2023-01-18 14:39 ` David Bremner
0 siblings, 1 reply; 6+ messages in thread
From: ricardomartins @ 2023-01-18 5:14 UTC (permalink / raw)
To: notmuch
Hello. I'd like to report an error I'm encountering.
I installed notmuch from the arch repositories. I had previously
installed the notmuch package from the MELPA repository, but have since
uninstalled it and the error persists.
When I try to run notmuch from the emacsclient instance (M-x notmuch
<RET>), I get an error
"notmuch count --batch failed
Please check that the notmuch CLI is new enough to support `count
--batch'. In general we recommend running matching versions of
the CLI and emacs interface."
When I run notmuch from an standalone emacs instance, NOT the emacs
client, the same way (M-x notmuch <RET>), I get no errors and notmuch
works fine.
I read all the documentation. Have I missed something? Why am I
experiencing this behaviour?
Thanks
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ## error when running notmuch from emacsclient, but not from standalone emacs instance
2023-01-18 5:14 ## error when running notmuch from emacsclient, but not from standalone emacs instance ricardomartins
@ 2023-01-18 14:39 ` David Bremner
2023-01-18 14:55 ` Michael J Gruber
0 siblings, 1 reply; 6+ messages in thread
From: David Bremner @ 2023-01-18 14:39 UTC (permalink / raw)
To: ricardomartins, notmuch
ricardomartins@riseup.net writes:
>
> When I try to run notmuch from the emacsclient instance (M-x notmuch
> <RET>), I get an error
> "notmuch count --batch failed
> Please check that the notmuch CLI is new enough to support `count
> --batch'. In general we recommend running matching versions of
> the CLI and emacs interface."
>
I agree it is strange strange to have problems only affecting
emacsclient. The only thing I can think of off hand is that starting
emacsclient does not reload the emacs initialization file, so make sure
you run both experiments with a fresh restart of emacs.
What is the output of M-x notmuch-version for both emacsclient and emacs?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ## error when running notmuch from emacsclient, but not from standalone emacs instance
2023-01-18 14:39 ` David Bremner
@ 2023-01-18 14:55 ` Michael J Gruber
2023-01-18 16:52 ` ricardomartins
0 siblings, 1 reply; 6+ messages in thread
From: Michael J Gruber @ 2023-01-18 14:55 UTC (permalink / raw)
To: David Bremner; +Cc: ricardomartins, notmuch
Am Mi., 18. Jan. 2023 um 15:40 Uhr schrieb David Bremner <david@tethera.net>:
>
> ricardomartins@riseup.net writes:
>
> >
> > When I try to run notmuch from the emacsclient instance (M-x notmuch
> > <RET>), I get an error
> > "notmuch count --batch failed
> > Please check that the notmuch CLI is new enough to support `count
> > --batch'. In general we recommend running matching versions of
> > the CLI and emacs interface."
> >
>
> I agree it is strange strange to have problems only affecting
> emacsclient. The only thing I can think of off hand is that starting
> emacsclient does not reload the emacs initialization file, so make sure
> you run both experiments with a fresh restart of emacs.
>
> What is the output of M-x notmuch-version for both emacsclient and emacs?
... and how are you starting the emacs server? Depending on that,
server and standalone may get a different PATH from the environment so
that one uses the system notmuch and the other your personal install.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ## error when running notmuch from emacsclient, but not from standalone emacs instance
2023-01-18 14:55 ` Michael J Gruber
@ 2023-01-18 16:52 ` ricardomartins
2023-01-18 18:16 ` David Bremner
0 siblings, 1 reply; 6+ messages in thread
From: ricardomartins @ 2023-01-18 16:52 UTC (permalink / raw)
To: notmuch
>> What is the output of M-x notmuch-version for both emacsclient and emacs?
Both show notmuch version 0.37.
>> ... and how are you starting the emacs server?
I started as a systemd user unit. I'm using GNU Emacs 30.0.50
Development version 2f05f48918ec on master branch; build date
2023-01-07. VISUAL and EDITOR environment variables are set to
emacsclient.
>> Depending on that, server and standalone may get a different PATH from the environment so that one uses the system notmuch and the other your personal install.
Ok, so I tested this. I tried stopping the systemd unit of the emacs
server, opened an emacs instance, and started the server from within
emacs (M-x server-start <RET>). Connected to this server in a new frame
($ emacsclient -nc) and tried executing notmuch again (M-x notmuch
<RET>). This time, it worked like it should. So, definitely an issue
with the systemd unit method of initialization there, although it only
executes /usr/bin/emacs --fg-daemon, so I'm not sure exactly is going on
here that's causing the problem.
Thanks for helping.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ## error when running notmuch from emacsclient, but not from standalone emacs instance
2023-01-18 16:52 ` ricardomartins
@ 2023-01-18 18:16 ` David Bremner
2023-01-18 19:43 ` tom.hirschowitz
0 siblings, 1 reply; 6+ messages in thread
From: David Bremner @ 2023-01-18 18:16 UTC (permalink / raw)
To: ricardomartins, notmuch
ricardomartins@riseup.net writes:
> Ok, so I tested this. I tried stopping the systemd unit of the emacs
> server, opened an emacs instance, and started the server from within
> emacs (M-x server-start <RET>). Connected to this server in a new frame
> ($ emacsclient -nc) and tried executing notmuch again (M-x notmuch
> <RET>). This time, it worked like it should. So, definitely an issue
> with the systemd unit method of initialization there, although it only
> executes /usr/bin/emacs --fg-daemon, so I'm not sure exactly is going on
> here that's causing the problem.
I don't have personal experience with running emacs from systemd, but I
guess it could be worth trying
M-: (executable-find "notmuch")
That will verify that you are not being tripped up by multiple notmuch
executables.
Another thing to try is
M-x notmuch-search <return> tag:inbox <return>
This may give a more helpful error message (or it may work fine,
indicating the problem is really with notmuch count, but the --batch
option is almost 10 years old now, so I think that error checking
probably needs to be updated.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ## error when running notmuch from emacsclient, but not from standalone emacs instance
2023-01-18 18:16 ` David Bremner
@ 2023-01-18 19:43 ` tom.hirschowitz
0 siblings, 0 replies; 6+ messages in thread
From: tom.hirschowitz @ 2023-01-18 19:43 UTC (permalink / raw)
To: notmuch
Just a wild guess: have you tried installing the emacs package exec-path-from-shell (from melpa)?
On 18/01/2023 19:16, David Bremner <david@tethera.net> wrote:
> ricardomartins@riseup.net writes:
>
> > Ok, so I tested this. I tried stopping the systemd unit of the emacs
> > server, opened an emacs instance, and started the server from within
> > emacs (M-x server-start <RET>). Connected to this server in a new frame
> > ($ emacsclient -nc) and tried executing notmuch again (M-x notmuch
> > <RET>). This time, it worked like it should. So, definitely an issue
> > with the systemd unit method of initialization there, although it only
> > executes /usr/bin/emacs --fg-daemon, so I'm not sure exactly is going on
> > here that's causing the problem.
>
> I don't have personal experience with running emacs from systemd, but I
> guess it could be worth trying
>
> M-: (executable-find "notmuch")
>
> That will verify that you are not being tripped up by multiple notmuch
> executables.
>
> Another thing to try is
>
> M-x notmuch-search <return> tag:inbox <return>
>
> This may give a more helpful error message (or it may work fine,
> indicating the problem is really with notmuch count, but the --batch
> option is almost 10 years old now, so I think that error checking
> probably needs to be updated.
>
>
> _______________________________________________
> notmuch mailing list -- notmuch@notmuchmail.org
> To unsubscribe send an email to notmuch-leave@notmuchmail.org
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-01-18 19:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-18 5:14 ## error when running notmuch from emacsclient, but not from standalone emacs instance ricardomartins
2023-01-18 14:39 ` David Bremner
2023-01-18 14:55 ` Michael J Gruber
2023-01-18 16:52 ` ricardomartins
2023-01-18 18:16 ` David Bremner
2023-01-18 19:43 ` tom.hirschowitz
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).