all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* starting the emacs daemon using init.org?
@ 2015-07-19 20:19 Sharon Kimble
  2015-07-19 23:20 ` Emanuel Berg
  2015-07-20  3:03 ` Ian Zimmerman
  0 siblings, 2 replies; 32+ messages in thread
From: Sharon Kimble @ 2015-07-19 20:19 UTC (permalink / raw)
  To: help-gnu-emacs

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

I've been thinking about running emacs as a daemon to quicken my loadup
times and also able to recover quickly when emacs crashes and restarts.
But how?

My setup is emacs 24.5.50.3 as a GUI, on a standalone machine, its the
only machine working actually, running debian 8 using fluxbox as my
window manager. I start emacs from "~/.emacs.d/init.el" which then
tangles "~/.emacs.d/org/init.org" to produce "~/.emacs.d/org/init.el".

I've been looking for how to run the "emacs --daemon" but I haven't seen
any instructions as to how to do it with a setup similar to mine. So can
anyone advise please?

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.0, fluxbox 1.3.7, emacs 24.5.50.2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: starting the emacs daemon using init.org?
  2015-07-19 20:19 starting the emacs daemon using init.org? Sharon Kimble
@ 2015-07-19 23:20 ` Emanuel Berg
  2015-07-20 11:28   ` Sharon Kimble
       [not found]   ` <mailman.7173.1437391698.904.help-gnu-emacs@gnu.org>
  2015-07-20  3:03 ` Ian Zimmerman
  1 sibling, 2 replies; 32+ messages in thread
From: Emanuel Berg @ 2015-07-19 23:20 UTC (permalink / raw)
  To: help-gnu-emacs

Sharon Kimble <boudiccas@skimble.plus.com> writes:

> I've been thinking about running emacs as a daemon
> to quicken my loadup times and also able to recover
> quickly when emacs crashes and restarts. But how?

My Emacs takes 2-3 seconds to start on a moderately
fast machine, and I have 75 init files!

Emacs shouldn't crash, ever. Mine doesn't, ever, so
yours shouldn't either. Otherwise it just wouldn't
be fair!

So:

    1. Does your Emacs really take that long to start?

    2. In which situations does it crash?

-- 
underground experts united
http://user.it.uu.se/~embe8573




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

* Re: starting the emacs daemon using init.org?
  2015-07-19 20:19 starting the emacs daemon using init.org? Sharon Kimble
  2015-07-19 23:20 ` Emanuel Berg
@ 2015-07-20  3:03 ` Ian Zimmerman
  2015-07-20 11:25   ` Sharon Kimble
  1 sibling, 1 reply; 32+ messages in thread
From: Ian Zimmerman @ 2015-07-20  3:03 UTC (permalink / raw)
  To: help-gnu-emacs

On 2015-07-19 21:19 +0100, Sharon Kimble wrote:

> I've been looking for how to run the "emacs --daemon" but I haven't seen
> any instructions as to how to do it with a setup similar to mine. So can
> anyone advise please?

If your computer isn't up "all the time", you probably just want to use
the normal GUI Emacs as a server at the same time.

That is done by putting

(server-start)

in your init file.  See the documentation for server-start for more info.

-- 
Please *no* private copies of mailing list or newsgroup messages.
Rule 420: All persons more than eight miles high to leave the court.




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

* Re: starting the emacs daemon using init.org?
  2015-07-20  3:03 ` Ian Zimmerman
@ 2015-07-20 11:25   ` Sharon Kimble
  2015-07-20 14:30     ` Ian Zimmerman
  0 siblings, 1 reply; 32+ messages in thread
From: Sharon Kimble @ 2015-07-20 11:25 UTC (permalink / raw)
  To: Ian Zimmerman; +Cc: help-gnu-emacs

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

Ian Zimmerman <itz@buug.org> writes:

> On 2015-07-19 21:19 +0100, Sharon Kimble wrote:
>
>> I've been looking for how to run the "emacs --daemon" but I haven't seen
>> any instructions as to how to do it with a setup similar to mine. So can
>> anyone advise please?
>
> If your computer isn't up "all the time", you probably just want to use
> the normal GUI Emacs as a server at the same time.

The computer is on 24/7, permanently connected to the internet with a
broadband connection. 
>
> That is done by putting
>
> (server-start)
>
> in your init file.  See the documentation for server-start for more
> info.

But that surely means that when emacs is closed/crashes so does the
server-start die, which is what I'm trying to avoid? 

Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.0, fluxbox 1.3.7, emacs 24.5.50.3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: starting the emacs daemon using init.org?
  2015-07-19 23:20 ` Emanuel Berg
@ 2015-07-20 11:28   ` Sharon Kimble
  2015-07-20 13:41     ` Marcin Borkowski
  2015-07-20 23:35     ` Emanuel Berg
       [not found]   ` <mailman.7173.1437391698.904.help-gnu-emacs@gnu.org>
  1 sibling, 2 replies; 32+ messages in thread
From: Sharon Kimble @ 2015-07-20 11:28 UTC (permalink / raw)
  To: help-gnu-emacs

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

Emanuel Berg <embe8573@student.uu.se> writes:

> Sharon Kimble <boudiccas@skimble.plus.com> writes:
>
>> I've been thinking about running emacs as a daemon
>> to quicken my loadup times and also able to recover
>> quickly when emacs crashes and restarts. But how?
>
> My Emacs takes 2-3 seconds to start on a moderately
> fast machine, and I have 75 init files!
>
> Emacs shouldn't crash, ever. Mine doesn't, ever, so
> yours shouldn't either. Otherwise it just wouldn't
> be fair!
>
> So:
>
>     1. Does your Emacs really take that long to start?

'fraid so! I've never actually timed it, but I am sitting waiting for it
to be in a useable state.
>
>     2. In which situations does it crash?

Usually when I'm writing in latex, and suddenly, in the blink of an eye,
its gone! So far I haven't lost any data on restarting. but it is an
annoyance.

Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.0, fluxbox 1.3.7, emacs 24.5.50.3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: starting the emacs daemon using init.org?
       [not found]   ` <mailman.7173.1437391698.904.help-gnu-emacs@gnu.org>
@ 2015-07-20 12:42     ` Barry Fishman
  2015-07-20 12:57       ` Rusi
  2015-07-20 13:40       ` Marcin Borkowski
  0 siblings, 2 replies; 32+ messages in thread
From: Barry Fishman @ 2015-07-20 12:42 UTC (permalink / raw)
  To: help-gnu-emacs


On 2015-07-20 12:28:26 +0100, Sharon Kimble wrote:
> Emanuel Berg <embe8573@student.uu.se> writes:
>> Sharon Kimble <boudiccas@skimble.plus.com> writes:
>>
>>> I've been thinking about running emacs as a daemon
>>> to quicken my loadup times and also able to recover
>>> quickly when emacs crashes and restarts. But how?
>>     1. Does your Emacs really take that long to start?
>
> 'fraid so! I've never actually timed it, but I am sitting waiting for it
> to be in a useable state.
>>
>>     2. In which situations does it crash?
>
> Usually when I'm writing in latex, and suddenly, in the blink of an eye,
> its gone! So far I haven't lost any data on restarting. but it is an
> annoyance.

I can't remember the last time Emacs crashed on me.  I do tend to have
issues with mistyping so I have disabled my most common reasons for my
Emacs to disappear.  First I never need to background Emacs from the
keyboard:

;;; Re-establish C-z prefix
(defvar my-control-map (make-sparse-keymap))
(define-key global-map [(control z)] my-control-map)

With gives me another key to put my own bindings.  I then make sure
any C-x C-c isn't an accident:

;;; Require confirmation and rebind C-x C-c appropriately
(defun my-exit-from-emacs ()
  (interactive)
  (if (yes-or-no-p "Do you want to exit ")
      (save-buffers-kill-terminal)))
(define-key global-map [(control x) (control c)] 'my-exit-from-emacs)

Since disappearing is common enough to be an issue you might try to
investigate further with the usual:

(setq debug-on-error t)
(setq debug-on-quit t)
(setq debug-on-signal t)

to find out what is really happening, and consider making a bug report.

--
Barry Fishman


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

* Re: starting the emacs daemon using init.org?
  2015-07-20 12:42     ` Barry Fishman
@ 2015-07-20 12:57       ` Rusi
  2015-07-20 19:23         ` Sharon Kimble
  2015-07-20 13:40       ` Marcin Borkowski
  1 sibling, 1 reply; 32+ messages in thread
From: Rusi @ 2015-07-20 12:57 UTC (permalink / raw)
  To: help-gnu-emacs

On Monday, July 20, 2015 at 6:12:31 PM UTC+5:30, Barry Fishman wrote:
> On 2015-07-20 12:28:26 +0100, Sharon Kimble wrote:
> > Emanuel Berg  writes:
> >> Sharon Kimble writes:
> >>
> >>> I've been thinking about running emacs as a daemon
> >>> to quicken my loadup times and also able to recover
> >>> quickly when emacs crashes and restarts. But how?
> >>     1. Does your Emacs really take that long to start?
> >
> > 'fraid so! I've never actually timed it, but I am sitting waiting for it
> > to be in a useable state.
> >>
> >>     2. In which situations does it crash?
> >
> > Usually when I'm writing in latex, and suddenly, in the blink of an eye,
> > its gone! So far I haven't lost any data on restarting. but it is an
> > annoyance.

I suggest (as a debugging device) to give up on server daemon etc,
just start emacs normally from a shell until it 'crashes'.
When it does is there any shell message?


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

* Re: starting the emacs daemon using init.org?
  2015-07-20 12:42     ` Barry Fishman
  2015-07-20 12:57       ` Rusi
@ 2015-07-20 13:40       ` Marcin Borkowski
  1 sibling, 0 replies; 32+ messages in thread
From: Marcin Borkowski @ 2015-07-20 13:40 UTC (permalink / raw)
  To: help-gnu-emacs


On 2015-07-20, at 14:42, Barry Fishman <barry_fishman@acm.org> wrote:

> I can't remember the last time Emacs crashed on me.  I do tend to have

It happens.  I remember mu4e hanged for me two times (though it was
probably not mu4e's fault, I suspect some HTML rendering issue).

> issues with mistyping so I have disabled my most common reasons for my
> Emacs to disappear.  First I never need to background Emacs from the
> keyboard:
>
> ;;; Re-establish C-z prefix
> (defvar my-control-map (make-sparse-keymap))
> (define-key global-map [(control z)] my-control-map)
>
> With gives me another key to put my own bindings.  I then make sure

Ha, that's exactly what I do, too!

> any C-x C-c isn't an accident:
>
> ;;; Require confirmation and rebind C-x C-c appropriately
> (defun my-exit-from-emacs ()
>   (interactive)
>   (if (yes-or-no-p "Do you want to exit ")
>       (save-buffers-kill-terminal)))
> (define-key global-map [(control x) (control c)] 'my-exit-from-emacs)

As an aside: why not just (setq confirm-kill-emacs #'yes-or-no-p)?

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



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

* Re: starting the emacs daemon using init.org?
  2015-07-20 11:28   ` Sharon Kimble
@ 2015-07-20 13:41     ` Marcin Borkowski
  2015-07-20 14:20       ` Subhan Michael Tindall
  2015-07-20 23:45       ` starting the emacs daemon using init.org? Emanuel Berg
  2015-07-20 23:35     ` Emanuel Berg
  1 sibling, 2 replies; 32+ messages in thread
From: Marcin Borkowski @ 2015-07-20 13:41 UTC (permalink / raw)
  To: help-gnu-emacs


On 2015-07-20, at 13:28, Sharon Kimble <boudiccas@skimble.plus.com> wrote:

>>     1. Does your Emacs really take that long to start?
>
> 'fraid so! I've never actually timed it, but I am sitting waiting for it
> to be in a useable state.

M-x emacs-init-time

(Mine is 55.0 seconds.)

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



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

* Re: starting the emacs daemon using init.org?
  2015-07-20 13:41     ` Marcin Borkowski
@ 2015-07-20 14:20       ` Subhan Michael Tindall
  2015-07-20 17:29         ` Sharon Kimble
  2015-07-20 23:45       ` starting the emacs daemon using init.org? Emanuel Berg
  1 sibling, 1 reply; 32+ messages in thread
From: Subhan Michael Tindall @ 2015-07-20 14:20 UTC (permalink / raw)
  To: Marcin Borkowski, help-gnu-emacs

Running as a server likely means that you will just move your crash to the
server.  But I believe you can run 'emacs - - daemon &'  to start the
server in the background,  and use emacsclient to connect.  See the manual
for more info

On Mon, Jul 20, 2015, 6:42 AM Marcin Borkowski <mbork@mbork.pl> wrote:

>
> On 2015-07-20, at 13:28, Sharon Kimble <boudiccas@skimble.plus.com> wrote:
>
> >>     1. Does your Emacs really take that long to start?
> >
> > 'fraid so! I've never actually timed it, but I am sitting waiting for it
> > to be in a useable state.
>
> M-x emacs-init-time
>
> (Mine is 55.0 seconds.)
>
> Best,
>
> --
> Marcin Borkowski
> http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
> Faculty of Mathematics and Computer Science
> Adam Mickiewicz University
>
>


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

* Re: starting the emacs daemon using init.org?
  2015-07-20 11:25   ` Sharon Kimble
@ 2015-07-20 14:30     ` Ian Zimmerman
  2015-07-20 14:54       ` Paul Smith
  0 siblings, 1 reply; 32+ messages in thread
From: Ian Zimmerman @ 2015-07-20 14:30 UTC (permalink / raw)
  To: help-gnu-emacs

On 2015-07-20 12:25 +0100, Sharon Kimble wrote:

> The computer is on 24/7, permanently connected to the internet with a
> broadband connection. 

> > (server-start)

> But that surely means that when emacs is closed/crashes so does the
> server-start die, which is what I'm trying to avoid? 

Yes.  I was wrong about your environment (see above).

But really, I can honestly say I have _never_ seen Emacs crash.  A few
times it went into an infinite spin because a package did something
dirty, mostly involving an external process.  But crash, never.

So you may in fact want emacs --daemon.  On my server type machines
where this is applicable, I do it with a personal crontab entry marked
@boot.

-- 
Please *no* private copies of mailing list or newsgroup messages.
Rule 420: All persons more than eight miles high to leave the court.




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

* Re: starting the emacs daemon using init.org?
  2015-07-20 14:30     ` Ian Zimmerman
@ 2015-07-20 14:54       ` Paul Smith
  2015-07-20 15:43         ` Óscar Fuentes
  0 siblings, 1 reply; 32+ messages in thread
From: Paul Smith @ 2015-07-20 14:54 UTC (permalink / raw)
  To: help-gnu-emacs

On Mon, 2015-07-20 at 07:30 -0700, Ian Zimmerman wrote:
> But really, I can honestly say I have _never_ seen Emacs crash.  A few
> times it went into an infinite spin because a package did something
> dirty, mostly involving an external process.  But crash, never.

It crashes on me sometimes.  Maybe once every month or two, I'll find it
disappeared and a core file sitting in my home directory.  Also
sometimes Emacs gets into weird states with font-lock and indentation in
my code (mostly C++) and I need to restart it to clear it up.  Other
than that I never restart it unless I need to reboot my system.

But I have an interesting use-case:

      * I run emacs --daemon as part of my login process.
      * I run a GNOME desktop and use the GTK-enabled Emacs.
      * At work I create X window frames using emacsclient.
      * When at home I ssh to my work system in a (big) xterm and use
        emacsclient to attach to the daemon and create text frames,
        rather than sending X remotely (our VPN is not super-speedy and
        I type pretty fast :)).

I have a feeling that using both X and non-X frames in the same Emacs is
not as well-tested and may have corner-case issues.




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

* Re: starting the emacs daemon using init.org?
  2015-07-20 14:54       ` Paul Smith
@ 2015-07-20 15:43         ` Óscar Fuentes
  2015-07-20 16:39           ` Paul Smith
  0 siblings, 1 reply; 32+ messages in thread
From: Óscar Fuentes @ 2015-07-20 15:43 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: Paul Smith

Paul Smith <psmith@gnu.org> writes:

> On Mon, 2015-07-20 at 07:30 -0700, Ian Zimmerman wrote:
>> But really, I can honestly say I have _never_ seen Emacs crash.  A few
>> times it went into an infinite spin because a package did something
>> dirty, mostly involving an external process.  But crash, never.
>
> It crashes on me sometimes.  Maybe once every month or two, I'll find it
> disappeared and a core file sitting in my home directory.  Also
> sometimes Emacs gets into weird states with font-lock and indentation in
> my code (mostly C++) and I need to restart it to clear it up.  Other
> than that I never restart it unless I need to reboot my system.
>
> But I have an interesting use-case:
>
>       * I run emacs --daemon as part of my login process.
>       * I run a GNOME desktop and use the GTK-enabled Emacs.
>       * At work I create X window frames using emacsclient.
>       * When at home I ssh to my work system in a (big) xterm and use
>         emacsclient to attach to the daemon and create text frames,
>         rather than sending X remotely (our VPN is not super-speedy and
>         I type pretty fast :)).
>
> I have a feeling that using both X and non-X frames in the same Emacs is
> not as well-tested and may have corner-case issues.

Most likely your setup triggers a well-known bug. It is mentioned on a
message on the terminal when emacs --daemon is started and in PROBLEMS
(`Help' menu -> `Emacs Known Problems'):

** When Emacs is compiled with Gtk+, closing a display kills Emacs.

There is a long-standing bug in GTK that prevents it from recovering
from disconnects: http://bugzilla.gnome.org/show_bug.cgi?id=85715.

Thus, for instance, when Emacs is run as a server on a text terminal,
and an X frame is created, and the X server for that frame crashes or
exits unexpectedly, Emacs must exit to prevent a GTK error that would
result in an endless loop.

If you need Emacs to be able to recover from closing displays, compile
it with the Lucid toolkit instead of GTK.




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

* Re: starting the emacs daemon using init.org?
  2015-07-20 15:43         ` Óscar Fuentes
@ 2015-07-20 16:39           ` Paul Smith
  0 siblings, 0 replies; 32+ messages in thread
From: Paul Smith @ 2015-07-20 16:39 UTC (permalink / raw)
  To: Óscar Fuentes; +Cc: help-gnu-emacs

On Mon, 2015-07-20 at 17:43 +0200, Óscar Fuentes wrote:
> ** When Emacs is compiled with Gtk+, closing a display kills Emacs.

Yes, I'm aware of that bug, but I don't believe it's causing my issues
(for example no display was closed when this happens; both my ssh
session and the local display session are still running... also I only
ever start remote Emacs sessions as text frames, not X frames, and I'm
not sure that closing an SSH session would even count).  However I've
not investigated it either so who knows?




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

* Re: starting the emacs daemon using init.org?
  2015-07-20 14:20       ` Subhan Michael Tindall
@ 2015-07-20 17:29         ` Sharon Kimble
  2015-07-20 17:36           ` Paul Smith
  2015-07-20 19:19           ` Sharon Kimble
  0 siblings, 2 replies; 32+ messages in thread
From: Sharon Kimble @ 2015-07-20 17:29 UTC (permalink / raw)
  To: Subhan Michael Tindall; +Cc: help-gnu-emacs

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

Subhan Michael Tindall <subhan.michael@gmail.com> writes:

> Running as a server likely means that you will just move your crash to the
> server.  But I believe you can run 'emacs - - daemon &'  to start the
> server in the background,  and use emacsclient to connect.  See the manual
> for more info
>
> On Mon, Jul 20, 2015, 6:42 AM Marcin Borkowski <mbork@mbork.pl> wrote:
>
>>
>> On 2015-07-20, at 13:28, Sharon Kimble <boudiccas@skimble.plus.com> wrote:
>>
>> >>     1. Does your Emacs really take that long to start?
>> >
>> > 'fraid so! I've never actually timed it, but I am sitting waiting for it
>> > to be in a useable state.
>>
>> M-x emacs-init-time
>>
>> (Mine is 55.0 seconds.)
>>
>
Thanks Marcin.

I didn't know about that command, and when run it shows my init-time of
60.4 seconds, which does surprise me as it seems longer to me than that.

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.0, fluxbox 1.3.7, emacs 24.5.50.3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: starting the emacs daemon using init.org?
  2015-07-20 17:29         ` Sharon Kimble
@ 2015-07-20 17:36           ` Paul Smith
  2015-07-20 17:46             ` John Mastro
       [not found]             ` <mailman.7190.1437414422.904.help-gnu-emacs@gnu.org>
  2015-07-20 19:19           ` Sharon Kimble
  1 sibling, 2 replies; 32+ messages in thread
From: Paul Smith @ 2015-07-20 17:36 UTC (permalink / raw)
  To: Sharon Kimble; +Cc: help-gnu-emacs, Subhan Michael Tindall

On Mon, 2015-07-20 at 18:29 +0100, Sharon Kimble wrote:
> >> (Mine is 55.0 seconds.)
> >
> Thanks Marcin.
> 
> I didn't know about that command, and when run it shows my init-time
> of 60.4 seconds, which does surprise me as it seems longer to me than
> that.

Wow I wonder what you all are doing in your init files!!

My init time is 1.8 seconds...!




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

* Re: starting the emacs daemon using init.org?
  2015-07-20 17:36           ` Paul Smith
@ 2015-07-20 17:46             ` John Mastro
  2015-07-20 18:41               ` Marcin Borkowski
       [not found]             ` <mailman.7190.1437414422.904.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 32+ messages in thread
From: John Mastro @ 2015-07-20 17:46 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

> > >> (Mine is 55.0 seconds.)
> > >
> > Thanks Marcin.
> >
> > I didn't know about that command, and when run it shows my init-time
> > of 60.4 seconds, which does surprise me as it seems longer to me than
> > that.
>
> Wow I wonder what you all are doing in your init files!!
>
> My init time is 1.8 seconds...!

4.3 seconds on Windows and 2.5 on Linux here. Both machines are
reasonably spec'd (e.g. quad core i5 from a couple years ago) but
definitely not monsters. And I have almost 100 packages installed and
3,600 SLOC in my init files.

If you're not using `with-eval-after-load' (or `eval-after-load'), I
highly recommend it.

-- 
john



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

* Re: starting the emacs daemon using init.org?
  2015-07-20 17:46             ` John Mastro
@ 2015-07-20 18:41               ` Marcin Borkowski
  2015-07-23  7:40                 ` Eric S Fraga
       [not found]                 ` <mailman.7294.1437640616.904.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 32+ messages in thread
From: Marcin Borkowski @ 2015-07-20 18:41 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org


On 2015-07-20, at 19:46, John Mastro <john.b.mastro@gmail.com> wrote:

>> Wow I wonder what you all are doing in your init files!!
>>
>> My init time is 1.8 seconds...!
>
> 4.3 seconds on Windows and 2.5 on Linux here. Both machines are
> reasonably spec'd (e.g. quad core i5 from a couple years ago) but
> definitely not monsters. And I have almost 100 packages installed and
> 3,600 SLOC in my init files.
>
> If you're not using `with-eval-after-load' (or `eval-after-load'), I
> highly recommend it.

I deliberately do not use any deferred loading of packages etc. - if
I end up autoloading something, I usually put a (require '...) in my
init.el so that Emacs doesn't pause when loading e.g. AUCTeX.  I very
much prefer longer startup time than pauses during work.

Also, I use a few large libraries - Org, Icicles, AUCTeX...

And I have a pretty low-end (about $150 three years back) netbook, which
is more than enough for Elisp coding, email, Org and LaTeX.  Also, long
startup-time doesn't bother me at all - I often have M-x emacs-uptime of
several days or even more than a week.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



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

* Re: starting the emacs daemon using init.org?
  2015-07-20 17:29         ` Sharon Kimble
  2015-07-20 17:36           ` Paul Smith
@ 2015-07-20 19:19           ` Sharon Kimble
  2015-07-21 15:08             ` Startup time [Was: starting the emacs daemon using init.org?] Ian Zimmerman
       [not found]             ` <mailman.7228.1437491341.904.help-gnu-emacs@gnu.org>
  1 sibling, 2 replies; 32+ messages in thread
From: Sharon Kimble @ 2015-07-20 19:19 UTC (permalink / raw)
  To: Subhan Michael Tindall; +Cc: help-gnu-emacs

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

Sharon Kimble <boudiccas@skimble.plus.com> writes:

> Subhan Michael Tindall <subhan.michael@gmail.com> writes:
>
>> Running as a server likely means that you will just move your crash to the
>> server.  But I believe you can run 'emacs - - daemon &'  to start the
>> server in the background,  and use emacsclient to connect.  See the manual
>> for more info
>>
>> On Mon, Jul 20, 2015, 6:42 AM Marcin Borkowski <mbork@mbork.pl> wrote:
>>
>>>
>>> On 2015-07-20, at 13:28, Sharon Kimble <boudiccas@skimble.plus.com> wrote:
>>>
>>> >>     1. Does your Emacs really take that long to start?
>>> >
>>> > 'fraid so! I've never actually timed it, but I am sitting waiting for it
>>> > to be in a useable state.
>>>
>>> M-x emacs-init-time
>>>
>>> (Mine is 55.0 seconds.)
>>>
>>
> Thanks Marcin.
>
> I didn't know about that command, and when run it shows my init-time of
> 60.4 seconds, which does surprise me as it seems longer to me than that.
>
I've just reloaded emacs after changing my init.org, and it took 142.3secs!

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.0, fluxbox 1.3.7, emacs 24.5.50.3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: starting the emacs daemon using init.org?
  2015-07-20 12:57       ` Rusi
@ 2015-07-20 19:23         ` Sharon Kimble
  2015-07-21 13:17           ` Robert Thorpe
  0 siblings, 1 reply; 32+ messages in thread
From: Sharon Kimble @ 2015-07-20 19:23 UTC (permalink / raw)
  To: Rusi; +Cc: help-gnu-emacs

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

Rusi <rustompmody@gmail.com> writes:

> On Monday, July 20, 2015 at 6:12:31 PM UTC+5:30, Barry Fishman wrote:
>> On 2015-07-20 12:28:26 +0100, Sharon Kimble wrote:
>> > Emanuel Berg  writes:
>> >> Sharon Kimble writes:
>> >>
>> >>> I've been thinking about running emacs as a daemon
>> >>> to quicken my loadup times and also able to recover
>> >>> quickly when emacs crashes and restarts. But how?
>> >>     1. Does your Emacs really take that long to start?
>> >
>> > 'fraid so! I've never actually timed it, but I am sitting waiting for it
>> > to be in a useable state.
>> >>
>> >>     2. In which situations does it crash?
>> >
>> > Usually when I'm writing in latex, and suddenly, in the blink of an eye,
>> > its gone! So far I haven't lost any data on restarting. but it is an
>> > annoyance.
>
> I suggest (as a debugging device) to give up on server daemon etc,
> just start emacs normally from a shell until it 'crashes'.
> When it does is there any shell message?

Will do.

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.0, fluxbox 1.3.7, emacs 24.5.50.3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: starting the emacs daemon using init.org?
  2015-07-20 11:28   ` Sharon Kimble
  2015-07-20 13:41     ` Marcin Borkowski
@ 2015-07-20 23:35     ` Emanuel Berg
  1 sibling, 0 replies; 32+ messages in thread
From: Emanuel Berg @ 2015-07-20 23:35 UTC (permalink / raw)
  To: help-gnu-emacs

Sharon Kimble <boudiccas@skimble.plus.com> writes:

> 'fraid so! I've never actually timed it, but I am
> sitting waiting for it to be in a useable state.

Well, time it then. Remember, "what you can't measure,
you can't control".

> Usually when I'm writing in latex, and suddenly, in
> the blink of an eye, its gone! So far I haven't lost
> any data on restarting. but it is an annoyance.

That shouldn't happen. It never happened to me so
I don't know what to do about it, but others (ha)
might help you with that. But it shouldn't happen so
this is the entry point of your problem.

-- 
underground experts united
http://user.it.uu.se/~embe8573




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

* Re: starting the emacs daemon using init.org?
  2015-07-20 13:41     ` Marcin Borkowski
  2015-07-20 14:20       ` Subhan Michael Tindall
@ 2015-07-20 23:45       ` Emanuel Berg
  1 sibling, 0 replies; 32+ messages in thread
From: Emanuel Berg @ 2015-07-20 23:45 UTC (permalink / raw)
  To: help-gnu-emacs

Marcin Borkowski <mbork@mbork.pl> writes:

> M-x emacs-init-time
>
> (Mine is 55.0 seconds.)

Mine is 26.2 (?!) but that is incorrect, it is
2-3 seconds!

-- 
underground experts united
http://user.it.uu.se/~embe8573




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

* Re: starting the emacs daemon using init.org?
  2015-07-20 19:23         ` Sharon Kimble
@ 2015-07-21 13:17           ` Robert Thorpe
  0 siblings, 0 replies; 32+ messages in thread
From: Robert Thorpe @ 2015-07-21 13:17 UTC (permalink / raw)
  To: Sharon Kimble; +Cc: rustompmody, help-gnu-emacs

Sharon Kimble <boudiccas@skimble.plus.com> writes:
>>> > Usually when I'm writing in latex, and suddenly, in the blink of an eye,
>>> > its gone! So far I haven't lost any data on restarting. but it is an
>>> > annoyance.
>>
>> I suggest (as a debugging device) to give up on server daemon etc,
>> just start emacs normally from a shell until it 'crashes'.
>> When it does is there any shell message?
>
> Will do.

As others have said, you seem to have found a bug in a LaTeX mode.
That's the core problem.  Using Emacs' daemon mode is unlikely to help.

By the way, you mention the possibility that emacsclient tried to
contact Emacs and Emacs isn't there.  That's the situation that
ALTERNATE_EDITOR and the emacsclient switch --alternate-editor are for.
Look those up in the manual.

BR,
Robert Thorpe



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

* Startup time [Was: starting the emacs daemon using init.org?]
  2015-07-20 19:19           ` Sharon Kimble
@ 2015-07-21 15:08             ` Ian Zimmerman
       [not found]             ` <mailman.7228.1437491341.904.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 32+ messages in thread
From: Ian Zimmerman @ 2015-07-21 15:08 UTC (permalink / raw)
  To: help-gnu-emacs

On 2015-07-20 20:19 +0100, Sharon Kimble wrote:

> I've just reloaded emacs after changing my init.org, and it took 142.3secs!

Do you (and others who suffer from long startup times) use the "desktop"
feature, reopening the files that were open when emacs last exited?  If
yes, are all these files still needed?  Maybe you should do one (or
both) of the following:

Manually close some files (kill some buffers, in emacs speak)

Set the desktop-buffers-not-to-save variable to exclude some buffers
from the auto-reopening mechanism

-- 
Please *no* private copies of mailing list or newsgroup messages.
Rule 420: All persons more than eight miles high to leave the court.




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

* Re: Startup time [Was: starting the emacs daemon using init.org?]
       [not found]             ` <mailman.7228.1437491341.904.help-gnu-emacs@gnu.org>
@ 2015-07-21 15:28               ` Pascal J. Bourguignon
  2015-07-21 19:05                 ` Marcin Borkowski
  2015-07-21 21:10                 ` Emanuel Berg
  2015-07-21 18:19               ` Robert Marshall
  1 sibling, 2 replies; 32+ messages in thread
From: Pascal J. Bourguignon @ 2015-07-21 15:28 UTC (permalink / raw)
  To: help-gnu-emacs

Ian Zimmerman <itz@buug.org> writes:

> On 2015-07-20 20:19 +0100, Sharon Kimble wrote:
>
>> I've just reloaded emacs after changing my init.org, and it took 142.3secs!

My startup time was Sat 2015-07-18 14:08:03.
(emacs-uptime)
--> "Up 3d 3h 19m 57s (Sat 2015-07-18 14:08:03), 58 buffers, 3 files"


Thank you very much,
-- 
__Pascal Bourguignon__                 http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk


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

* Re: Startup time [Was: starting the emacs daemon using init.org?]
       [not found]             ` <mailman.7228.1437491341.904.help-gnu-emacs@gnu.org>
  2015-07-21 15:28               ` Pascal J. Bourguignon
@ 2015-07-21 18:19               ` Robert Marshall
  1 sibling, 0 replies; 32+ messages in thread
From: Robert Marshall @ 2015-07-21 18:19 UTC (permalink / raw)
  To: help-gnu-emacs

On Tue, Jul 21 2015, Ian Zimmerman <itz@buug.org> wrote:

> On 2015-07-20 20:19 +0100, Sharon Kimble wrote:
>
>> I've just reloaded emacs after changing my init.org, and it took 142.3secs!
>
> Do you (and others who suffer from long startup times) use the "desktop"
> feature, reopening the files that were open when emacs last exited?  If
> yes, are all these files still needed?  Maybe you should do one (or
> both) of the following:
>
> Manually close some files (kill some buffers, in emacs speak)
>
> Set the desktop-buffers-not-to-save variable to exclude some buffers
> from the auto-reopening mechanism

I use desktop and have an init time of 3.7 sec but I do have
(setq desktop-restore-eager 50)

[and I have far too many buffers hanging around that I need to get around
to removing!]

Robert
-- 
La grenouille songe..dans son château d'eau


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

* Re: Startup time [Was: starting the emacs daemon using init.org?]
  2015-07-21 15:28               ` Pascal J. Bourguignon
@ 2015-07-21 19:05                 ` Marcin Borkowski
  2015-07-21 21:10                 ` Emanuel Berg
  1 sibling, 0 replies; 32+ messages in thread
From: Marcin Borkowski @ 2015-07-21 19:05 UTC (permalink / raw)
  To: help-gnu-emacs


On 2015-07-21, at 17:28, Pascal J. Bourguignon <pjb@informatimago.com> wrote:

> My startup time was Sat 2015-07-18 14:08:03.
> (emacs-uptime)
> --> "Up 3d 3h 19m 57s (Sat 2015-07-18 14:08:03), 58 buffers, 3 files"

OT: my (emacs-uptime) does not report the number of buffers etc.  Where
did you get it from?

> Thank you very much,

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



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

* Re: Startup time [Was: starting the emacs daemon using init.org?]
  2015-07-21 15:28               ` Pascal J. Bourguignon
  2015-07-21 19:05                 ` Marcin Borkowski
@ 2015-07-21 21:10                 ` Emanuel Berg
  1 sibling, 0 replies; 32+ messages in thread
From: Emanuel Berg @ 2015-07-21 21:10 UTC (permalink / raw)
  To: help-gnu-emacs

"Pascal J. Bourguignon" <pjb@informatimago.com>
writes:

> My startup time was Sat 2015-07-18 14:08:03.
> (emacs-uptime) --> "Up 3d 3h 19m 57s (Sat 2015-07-18
> 14:08:03), 58 buffers, 3 files"

Is `emacs-uptime' there just for bragging (like the
Unix uptime(1)) or does it serve other purposes
as well?

-- 
underground experts united
http://user.it.uu.se/~embe8573




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

* Re: starting the emacs daemon using init.org?
       [not found]             ` <mailman.7190.1437414422.904.help-gnu-emacs@gnu.org>
@ 2015-07-23  1:46               ` Rusi
  0 siblings, 0 replies; 32+ messages in thread
From: Rusi @ 2015-07-23  1:46 UTC (permalink / raw)
  To: help-gnu-emacs

On Monday, July 20, 2015 at 11:17:04 PM UTC+5:30, John Mastro wrote:
> > > >> (Mine is 55.0 seconds.)
> > > >
> > > Thanks Marcin.
> > >
> > > I didn't know about that command, and when run it shows my init-time
> > > of 60.4 seconds, which does surprise me as it seems longer to me than
> > > that.
> >
> > Wow I wonder what you all are doing in your init files!!
> >
> > My init time is 1.8 seconds...!
> 
> 4.3 seconds on Windows and 2.5 on Linux here. Both machines are
> reasonably spec'd (e.g. quad core i5 from a couple years ago) but
> definitely not monsters. And I have almost 100 packages installed and
> 3,600 SLOC in my init files.
> 
> If you're not using `with-eval-after-load' (or `eval-after-load'), I
> highly recommend it.

There is John Wiegley's 'use-package' which promises significantly cut-down
init times + way cleaner init.
[I am trying to migrate my init... so no promises :-) ]
https://github.com/jwiegley/use-package
https://www.youtube.com/watch?v=2TSKxxYEbII


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

* Re: starting the emacs daemon using init.org?
  2015-07-20 18:41               ` Marcin Borkowski
@ 2015-07-23  7:40                 ` Eric S Fraga
  2015-07-23 13:40                   ` Grant Rettke
       [not found]                 ` <mailman.7294.1437640616.904.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 32+ messages in thread
From: Eric S Fraga @ 2015-07-23  7:40 UTC (permalink / raw)
  To: help-gnu-emacs

On Monday, 20 Jul 2015 at 20:41, Marcin Borkowski wrote:

[...]

> Also, I use a few large libraries - Org, Icicles, AUCTeX...
>
> And I have a pretty low-end (about $150 three years back) netbook, which
> is more than enough for Elisp coding, email, Org and LaTeX.  Also, long
> startup-time doesn't bother me at all - I often have M-x emacs-uptime of
> several days or even more than a week.

I'm running a similar scenario: large packages, require at load time,
running for days (5d 22h at the moment) on a low power system
(OpenPandora 600 MHz): init time of 36 seconds.

-- 
: Eric S Fraga, GnuPG: 0xFFFCF67D
: in Emacs 24.5.1 + Ma Gnus v0.14 + evil-git-bdeb602
: BBDB version 3.0.50 (2013-11-16 11:30:49 -0600)




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

* Re: starting the emacs daemon using init.org?
       [not found]                 ` <mailman.7294.1437640616.904.help-gnu-emacs@gnu.org>
@ 2015-07-23  9:00                   ` Rusi
  0 siblings, 0 replies; 32+ messages in thread
From: Rusi @ 2015-07-23  9:00 UTC (permalink / raw)
  To: help-gnu-emacs

On Thursday, July 23, 2015 at 2:06:58 PM UTC+5:30, Eric S Fraga wrote:
> On Monday, 20 Jul 2015 at 20:41, Marcin Borkowski wrote:
> 
> [...]
> 
> > Also, I use a few large libraries - Org, Icicles, AUCTeX...
> >
> > And I have a pretty low-end (about $150 three years back) netbook, which
> > is more than enough for Elisp coding, email, Org and LaTeX.  Also, long
> > startup-time doesn't bother me at all - I often have M-x emacs-uptime of
> > several days or even more than a week.
> 
> I'm running a similar scenario: large packages, require at load time,
> running for days (5d 22h at the moment) on a low power system
> (OpenPandora 600 MHz): init time of 36 seconds.

A data-point that would help for people with long inits is the difference
between emacs-init-time with normal start and with -Q start


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

* Re: starting the emacs daemon using init.org?
  2015-07-23  7:40                 ` Eric S Fraga
@ 2015-07-23 13:40                   ` Grant Rettke
  0 siblings, 0 replies; 32+ messages in thread
From: Grant Rettke @ 2015-07-23 13:40 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: Emacs Help

On Thu, Jul 23, 2015 at 2:40 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:

> I'm running a similar scenario: large packages, require at load time,
> running for days (5d 22h at the moment) on a low power system
> (OpenPandora 600 MHz): init time of 36 seconds.

Thanks for sharing that. I was already convinced to migrate over to
`use-package'... glad to you you got what you had hoped!



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

end of thread, other threads:[~2015-07-23 13:40 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-19 20:19 starting the emacs daemon using init.org? Sharon Kimble
2015-07-19 23:20 ` Emanuel Berg
2015-07-20 11:28   ` Sharon Kimble
2015-07-20 13:41     ` Marcin Borkowski
2015-07-20 14:20       ` Subhan Michael Tindall
2015-07-20 17:29         ` Sharon Kimble
2015-07-20 17:36           ` Paul Smith
2015-07-20 17:46             ` John Mastro
2015-07-20 18:41               ` Marcin Borkowski
2015-07-23  7:40                 ` Eric S Fraga
2015-07-23 13:40                   ` Grant Rettke
     [not found]                 ` <mailman.7294.1437640616.904.help-gnu-emacs@gnu.org>
2015-07-23  9:00                   ` Rusi
     [not found]             ` <mailman.7190.1437414422.904.help-gnu-emacs@gnu.org>
2015-07-23  1:46               ` Rusi
2015-07-20 19:19           ` Sharon Kimble
2015-07-21 15:08             ` Startup time [Was: starting the emacs daemon using init.org?] Ian Zimmerman
     [not found]             ` <mailman.7228.1437491341.904.help-gnu-emacs@gnu.org>
2015-07-21 15:28               ` Pascal J. Bourguignon
2015-07-21 19:05                 ` Marcin Borkowski
2015-07-21 21:10                 ` Emanuel Berg
2015-07-21 18:19               ` Robert Marshall
2015-07-20 23:45       ` starting the emacs daemon using init.org? Emanuel Berg
2015-07-20 23:35     ` Emanuel Berg
     [not found]   ` <mailman.7173.1437391698.904.help-gnu-emacs@gnu.org>
2015-07-20 12:42     ` Barry Fishman
2015-07-20 12:57       ` Rusi
2015-07-20 19:23         ` Sharon Kimble
2015-07-21 13:17           ` Robert Thorpe
2015-07-20 13:40       ` Marcin Borkowski
2015-07-20  3:03 ` Ian Zimmerman
2015-07-20 11:25   ` Sharon Kimble
2015-07-20 14:30     ` Ian Zimmerman
2015-07-20 14:54       ` Paul Smith
2015-07-20 15:43         ` Óscar Fuentes
2015-07-20 16:39           ` Paul Smith

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.