unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* emacsclient –alternate-editor= “Could not start the Emacs daemon”; "standard input is not a tty"
@ 2019-08-18 16:03 Matthew McClure
  2019-08-19 12:10 ` Matthew McClure
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew McClure @ 2019-08-18 16:03 UTC (permalink / raw)
  To: help-gnu-emacs

How might I tell emacsclient that it shouldn't need a tty to start the
Emacs daemon?

I'm using Emacs 26.2 from Homebrew Cask.

I have a Keyboard Maestro macro intended to create a new Emacs frame.

/usr/local/bin/emacsclient -n -c --alternate-editor=

It works in Bash in Terminal. If an Emacs server isn't already
running, the `--alternate-editor=` argument says to start the server
and try again.

In Keyboard Maestro, it works if an Emacs server is already running.
Otherwise, Keyboard Maestro shows the following message.

/usr/local/bin/emacsclient: can't find socket; have you started the server?
To start the server in Emacs, type "M-x server-start".
emacs: standard input is not a tty
Error: Could not start the Emacs daemon

I'm surprised that emacsclient tries to start the daemon in a way that
requires a tty.

How might I tell emacsclient that it shouldn't need a tty to start the
Emacs daemon?

-- 
Matthew McClure
Continuous Delta
https://www.continuousdelta.com/



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

* Re: emacsclient –alternate-editor= “Could not start the Emacs daemon”; "standard input is not a tty"
  2019-08-18 16:03 emacsclient –alternate-editor= “Could not start the Emacs daemon”; "standard input is not a tty" Matthew McClure
@ 2019-08-19 12:10 ` Matthew McClure
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew McClure @ 2019-08-19 12:10 UTC (permalink / raw)
  To: help-gnu-emacs

On Sun, Aug 18, 2019 at 12:03 PM Matthew McClure
<matt@continuousdelta.com> wrote:
>
> How might I tell emacsclient that it shouldn't need a tty to start the
> Emacs daemon?
>
> I'm using Emacs 26.2 from Homebrew Cask.
>
> I have a Keyboard Maestro macro intended to create a new Emacs frame.
>
> /usr/local/bin/emacsclient -n -c --alternate-editor=
>
> Keyboard Maestro shows the following message.
>
> /usr/local/bin/emacsclient: can't find socket; have you started the server?
> To start the server in Emacs, type "M-x server-start".
> emacs: standard input is not a tty
> Error: Could not start the Emacs daemon

Disregard my question.

The macro works after changing the script to:

```
PATH="/usr/local/bin:$PATH"
emacsclient -c -n --alternate-editor=
```

Keyboard Maestro uses a different environment from Bash in Terminal,
and `/usr/local/bin` wasn't in PATH. It was trying to start the Emacs
daemon using /usr/bin/emacs. On my machine that's version 22.1.1,
presumably included with macOS.

-- 
Matthew McClure
Continuous Delta
https://www.continuousdelta.com/



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

end of thread, other threads:[~2019-08-19 12:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-18 16:03 emacsclient –alternate-editor= “Could not start the Emacs daemon”; "standard input is not a tty" Matthew McClure
2019-08-19 12:10 ` Matthew McClure

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