all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to dump Emacs and use as application snapshot?
@ 2020-10-27 17:41 Jean Louis
  2020-10-27 18:05 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Jean Louis @ 2020-10-27 17:41 UTC (permalink / raw)
  To: help-gnu-emacs

I would like to be able to dump the emacs how it is, and then later
just open it up similar to application snapshot feature at Amiga or
Dragonfly BSD.

There is talk in Antinews about portable dumper, so that may exist
now, it will not exist back in time.

dump-emacs-portable can only be done from command line, it would mean
my configuration would not work, --batch implies -q so I would need to
load my init.el

This works:

emacs --batch -eval "(dump-emacs-portable \"~/my-emacs\")"
dumping fingerprint: f5190a787b51041c110477031336a3a463d20c2fa433c129c2cc69f4fb191d71
Dump complete
Byte counts: header=84 hot=7180724 discardable=125760 cold=3356344
Reloc counts: hot=402727 discardable=4826

But this does not work:

emacs --batch -eval "(load-file \"~/.emacs.d/init.el\") (dump-emacs-portable \"~/my-emacs\")"

and this does not work:

emacs --batch -eval "(setq my-var \"any\") (dump-emacs-portable \"~/my-emacs\")"

Any way to do it?

-- 
Thanks,
Jean Louis



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

* Re: How to dump Emacs and use as application snapshot?
  2020-10-27 17:41 How to dump Emacs and use as application snapshot? Jean Louis
@ 2020-10-27 18:05 ` Eli Zaretskii
  2020-10-27 19:51   ` Jean Louis
  2020-10-27 18:52 ` Stefan Monnier
  2020-10-28  1:26 ` Leo Butler
  2 siblings, 1 reply; 20+ messages in thread
From: Eli Zaretskii @ 2020-10-27 18:05 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 27 Oct 2020 20:41:26 +0300
> From: Jean Louis <bugs@gnu.support>
> 
> This works:
> 
> emacs --batch -eval "(dump-emacs-portable \"~/my-emacs\")"
> dumping fingerprint: f5190a787b51041c110477031336a3a463d20c2fa433c129c2cc69f4fb191d71
> Dump complete
> Byte counts: header=84 hot=7180724 discardable=125760 cold=3356344
> Reloc counts: hot=402727 discardable=4826
> 
> But this does not work:
> 
> emacs --batch -eval "(load-file \"~/.emacs.d/init.el\") (dump-emacs-portable \"~/my-emacs\")"
> 
> and this does not work:
> 
> emacs --batch -eval "(setq my-var \"any\") (dump-emacs-portable \"~/my-emacs\")"

The argument to "-eval" should be a single sexp.



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

* Re: How to dump Emacs and use as application snapshot?
  2020-10-27 17:41 How to dump Emacs and use as application snapshot? Jean Louis
  2020-10-27 18:05 ` Eli Zaretskii
@ 2020-10-27 18:52 ` Stefan Monnier
  2020-10-27 19:51   ` Jean Louis
  2020-10-28  1:26 ` Leo Butler
  2 siblings, 1 reply; 20+ messages in thread
From: Stefan Monnier @ 2020-10-27 18:52 UTC (permalink / raw)
  To: help-gnu-emacs

> I would like to be able to dump the emacs how it is, and then later
> just open it up similar to application snapshot feature at Amiga or
> Dragonfly BSD.

Maybe you're looking for desktop.el (which comes bundled with Emacs)?


        Stefan




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

* Re: How to dump Emacs and use as application snapshot?
  2020-10-27 18:05 ` Eli Zaretskii
@ 2020-10-27 19:51   ` Jean Louis
  2020-10-27 20:13     ` Eli Zaretskii
  0 siblings, 1 reply; 20+ messages in thread
From: Jean Louis @ 2020-10-27 19:51 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

* Eli Zaretskii <eliz@gnu.org> [2020-10-27 21:16]:
> > Date: Tue, 27 Oct 2020 20:41:26 +0300
> > From: Jean Louis <bugs@gnu.support>
> > 
> > This works:
> > 
> > emacs --batch -eval "(dump-emacs-portable \"~/my-emacs\")"
> > dumping fingerprint: f5190a787b51041c110477031336a3a463d20c2fa433c129c2cc69f4fb191d71
> > Dump complete
> > Byte counts: header=84 hot=7180724 discardable=125760 cold=3356344
> > Reloc counts: hot=402727 discardable=4826
> > 
> > But this does not work:
> > 
> > emacs --batch -eval "(load-file \"~/.emacs.d/init.el\") (dump-emacs-portable \"~/my-emacs\")"
> > 
> > and this does not work:
> > 
> > emacs --batch -eval "(setq my-var \"any\") (dump-emacs-portable \"~/my-emacs\")"
> 
> The argument to "-eval" should be a single sexp.

Then it implies I cannot load my configuration into Emacs to dump
it. --batch implies -q option



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

* Re: How to dump Emacs and use as application snapshot?
  2020-10-27 18:52 ` Stefan Monnier
@ 2020-10-27 19:51   ` Jean Louis
  2020-10-27 20:39     ` Stefan Monnier
  0 siblings, 1 reply; 20+ messages in thread
From: Jean Louis @ 2020-10-27 19:51 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: help-gnu-emacs

* Stefan Monnier <monnier@iro.umontreal.ca> [2020-10-27 21:54]:
> > I would like to be able to dump the emacs how it is, and then later
> > just open it up similar to application snapshot feature at Amiga or
> > Dragonfly BSD.
> 
> Maybe you're looking for desktop.el (which comes bundled with
> Emacs)?

I mean dumping Emacs from memory into file and loading it later into
memory straight.


-- 
Jean Louis



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

* Re: How to dump Emacs and use as application snapshot?
  2020-10-27 19:51   ` Jean Louis
@ 2020-10-27 20:13     ` Eli Zaretskii
  2020-10-27 21:12       ` Jean Louis
  0 siblings, 1 reply; 20+ messages in thread
From: Eli Zaretskii @ 2020-10-27 20:13 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 27 Oct 2020 22:51:05 +0300
> From: Jean Louis <bugs@gnu.support>
> Cc: help-gnu-emacs@gnu.org
> 
> > > But this does not work:
> > > 
> > > emacs --batch -eval "(load-file \"~/.emacs.d/init.el\") (dump-emacs-portable \"~/my-emacs\")"
> > > 
> > > and this does not work:
> > > 
> > > emacs --batch -eval "(setq my-var \"any\") (dump-emacs-portable \"~/my-emacs\")"
> > 
> > The argument to "-eval" should be a single sexp.
> 
> Then it implies I cannot load my configuration into Emacs to dump
> it.

No, it implies that the syntax of the argument to -eval is incorrect.

> --batch implies -q option

Yes, but what does this have to do with the issue at hand?



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

* Re: How to dump Emacs and use as application snapshot?
  2020-10-27 19:51   ` Jean Louis
@ 2020-10-27 20:39     ` Stefan Monnier
  2020-10-27 21:14       ` Jean Louis
  0 siblings, 1 reply; 20+ messages in thread
From: Stefan Monnier @ 2020-10-27 20:39 UTC (permalink / raw)
  To: Jean Louis; +Cc: help-gnu-emacs

>> > I would like to be able to dump the emacs how it is, and then later
>> > just open it up similar to application snapshot feature at Amiga or
>> > Dragonfly BSD.
>> Maybe you're looking for desktop.el (which comes bundled with
>> Emacs)?
> I mean dumping Emacs from memory into file and loading it later into
> memory straight.

You're describing a means to an end (which may or may not exist and may
or may not work as you want it to (e.g. it probably won't magically
reopen the same number of frames at the same place on your screen)).

I'm describing another means to a similar end (which does exist).

Anyway, your answer implicitly tells me that desktop.el does not give
you the result you're looking for, tho I'm not sure exactly what it is
that is "missing".


        Stefan




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

* Re: How to dump Emacs and use as application snapshot?
  2020-10-27 20:13     ` Eli Zaretskii
@ 2020-10-27 21:12       ` Jean Louis
  2020-10-28  2:04         ` Dante Catalfamo
  2020-10-28  3:29         ` Eli Zaretskii
  0 siblings, 2 replies; 20+ messages in thread
From: Jean Louis @ 2020-10-27 21:12 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

* Eli Zaretskii <eliz@gnu.org> [2020-10-27 23:14]:
> > Date: Tue, 27 Oct 2020 22:51:05 +0300
> > From: Jean Louis <bugs@gnu.support>
> > Cc: help-gnu-emacs@gnu.org
> > 
> > > > But this does not work:
> > > > 
> > > > emacs --batch -eval "(load-file \"~/.emacs.d/init.el\") (dump-emacs-portable \"~/my-emacs\")"
> > > > 
> > > > and this does not work:
> > > > 
> > > > emacs --batch -eval "(setq my-var \"any\") (dump-emacs-portable \"~/my-emacs\")"
> > > 
> > > The argument to "-eval" should be a single sexp.
> > 
> > Then it implies I cannot load my configuration into Emacs to dump
> > it.
> 
> No, it implies that the syntax of the argument to -eval is incorrect.
> 
> > --batch implies -q option
> 
> Yes, but what does this have to do with the issue at hand?

dump-emacs-portable can be invoked only under --batch which implies -q
and then I do not know how to load my configuration.



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

* Re: How to dump Emacs and use as application snapshot?
  2020-10-27 20:39     ` Stefan Monnier
@ 2020-10-27 21:14       ` Jean Louis
  2020-10-27 21:41         ` Stefan Kangas
  2020-10-27 23:02         ` Stefan Monnier
  0 siblings, 2 replies; 20+ messages in thread
From: Jean Louis @ 2020-10-27 21:14 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: help-gnu-emacs

* Stefan Monnier <monnier@iro.umontreal.ca> [2020-10-27 23:40]:
> >> > I would like to be able to dump the emacs how it is, and then later
> >> > just open it up similar to application snapshot feature at Amiga or
> >> > Dragonfly BSD.
> >> Maybe you're looking for desktop.el (which comes bundled with
> >> Emacs)?
> > I mean dumping Emacs from memory into file and loading it later into
> > memory straight.
> 
> You're describing a means to an end (which may or may not exist and may
> or may not work as you want it to (e.g. it probably won't magically
> reopen the same number of frames at the same place on your screen)).
> 
> I'm describing another means to a similar end (which does exist).
> 
> Anyway, your answer implicitly tells me that desktop.el does not give
> you the result you're looking for, tho I'm not sure exactly what it is
> that is "missing".

I wish some speed at opening whole environment. Desktop.el is slow.

-- 
Jean Louis



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

* Re: How to dump Emacs and use as application snapshot?
  2020-10-27 21:14       ` Jean Louis
@ 2020-10-27 21:41         ` Stefan Kangas
  2020-11-02 12:52           ` Jean Louis
  2020-10-27 23:02         ` Stefan Monnier
  1 sibling, 1 reply; 20+ messages in thread
From: Stefan Kangas @ 2020-10-27 21:41 UTC (permalink / raw)
  To: Jean Louis, Stefan Monnier; +Cc: help-gnu-emacs

Jean Louis <bugs@gnu.support> writes:

>> Anyway, your answer implicitly tells me that desktop.el does not give
>> you the result you're looking for, tho I'm not sure exactly what it is
>> that is "missing".
>
> I wish some speed at opening whole environment. Desktop.el is slow.

Did you try using `desktop-restore-eager'?



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

* Re: How to dump Emacs and use as application snapshot?
  2020-10-27 21:14       ` Jean Louis
  2020-10-27 21:41         ` Stefan Kangas
@ 2020-10-27 23:02         ` Stefan Monnier
  2020-11-02 12:46           ` Jean Louis
  1 sibling, 1 reply; 20+ messages in thread
From: Stefan Monnier @ 2020-10-27 23:02 UTC (permalink / raw)
  To: help-gnu-emacs

> I wish some speed at opening whole environment.

I don't know what you mean by "whole environment".
Is that "GUI environment with Emacs running inside of it"?
Or "a whole new Emacs session with all my .emacs config loaded"?
Or "a whole new Emacs session with all my .emacs config loaded and all
the files I had previously open displayed in the same frames and
windows as before"?

A "dump" might help the second case, but for the first and third
I suspect that its benefits will be lost in the noise.
And of course, there are many other ways to speed up the second case
(mostly by trying to be careful to load packages lazily).


        Stefan




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

* Re: How to dump Emacs and use as application snapshot?
  2020-10-27 17:41 How to dump Emacs and use as application snapshot? Jean Louis
  2020-10-27 18:05 ` Eli Zaretskii
  2020-10-27 18:52 ` Stefan Monnier
@ 2020-10-28  1:26 ` Leo Butler
  2020-10-28  6:16   ` Jean Louis
  2 siblings, 1 reply; 20+ messages in thread
From: Leo Butler @ 2020-10-28  1:26 UTC (permalink / raw)
  To: Jean Louis; +Cc: help-gnu-emacs

Jean Louis <bugs@gnu.support> writes:

> ********************************************************
> Caution: This message was sent from outside the University of Manitoba.
> ********************************************************
>
> I would like to be able to dump the emacs how it is, and then later
> just open it up similar to application snapshot feature at Amiga or
> Dragonfly BSD.
>
> There is talk in Antinews about portable dumper, so that may exist
> now, it will not exist back in time.
>
> dump-emacs-portable can only be done from command line, it would mean
> my configuration would not work, --batch implies -q so I would need to
> load my init.el
>
> This works:
>
> emacs --batch -eval "(dump-emacs-portable \"~/my-emacs\")"
> dumping fingerprint: f5190a787b51041c110477031336a3a463d20c2fa433c129c2cc69f4fb191d71
> Dump complete
> Byte counts: header=84 hot=7180724 discardable=125760 cold=3356344
> Reloc counts: hot=402727 discardable=4826
>
> But this does not work:
>
> emacs --batch -eval "(load-file \"~/.emacs.d/init.el\") (dump-emacs-portable \"~/my-emacs\")"
>
> and this does not work:
>
> emacs --batch -eval "(setq my-var \"any\") (dump-emacs-portable \"~/my-emacs\")"
>
> Any way to do it?

Have you tried wrapping your eval stanza in a progn form?

emacs --batch -eval '(progn (do-the-stuff you want) (dump-emacs-portable))'

Leo



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

* Re: How to dump Emacs and use as application snapshot?
  2020-10-27 21:12       ` Jean Louis
@ 2020-10-28  2:04         ` Dante Catalfamo
  2020-10-28  3:29         ` Eli Zaretskii
  1 sibling, 0 replies; 20+ messages in thread
From: Dante Catalfamo @ 2020-10-28  2:04 UTC (permalink / raw)
  To: Jean Louis, Eli Zaretskii; +Cc: help-gnu-emacs

I believe you could either have multiple --eval arguments, or place both 
the load and dump expressions inside of a (progn ...)

On 10/27/20 5:12 PM, Jean Louis wrote:
> * Eli Zaretskii <eliz@gnu.org> [2020-10-27 23:14]:
>>> Date: Tue, 27 Oct 2020 22:51:05 +0300
>>> From: Jean Louis <bugs@gnu.support>
>>> Cc: help-gnu-emacs@gnu.org
>>>
>>>>> But this does not work:
>>>>>
>>>>> emacs --batch -eval "(load-file \"~/.emacs.d/init.el\") (dump-emacs-portable \"~/my-emacs\")"
>>>>>
>>>>> and this does not work:
>>>>>
>>>>> emacs --batch -eval "(setq my-var \"any\") (dump-emacs-portable \"~/my-emacs\")"
>>>>
>>>> The argument to "-eval" should be a single sexp.
>>>
>>> Then it implies I cannot load my configuration into Emacs to dump
>>> it.
>>
>> No, it implies that the syntax of the argument to -eval is incorrect.
>>
>>> --batch implies -q option
>>
>> Yes, but what does this have to do with the issue at hand?
> 
> dump-emacs-portable can be invoked only under --batch which implies -q
> and then I do not know how to load my configuration.
> 



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

* Re: How to dump Emacs and use as application snapshot?
  2020-10-27 21:12       ` Jean Louis
  2020-10-28  2:04         ` Dante Catalfamo
@ 2020-10-28  3:29         ` Eli Zaretskii
  1 sibling, 0 replies; 20+ messages in thread
From: Eli Zaretskii @ 2020-10-28  3:29 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Wed, 28 Oct 2020 00:12:09 +0300
> From: Jean Louis <bugs@gnu.support>
> Cc: help-gnu-emacs@gnu.org
> 
> > > > > emacs --batch -eval "(load-file \"~/.emacs.d/init.el\") (dump-emacs-portable \"~/my-emacs\")"
> > > > > 
> > > > > and this does not work:
> > > > > 
> > > > > emacs --batch -eval "(setq my-var \"any\") (dump-emacs-portable \"~/my-emacs\")"
> > > > 
> > > > The argument to "-eval" should be a single sexp.
> > > 
> > > Then it implies I cannot load my configuration into Emacs to dump
> > > it.
> > 
> > No, it implies that the syntax of the argument to -eval is incorrect.
> > 
> > > --batch implies -q option
> > 
> > Yes, but what does this have to do with the issue at hand?
> 
> dump-emacs-portable can be invoked only under --batch which implies -q
> and then I do not know how to load my configuration.

Yes, you do know: you loaded that above.



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

* Re: How to dump Emacs and use as application snapshot?
  2020-10-28  1:26 ` Leo Butler
@ 2020-10-28  6:16   ` Jean Louis
  0 siblings, 0 replies; 20+ messages in thread
From: Jean Louis @ 2020-10-28  6:16 UTC (permalink / raw)
  To: Leo Butler; +Cc: help-gnu-emacs

* Leo Butler <leo.butler@umanitoba.ca> [2020-10-28 04:27]:
> Jean Louis <bugs@gnu.support> writes:
> >
> > emacs --batch -eval "(setq my-var \"any\") (dump-emacs-portable \"~/my-emacs\")"
> >
> > Any way to do it?
> 
> Have you tried wrapping your eval stanza in a progn form?
> 
> emacs --batch -eval '(progn (do-the-stuff you want) (dump-emacs-portable))'

Really great, now I can continue experiments. I got it almost done if
it would not be new error: unsupported object type in dump: module
function

Is it maybe loaded module cannot be dumped?

-- 
Jean Louis



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

* Re: How to dump Emacs and use as application snapshot?
  2020-10-27 23:02         ` Stefan Monnier
@ 2020-11-02 12:46           ` Jean Louis
  2020-11-02 14:37             ` Corwin Brust
  0 siblings, 1 reply; 20+ messages in thread
From: Jean Louis @ 2020-11-02 12:46 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: help-gnu-emacs

* Stefan Monnier <monnier@iro.umontreal.ca> [2020-10-28 02:03]:
> > I wish some speed at opening whole environment.
> 
> I don't know what you mean by "whole environment".
> Is that "GUI environment with Emacs running inside of it"?
> Or "a whole new Emacs session with all my .emacs config loaded"?

Yes for above, with configuration loaded. I can launch with emacs
--dump-file and it works in general, but there is problem with module
that I am using, I think that does not work if I use modules.

> Or "a whole new Emacs session with all my .emacs config loaded and
> all the files I had previously open displayed in the same frames and
> windows as before"?

That now, that is terribly slow, if you mean desktop-mode.

> And of course, there are many other ways to speed up the second case
> (mostly by trying to be careful to load packages lazily).

That is exactly my problem.

Could you tell or confirm my understanding if loading personal files
is slower than installing packages and then using package later
through autoload functions?

leaf is for now complex for me to understand. I need time to
understand it.




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

* Re: How to dump Emacs and use as application snapshot?
  2020-10-27 21:41         ` Stefan Kangas
@ 2020-11-02 12:52           ` Jean Louis
  2020-11-02 15:54             ` Eli Zaretskii
  0 siblings, 1 reply; 20+ messages in thread
From: Jean Louis @ 2020-11-02 12:52 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: help-gnu-emacs, Stefan Monnier

* Stefan Kangas <stefankangas@gmail.com> [2020-10-28 00:41]:
> Jean Louis <bugs@gnu.support> writes:
> 
> >> Anyway, your answer implicitly tells me that desktop.el does not give
> >> you the result you're looking for, tho I'm not sure exactly what it is
> >> that is "missing".
> >
> > I wish some speed at opening whole environment. Desktop.el is slow.
> 
> Did you try using `desktop-restore-eager'?

Good to know. I tried and it is slow. It looks faster without doing
desktop- related stuff.




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

* Re: How to dump Emacs and use as application snapshot?
  2020-11-02 12:46           ` Jean Louis
@ 2020-11-02 14:37             ` Corwin Brust
  2020-11-02 16:51               ` Jean Louis
  0 siblings, 1 reply; 20+ messages in thread
From: Corwin Brust @ 2020-11-02 14:37 UTC (permalink / raw)
  To: Jean Louis; +Cc: Help Gnu Emacs mailing list, Stefan Monnier

Hi Jean,

On Mon, Nov 2, 2020 at 6:47 AM Jean Louis <bugs@gnu.support> wrote:
>
> leaf is for now complex for me to understand. I need time to
> understand it.
>

Given that this feature seems destined to reach Emacs core in the near
future, I strongly recommend making time for this sooner vs exploring
alternatives before investing that time.

I think you may find that the documentation for use-package is quite
helpful, with plan language narratives and many usage examples.  I'm
not attempting to compare the leaf to use-package here- use-package
has been around for many years and quite a numberr of users have
documented their successes (and frustrations) with it.  Even if you
feel strongly that leaf will be preferable for you, I recommend
starting with the main README file for use-package[0]; from what I've
seen the leaf syntax will in many cases the syntax will be identical
and and many authors have contributed, directly to the documentation
and publishing their configurations using it, blogging, etc..

You can anonomously retrieve the use-package project (including the
README.md file where I recommend starting) without visiting any
website, using a command such as:

  git clone https://github.com/jwiegley/use-package.git

The most important advantage from use-package for improving your
load-time will likely be the :defer keyword.  This can be complicated
but fortunately use-package will generally "do the math" for us, such
that in most cases I'm able to write simple forms like:

  (use-package name-of-a-package
    :config
      (forms-to-run-before-require)
      (can-go-here)
    :init
      (forms-to-run-after-require)
      (can-go-here))

All the best,
Corwin



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

* Re: How to dump Emacs and use as application snapshot?
  2020-11-02 12:52           ` Jean Louis
@ 2020-11-02 15:54             ` Eli Zaretskii
  0 siblings, 0 replies; 20+ messages in thread
From: Eli Zaretskii @ 2020-11-02 15:54 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Mon, 2 Nov 2020 15:52:11 +0300
> From: Jean Louis <bugs@gnu.support>
> Cc: help-gnu-emacs@gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
> 
> > Did you try using `desktop-restore-eager'?
> 
> Good to know. I tried and it is slow. It looks faster without doing
> desktop- related stuff.

You are not supposed to start Emacs more than once in a lifetime, so
the startup time shouldn't matter at all.



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

* Re: How to dump Emacs and use as application snapshot?
  2020-11-02 14:37             ` Corwin Brust
@ 2020-11-02 16:51               ` Jean Louis
  0 siblings, 0 replies; 20+ messages in thread
From: Jean Louis @ 2020-11-02 16:51 UTC (permalink / raw)
  To: Corwin Brust; +Cc: Help Gnu Emacs mailing list, Stefan Monnier

* Corwin Brust <corwin@bru.st> [2020-11-02 17:38]:
> I think you may find that the documentation for use-package is quite
> helpful, with plan language narratives and many usage examples.  I'm
> not attempting to compare the leaf to use-package here- use-package
> has been around for many years and quite a numberr of users have
> documented their successes (and frustrations) with it.  Even if you
> feel strongly that leaf will be preferable for you, I recommend
> starting with the main README file for use-package[0]; from what I've
> seen the leaf syntax will in many cases the syntax will be identical
> and and many authors have contributed, directly to the documentation
> and publishing their configurations using it, blogging, etc..

Thank you for more enlightenment.

I have suggested to author to make a code generation feature. If user
who is not a programmer needs to understands so much about programming
like leaf is exposing it then user will not need to ask anybody, can
even write the new leaf or whatever oneself.

What I expect from Emacs is useful customization like Leaf Group
customization or code generation by using customization.

One could then choose the package name and would get various options
shortly explained that user can turn on or off. 

> You can anonomously retrieve the use-package project (including the
> README.md file where I recommend starting) without visiting any
> website, using a command such as:
> 
>   git clone https://github.com/jwiegley/use-package.git

Thanks I do that often with --depth 1 option so that I get less bytes
pulled for nothing. 

> The most important advantage from use-package for improving your
> load-time will likely be the :defer keyword.  This can be complicated
> but fortunately use-package will generally "do the math" for us, such
> that in most cases I'm able to write simple forms like:
> 
>   (use-package name-of-a-package
>     :config
>       (forms-to-run-before-require)
>       (can-go-here)
>     :init
>       (forms-to-run-after-require)
>       (can-go-here))

I have tried it once and gave up. The real problem is I think loading
of files instead of making packages myself. So I load too many files
that I need for my working environment. If I make packages, how I
understand it, autoload functions will automatically be invoked or
package will be loaded when I invoke the function. That would minimize
startup times.

Am I right there?

-- 
There are 36 messages yet in my incoming mailbox.



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

end of thread, other threads:[~2020-11-02 16:51 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-27 17:41 How to dump Emacs and use as application snapshot? Jean Louis
2020-10-27 18:05 ` Eli Zaretskii
2020-10-27 19:51   ` Jean Louis
2020-10-27 20:13     ` Eli Zaretskii
2020-10-27 21:12       ` Jean Louis
2020-10-28  2:04         ` Dante Catalfamo
2020-10-28  3:29         ` Eli Zaretskii
2020-10-27 18:52 ` Stefan Monnier
2020-10-27 19:51   ` Jean Louis
2020-10-27 20:39     ` Stefan Monnier
2020-10-27 21:14       ` Jean Louis
2020-10-27 21:41         ` Stefan Kangas
2020-11-02 12:52           ` Jean Louis
2020-11-02 15:54             ` Eli Zaretskii
2020-10-27 23:02         ` Stefan Monnier
2020-11-02 12:46           ` Jean Louis
2020-11-02 14:37             ` Corwin Brust
2020-11-02 16:51               ` Jean Louis
2020-10-28  1:26 ` Leo Butler
2020-10-28  6:16   ` Jean Louis

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.