unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Emacs.app for OSX suggestions
@ 2016-02-18  9:54 Pavlos Vinieratos
  2016-02-18 19:22 ` John Wiegley
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Pavlos Vinieratos @ 2016-02-18  9:54 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 753 bytes --]

Hello. The way Emacs.app works right now, it that it always starts a new session of emacs, so its always slow to open if you have more than an empty init file, and it doesn’t work with the daemon.

I would suggest to change the behaviour of that, and make it so that Emacs.app will start emacsclient, so if a daemon is running, it would connect to it. We could even make it so that it starts a new daemon like `-a “”` would.

I think that would benefit anyone using Emacs.app by doing what those same people would do now, which is to run a command from their shell, that does the above. Why not implement it in the .app, so that when dragging some files onto Emacs.app, it starts quickly because of the daemon?



--
Pavlos Vinieratos


[-- Attachment #2: Type: text/html, Size: 2134 bytes --]

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

* Re: Emacs.app for OSX suggestions
  2016-02-18  9:54 Emacs.app for OSX suggestions Pavlos Vinieratos
@ 2016-02-18 19:22 ` John Wiegley
  2016-02-18 21:34 ` Pavlos Vinieratos
  2016-02-19  9:09 ` Pavlos Vinieratos
  2 siblings, 0 replies; 6+ messages in thread
From: John Wiegley @ 2016-02-18 19:22 UTC (permalink / raw)
  To: Pavlos Vinieratos; +Cc: emacs-devel

>>>>> Pavlos Vinieratos <pvinis@gmail.com> writes:

> I would suggest to change the behaviour of that, and make it so that
> Emacs.app will start emacsclient, so if a daemon is running, it would
> connect to it. We could even make it so that it starts a new daemon like `-a
> “”` would.

I don't entirely understand this suggestion. What would be the exact startup
sequence, and how is it different from what happens now?

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2



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

* Re: Emacs.app for OSX suggestions
  2016-02-18  9:54 Emacs.app for OSX suggestions Pavlos Vinieratos
  2016-02-18 19:22 ` John Wiegley
@ 2016-02-18 21:34 ` Pavlos Vinieratos
  2016-02-19  3:40   ` David Caldwell
  2016-02-19  9:09 ` Pavlos Vinieratos
  2 siblings, 1 reply; 6+ messages in thread
From: Pavlos Vinieratos @ 2016-02-18 21:34 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1314 bytes --]

ok. so right now, the app just starts 'emacs'. so no mattet what, it makes
a new instance and always evals the init file, disregarding any existing
daemon or already running instance.
what im suggesting, is that it starts 'emacsclient', possibly with '-a ""',
so if there is an already running daemon, it connects to that instance, so
the initialization doesnt need to happen again.
does it make sense?

-- 
Pavlos Vinieratos

On 18 February 2016 at 10:54:20, pavlos vinieratos (pvinis@gmail.com) wrote:

> Hello. The way Emacs.app works right now, it that it always starts a new
> session of emacs, so its always slow to open if you have more than an empty
> init file, and it doesn’t work with the daemon.
>
> I would suggest to change the behaviour of that, and make it so that
> Emacs.app will start emacsclient, so if a daemon is running, it would
> connect to it. We could even make it so that it starts a new daemon like
> `-a “”` would.
>
> I think that would benefit anyone using Emacs.app by doing what those same
> people would do now, which is to run a command from their shell, that does
> the above. Why not implement it in the .app, so that when dragging some
> files onto Emacs.app, it starts quickly because of the daemon?
>
>
>
> --
> Pavlos Vinieratos
>
>

[-- Attachment #2: Type: text/html, Size: 2928 bytes --]

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

* Re: Emacs.app for OSX suggestions
  2016-02-18 21:34 ` Pavlos Vinieratos
@ 2016-02-19  3:40   ` David Caldwell
  0 siblings, 0 replies; 6+ messages in thread
From: David Caldwell @ 2016-02-19  3:40 UTC (permalink / raw)
  To: Pavlos Vinieratos, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 861 bytes --]

On 2/18/16 1:34 PM, Pavlos Vinieratos wrote:
> ok. so right now, the app just starts 'emacs'. so no mattet what, it
> makes a new instance and always evals the init file, disregarding any
> existing daemon or already running instance.

That's not quite right. If you double click the app in Finder, it'll
launch a new instance, but then if you double click it again it'll just
activate the currently running instance.

If you initially run Emacs from the command line like this (assuming you
built a .app and put it into /Applications):

  /Applications/Emacs.app/Contents/MacOS/Emacs

…then if you double click it from Finder it'll just activate the already
running app.

If, however, you run it again from the command line, you will get
another instance.

Perhaps you are running a different binary from the command line?

-David



[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3819 bytes --]

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

* Re: Emacs.app for OSX suggestions
  2016-02-18  9:54 Emacs.app for OSX suggestions Pavlos Vinieratos
  2016-02-18 19:22 ` John Wiegley
  2016-02-18 21:34 ` Pavlos Vinieratos
@ 2016-02-19  9:09 ` Pavlos Vinieratos
  2016-02-19 15:17   ` Xu Xin
  2 siblings, 1 reply; 6+ messages in thread
From: Pavlos Vinieratos @ 2016-02-19  9:09 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1834 bytes --]

yes. i was wrong.
like you said, runing emacs from the terminal, initiates every time.
launching the app initiates once and connects every next time.

so my real suggestion, is not to quit the app when i close the last window.
would that make it so that when i click on the app again, it would open
without initializing again? if yes, then thats my suggested change. if it
would still initialize, then i would like that fixed.

i might have to find how to test that myself, but is the initialization
happening when the app launches, or when the first window is opened?
by initialization i mean eval the init file. if it happens on app launch,
then it should br easy to just keep the app running so when i click the
app, even if its the first window (after i had the previous windows closed)
would open quickly. but if the initialization happens on first window
opening, then it might be a bit harder.

thoughts?

-- 
Pavlos Vinieratos

On 18 February 2016 at 10:54:20, pavlos vinieratos (pvinis@gmail.com) wrote:

> Hello. The way Emacs.app works right now, it that it always starts a new
> session of emacs, so its always slow to open if you have more than an empty
> init file, and it doesn’t work with the daemon.
>
> I would suggest to change the behaviour of that, and make it so that
> Emacs.app will start emacsclient, so if a daemon is running, it would
> connect to it. We could even make it so that it starts a new daemon like
> `-a “”` would.
>
> I think that would benefit anyone using Emacs.app by doing what those same
> people would do now, which is to run a command from their shell, that does
> the above. Why not implement it in the .app, so that when dragging some
> files onto Emacs.app, it starts quickly because of the daemon?
>
>
>
> --
> Pavlos Vinieratos
>
>

[-- Attachment #2: Type: text/html, Size: 3607 bytes --]

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

* Re: Emacs.app for OSX suggestions
  2016-02-19  9:09 ` Pavlos Vinieratos
@ 2016-02-19 15:17   ` Xu Xin
  0 siblings, 0 replies; 6+ messages in thread
From: Xu Xin @ 2016-02-19 15:17 UTC (permalink / raw)
  To: Pavlos Vinieratos; +Cc: Emacs developers

On Fri, Feb 19, 2016 at 4:09 AM, Pavlos Vinieratos <pvinis@gmail.com> wrote:
> yes. i was wrong.
> like you said, runing emacs from the terminal, initiates every time.
> launching the app initiates once and connects every next time.
>
> so my real suggestion, is not to quit the app when i close the last window.
> would that make it so that when i click on the app again, it would open
> without initializing again? if yes, then thats my suggested change. if it
> would still initialize, then i would like that fixed.
>
> i might have to find how to test that myself, but is the initialization
> happening when the app launches, or when the first window is opened?
> by initialization i mean eval the init file. if it happens on app launch,
> then it should br easy to just keep the app running so when i click the app,
> even if its the first window (after i had the previous windows closed) would
> open quickly. but if the initialization happens on first window opening,
> then it might be a bit harder.
>
> thoughts?
>
> --
> Pavlos Vinieratos
>
> On 18 February 2016 at 10:54:20, pavlos vinieratos (pvinis@gmail.com) wrote:
>>
>> Hello. The way Emacs.app works right now, it that it always starts a new
>> session of emacs, so its always slow to open if you have more than an empty
>> init file, and it doesn’t work with the daemon.
>>
>> I would suggest to change the behaviour of that, and make it so that
>> Emacs.app will start emacsclient, so if a daemon is running, it would
>> connect to it. We could even make it so that it starts a new daemon like `-a
>> “”` would.
>>
>> I think that would benefit anyone using Emacs.app by doing what those same
>> people would do now, which is to run a command from their shell, that does
>> the above. Why not implement it in the .app, so that when dragging some
>> files onto Emacs.app, it starts quickly because of the daemon?
>>
>>
>>
>> --
>> Pavlos Vinieratos
>>
>

Aquamacs has similar feature as you mentioned.

- Xin



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

end of thread, other threads:[~2016-02-19 15:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-18  9:54 Emacs.app for OSX suggestions Pavlos Vinieratos
2016-02-18 19:22 ` John Wiegley
2016-02-18 21:34 ` Pavlos Vinieratos
2016-02-19  3:40   ` David Caldwell
2016-02-19  9:09 ` Pavlos Vinieratos
2016-02-19 15:17   ` Xu Xin

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).