unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Why Emacs is echoing message for each installed Emacs package while startup
@ 2022-05-15 18:23 Akib Azmain Turja
  2022-05-15 23:58 ` raingloom
  0 siblings, 1 reply; 22+ messages in thread
From: Akib Azmain Turja @ 2022-05-15 18:23 UTC (permalink / raw)
  To: help-guix

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


For each Emacs package I have installed, Emacs echoes "Loading
/gnu/store/...-emacs-.../...-autoloads.el" while startup.  This is very
annoying.  The reason is probably the function:

(defun guix-emacs-autoload-packages ()
  "Autoload Emacs packages found in EMACSLOADPATH.

'Autoload' means to load the 'autoloads' files matching
`guix-emacs-autoloads-regexp'."
  (interactive)
  (let ((autoloads (mapcan #'guix-emacs-find-autoloads
                           (guix-emacs--non-core-load-path))))
    (mapc (lambda (f)
            (load f 'noerror))  ;; This should be (load f 'noerror 'nomessage)
          autoloads)))

And also I wonder why Guix loads each autoloads file.  Can't it merge
(concat) all autoloads into one file while making the profile and then
load it afterwards?  This would probably save a little time.  package.el
can do this (see "package-quickstart-file" variable), so Guix should be
able to do this too.

-- 
Akib Azmain Turja

This message is signed by me with my GnuPG key.  It's fingerprint is:

    7001 8CE5 819F 17A3 BBA6  66AF E74F 0EFA 922A E7F5

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

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

* Re: Why Emacs is echoing message for each installed Emacs package while startup
  2022-05-15 18:23 Why Emacs is echoing message for each installed Emacs package while startup Akib Azmain Turja
@ 2022-05-15 23:58 ` raingloom
  2022-05-16  8:16   ` Akib Azmain Turja
  0 siblings, 1 reply; 22+ messages in thread
From: raingloom @ 2022-05-15 23:58 UTC (permalink / raw)
  To: Akib Azmain Turja; +Cc: help-guix

On Mon, 16 May 2022 00:23:39 +0600
Akib Azmain Turja <akib@disroot.org> wrote:

> For each Emacs package I have installed, Emacs echoes "Loading
> /gnu/store/...-emacs-.../...-autoloads.el" while startup.  This is
> very annoying.  The reason is probably the function:
> 
> (defun guix-emacs-autoload-packages ()
>   "Autoload Emacs packages found in EMACSLOADPATH.
> 
> 'Autoload' means to load the 'autoloads' files matching
> `guix-emacs-autoloads-regexp'."
>   (interactive)
>   (let ((autoloads (mapcan #'guix-emacs-find-autoloads
>                            (guix-emacs--non-core-load-path))))
>     (mapc (lambda (f)
>             (load f 'noerror))  ;; This should be (load f 'noerror
> 'nomessage) autoloads)))
> 
> And also I wonder why Guix loads each autoloads file.  Can't it merge
> (concat) all autoloads into one file while making the profile and then
> load it afterwards?  This would probably save a little time.
> package.el can do this (see "package-quickstart-file" variable), so
> Guix should be able to do this too.
> 

Gonna speculate here a bit since I'm not sure if this pattern exists in
Elisp land, but I've certainly seen (and written) programs that
required to be run from a specific place, usually from next to other
submodules in the same package. If you were to concatenate (or even
just move) such a file, it would break, possibly silently.
You can't even rename a program and be sure that it will have the same
behaviour, see busybox for an example of this. It's a single binary
that checks what name it's run under and then acts like that executable.


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

* Re: Why Emacs is echoing message for each installed Emacs package while startup
  2022-05-15 23:58 ` raingloom
@ 2022-05-16  8:16   ` Akib Azmain Turja
  2022-05-16 10:55     ` zimoun
  0 siblings, 1 reply; 22+ messages in thread
From: Akib Azmain Turja @ 2022-05-16  8:16 UTC (permalink / raw)
  To: raingloom; +Cc: help-guix

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

raingloom <raingloom@riseup.net> writes:

> On Mon, 16 May 2022 00:23:39 +0600
> Akib Azmain Turja <akib@disroot.org> wrote:
>
>> For each Emacs package I have installed, Emacs echoes "Loading
>> /gnu/store/...-emacs-.../...-autoloads.el" while startup.  This is
>> very annoying.  The reason is probably the function:
>> 
>> (defun guix-emacs-autoload-packages ()
>>   "Autoload Emacs packages found in EMACSLOADPATH.
>> 
>> 'Autoload' means to load the 'autoloads' files matching
>> `guix-emacs-autoloads-regexp'."
>>   (interactive)
>>   (let ((autoloads (mapcan #'guix-emacs-find-autoloads
>>                            (guix-emacs--non-core-load-path))))
>>     (mapc (lambda (f)
>>             (load f 'noerror))  ;; This should be (load f 'noerror
>> 'nomessage) autoloads)))
>> 
>> And also I wonder why Guix loads each autoloads file.  Can't it merge
>> (concat) all autoloads into one file while making the profile and then
>> load it afterwards?  This would probably save a little time.
>> package.el can do this (see "package-quickstart-file" variable), so
>> Guix should be able to do this too.
>> 
>
> Gonna speculate here a bit since I'm not sure if this pattern exists in
> Elisp land, but I've certainly seen (and written) programs that
> required to be run from a specific place, usually from next to other
> submodules in the same package. If you were to concatenate (or even
> just move) such a file, it would break, possibly silently.
> You can't even rename a program and be sure that it will have the same
> behaviour, see busybox for an example of this. It's a single binary
> that checks what name it's run under and then acts like that executable.

Yes, this may be a problem for ordinary Emacs Lisp file.  But I'm
talking about autoloads.  It is a special file that defines autoloaded
functions.  Calling autoloaded functions will automatically load the
file containing the actual definition.  Autoloads files should not
depend on there names, and if they does its probably a bug.  All
autoloads files are needed to load at runtime, so concatenating all of
them should probably be a good idea.  Emacs builtin package manager
"package.el" and third party purely-functional package manager
"straight.el" both support merging the autoloads into one file.

But load many autoloads files is not a big problem, the main problem is
the messages "Loading...", "Loading...", "Loading..."...

-- 
Akib Azmain Turja

This message is signed by me with my GnuPG key.  It's fingerprint is:

    7001 8CE5 819F 17A3 BBA6  66AF E74F 0EFA 922A E7F5

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

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

* Re: Why Emacs is echoing message for each installed Emacs package while startup
  2022-05-16  8:16   ` Akib Azmain Turja
@ 2022-05-16 10:55     ` zimoun
  2022-05-16 16:31       ` Akib Azmain Turja
  0 siblings, 1 reply; 22+ messages in thread
From: zimoun @ 2022-05-16 10:55 UTC (permalink / raw)
  To: Akib Azmain Turja, raingloom; +Cc: help-guix

Hi,

On Mon, 16 May 2022 at 14:16, Akib Azmain Turja <akib@disroot.org> wrote:

> But load many autoloads files is not a big problem, the main problem is
> the messages "Loading...", "Loading...", "Loading..."...

Why is it a “problem”?  All these messages are inside the buffer
*Messages*, designed for collecting all messages.

Could you explain why you consider it is the « main problem »?


Cheers,
simon


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

* Re: Why Emacs is echoing message for each installed Emacs package while startup
  2022-05-16 10:55     ` zimoun
@ 2022-05-16 16:31       ` Akib Azmain Turja
  2022-05-16 16:44         ` André A. Gomes
  2022-05-16 20:53         ` zimoun
  0 siblings, 2 replies; 22+ messages in thread
From: Akib Azmain Turja @ 2022-05-16 16:31 UTC (permalink / raw)
  To: zimoun, raingloom; +Cc: help-guix

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

zimoun <zimon.toutoune@gmail.com> writes:

> Hi,
>
> On Mon, 16 May 2022 at 14:16, Akib Azmain Turja <akib@disroot.org> wrote:
>
>> But load many autoloads files is not a big problem, the main problem is
>> the messages "Loading...", "Loading...", "Loading..."...
>
> Why is it a “problem”?  All these messages are inside the buffer
> *Messages*, designed for collecting all messages.
>
> Could you explain why you consider it is the « main problem »?
>
>
> Cheers,
> simon

Because those message appear in echo area during startup, which is very
annoying to me.  As far as I know, no Emacs package manager does this.

-- 
Akib Azmain Turja

This message is signed by me with my GnuPG key.  It's fingerprint is:

    7001 8CE5 819F 17A3 BBA6  66AF E74F 0EFA 922A E7F5

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

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

* Re: Why Emacs is echoing message for each installed Emacs package while startup
  2022-05-16 16:31       ` Akib Azmain Turja
@ 2022-05-16 16:44         ` André A. Gomes
  2022-05-16 19:58           ` Akib Azmain Turja
  2022-05-16 20:53         ` zimoun
  1 sibling, 1 reply; 22+ messages in thread
From: André A. Gomes @ 2022-05-16 16:44 UTC (permalink / raw)
  To: Akib Azmain Turja; +Cc: zimoun, raingloom, help-guix

Akib Azmain Turja <akib@disroot.org> writes:

> zimoun <zimon.toutoune@gmail.com> writes:
>
>> Hi,
>>
>> On Mon, 16 May 2022 at 14:16, Akib Azmain Turja <akib@disroot.org> wrote:
>>
>>> But load many autoloads files is not a big problem, the main problem is
>>> the messages "Loading...", "Loading...", "Loading..."...
>>
>> Why is it a “problem”?  All these messages are inside the buffer
>> *Messages*, designed for collecting all messages.
>>
>> Could you explain why you consider it is the « main problem »?
>>
>>
>> Cheers,
>> simon
>
> Because those message appear in echo area during startup, which is very
> annoying to me.  As far as I know, no Emacs package manager does this.

No Emacs package manager does that indeed, but Guix manages packages in
a unique way too!

Take a look at /gnu/store/[hash]-emacs/share/emacs/site-lisp/ to
understand how Guix loads emacs packages.


-- 
André A. Gomes
"You cannot even find the ruins..."


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

* Re: Why Emacs is echoing message for each installed Emacs package while startup
  2022-05-16 16:44         ` André A. Gomes
@ 2022-05-16 19:58           ` Akib Azmain Turja
  2022-05-16 20:35             ` André A. Gomes
  0 siblings, 1 reply; 22+ messages in thread
From: Akib Azmain Turja @ 2022-05-16 19:58 UTC (permalink / raw)
  To: André A. Gomes; +Cc: help-guix

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


André A. Gomes <andremegafone@gmail.com> writes:

> No Emacs package manager does that indeed, but Guix manages packages in
> a unique way too!

Yeah, it's unique because it shows the same "Loading..." messages every
time I run Emacs.

> Take a look at /gnu/store/[hash]-emacs/share/emacs/site-lisp/ to
> understand how Guix loads emacs packages.

Yes, I know there is a file named "guix-emacs.el" which defines the
"guix-emacs-autoload-packages" function, which is the culprit for the
"Loading" messages.  I can't understand the reason of these messages,
the user should know what he/she has installed, so there is no need to
tell that every time Emacs is started.

-- 
Akib Azmain Turja

This message is signed by me with my GnuPG key.  It's fingerprint is:

    7001 8CE5 819F 17A3 BBA6  66AF E74F 0EFA 922A E7F5

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

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

* Re: Why Emacs is echoing message for each installed Emacs package while startup
  2022-05-16 19:58           ` Akib Azmain Turja
@ 2022-05-16 20:35             ` André A. Gomes
  0 siblings, 0 replies; 22+ messages in thread
From: André A. Gomes @ 2022-05-16 20:35 UTC (permalink / raw)
  To: Akib Azmain Turja; +Cc: help-guix

Akib Azmain Turja <akib@disroot.org> writes:

>> Take a look at /gnu/store/[hash]-emacs/share/emacs/site-lisp/ to
>> understand how Guix loads emacs packages.
>
> Yes, I know there is a file named "guix-emacs.el" which defines the
> "guix-emacs-autoload-packages" function, which is the culprit for the
> "Loading" messages.  I can't understand the reason of these messages,
> the user should know what he/she has installed, so there is no need to
> tell that every time Emacs is started.

Perhaps I agree with you.  It would be trivial to send a patch, I'm just
not sure if it would be met with acceptance :)


-- 
André A. Gomes
"You cannot even find the ruins..."


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

* Re: Why Emacs is echoing message for each installed Emacs package while startup
  2022-05-16 16:31       ` Akib Azmain Turja
  2022-05-16 16:44         ` André A. Gomes
@ 2022-05-16 20:53         ` zimoun
  2022-05-17  8:00           ` Akib Azmain Turja
  1 sibling, 1 reply; 22+ messages in thread
From: zimoun @ 2022-05-16 20:53 UTC (permalink / raw)
  To: Akib Azmain Turja, raingloom; +Cc: help-guix

Hi,

On Mon, 16 May 2022 at 22:31, Akib Azmain Turja <akib@disroot.org> wrote:

> Because those message appear in echo area during startup, which is very
> annoying to me.  As far as I know, no Emacs package manager does this.

I understand.  Although, in my case, it is too fast to be annoying.  How
many Emacs packages do you have in your profiles?


Cheers,
simon


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

* Re: Why Emacs is echoing message for each installed Emacs package while startup
  2022-05-16 20:53         ` zimoun
@ 2022-05-17  8:00           ` Akib Azmain Turja
  2022-05-17 21:58             ` zimoun
  0 siblings, 1 reply; 22+ messages in thread
From: Akib Azmain Turja @ 2022-05-17  8:00 UTC (permalink / raw)
  To: zimoun, raingloom; +Cc: help-guix

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

zimoun <zimon.toutoune@gmail.com> writes:

> Hi,
>
> On Mon, 16 May 2022 at 22:31, Akib Azmain Turja <akib@disroot.org> wrote:
>
>> Because those message appear in echo area during startup, which is very
>> annoying to me.  As far as I know, no Emacs package manager does this.
>
> I understand.  Although, in my case, it is too fast to be annoying.  How
> many Emacs packages do you have in your profiles?
>
>
> Cheers,
> simon

Right now, only one, because I use package.el.  But I'm planning to move
to Guix.

I used to have more than hundred Emacs packages managed by Guix.  But
the startup time was more than 5 seconds.  Then to switched package.el,
and the startup time decreased to less than 1.5 seconds.  I'm not sure
why this happened, but I think the cause is maybe too many "redisplay"s
due to many loading messages during startup.

-- 
Akib Azmain Turja

This message is signed by me with my GnuPG key.  It's fingerprint is:

    7001 8CE5 819F 17A3 BBA6  66AF E74F 0EFA 922A E7F5

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

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

* Re: Why Emacs is echoing message for each installed Emacs package while startup
  2022-05-17  8:00           ` Akib Azmain Turja
@ 2022-05-17 21:58             ` zimoun
  2022-05-18 16:29               ` Akib Azmain Turja
  0 siblings, 1 reply; 22+ messages in thread
From: zimoun @ 2022-05-17 21:58 UTC (permalink / raw)
  To: Akib Azmain Turja, raingloom; +Cc: help-guix

Hi,

On Tue, 17 May 2022 at 14:00, Akib Azmain Turja <akib@disroot.org> wrote:

> I used to have more than hundred Emacs packages managed by Guix.  But
> the startup time was more than 5 seconds.  Then to switched package.el,
> and the startup time decreased to less than 1.5 seconds.  I'm not sure
> why this happened, but I think the cause is maybe too many "redisplay"s
> due to many loading messages during startup.

Well, I do not know.  Hum, I do not have more than hundred,

--8<---------------cut here---------------start------------->8---
$ guix package -p ~/.config/guix/profiles/emacs/emacs -I | grep emacs | wc -l
43
--8<---------------cut here---------------end--------------->8---

but it does not takes so long:

--8<---------------cut here---------------start------------->8---
$ time emacs -f kill-emacs

real    0m1.682s
user    0m1.279s
sys     0m0.241s
--8<---------------cut here---------------end--------------->8---

which looks similar to,

        M-x emacs-init-time
        1.727791789 seconds

therefore, I am surprised by your timings.  For instance,

--8<---------------cut here---------------start------------->8---
$ guix shell emacs $(guix package -A | grep ^emacs- | cut -f1 | head -200)
[env]$ time emacs -nw -q -f kill-emacs

real    0m2.368s
user    0m2.037s
sys     0m0.309s
--8<---------------cut here---------------end--------------->8---


Well, I do not know if ’with-eval-after-load’ is enough for somehow
allowing lazy loading.  Hum, I am not convinced that the ’redisplay’ is
the issue but instead, yeah maybe walking all the files requires some
filesystem IO and yeah maybe one unique big concatenated autoload file
would improve the situation.


Do you use ’use-package’ or something similar for your config?


Cheers,
simon


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

* Re: Why Emacs is echoing message for each installed Emacs package while startup
  2022-05-17 21:58             ` zimoun
@ 2022-05-18 16:29               ` Akib Azmain Turja
  2022-05-18 21:04                 ` zimoun
  0 siblings, 1 reply; 22+ messages in thread
From: Akib Azmain Turja @ 2022-05-18 16:29 UTC (permalink / raw)
  To: zimoun, raingloom; +Cc: help-guix

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

zimoun <zimon.toutoune@gmail.com> writes:

> Hi,
>
> On Tue, 17 May 2022 at 14:00, Akib Azmain Turja <akib@disroot.org> wrote:
>
>> I used to have more than hundred Emacs packages managed by Guix.  But
>> the startup time was more than 5 seconds.  Then to switched package.el,
>> and the startup time decreased to less than 1.5 seconds.  I'm not sure
>> why this happened, but I think the cause is maybe too many "redisplay"s
>> due to many loading messages during startup.
>
> Well, I do not know.  Hum, I do not have more than hundred,
>
> --8<---------------cut here---------------start------------->8---
> $ guix package -p ~/.config/guix/profiles/emacs/emacs -I | grep emacs | wc -l
> 43
> --8<---------------cut here---------------end--------------->8---
>
> but it does not takes so long:
>
> --8<---------------cut here---------------start------------->8---
> $ time emacs -f kill-emacs
>
> real    0m1.682s
> user    0m1.279s
> sys     0m0.241s
> --8<---------------cut here---------------end--------------->8---
>
> which looks similar to,
>
>         M-x emacs-init-time
>         1.727791789 seconds
>
> therefore, I am surprised by your timings.  For instance,
>
> --8<---------------cut here---------------start------------->8---
> $ guix shell emacs $(guix package -A | grep ^emacs- | cut -f1 | head -200)
> [env]$ time emacs -nw -q -f kill-emacs
>
> real    0m2.368s
> user    0m2.037s
> sys     0m0.309s
> --8<---------------cut here---------------end--------------->8---

The timing maybe wrong, because it is more a year old (and I didn't
measure).  I was new to Emacs Lisp (I used Doom before), and my init.el
was messy.  So maybe the init file had something in it that was
responsible for slow startup when the packages managed by Guix.

>
>
> Well, I do not know if ’with-eval-after-load’ is enough for somehow
> allowing lazy loading.  Hum, I am not convinced that the ’redisplay’ is
> the issue but instead, yeah maybe walking all the files requires some
> filesystem IO and yeah maybe one unique big concatenated autoload file
> would improve the situation.

Loading many autoloads files isn't a big deal for me, I don't use that
optimization.  With `package-quickstart' set to t, my init time is only
0.1 seconds faster, which I don't care.

>
>
> Do you use ’use-package’ or something similar for your config?

Yeah, I use `leaf'.

>
>
> Cheers,
> simon

-- 
Akib Azmain Turja

This message is signed by me with my GnuPG key.  It's fingerprint is:

    7001 8CE5 819F 17A3 BBA6  66AF E74F 0EFA 922A E7F5

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

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

* Re: Why Emacs is echoing message for each installed Emacs package while startup
  2022-05-18 16:29               ` Akib Azmain Turja
@ 2022-05-18 21:04                 ` zimoun
  2022-05-21 11:40                   ` Akib Azmain Turja
  0 siblings, 1 reply; 22+ messages in thread
From: zimoun @ 2022-05-18 21:04 UTC (permalink / raw)
  To: Akib Azmain Turja, raingloom; +Cc: help-guix

Hi,

On Wed, 18 May 2022 at 22:29, Akib Azmain Turja <akib@disroot.org> wrote:

> The timing maybe wrong, because it is more a year old (and I didn't
> measure).  I was new to Emacs Lisp (I used Doom before), and my init.el
> was messy.  So maybe the init file had something in it that was
> responsible for slow startup when the packages managed by Guix.

Well, if you are able to time the two setups: the one using package.el
and ’leaf’ and the other one using Guix (and probably replacing the
lines «:ensure :package :feather :straight :el-get» to use instead the
Emacs packages installed by Guix).

It could be informing about the potential gap.



Cheers,
simon


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

* Re: Why Emacs is echoing message for each installed Emacs package while startup
  2022-05-18 21:04                 ` zimoun
@ 2022-05-21 11:40                   ` Akib Azmain Turja
  2022-05-21 13:45                     ` André A. Gomes
  2022-05-21 21:09                     ` Maxim Cournoyer
  0 siblings, 2 replies; 22+ messages in thread
From: Akib Azmain Turja @ 2022-05-21 11:40 UTC (permalink / raw)
  To: zimoun, raingloom; +Cc: help-guix

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

zimoun <zimon.toutoune@gmail.com> writes:

> Hi,
>
> On Wed, 18 May 2022 at 22:29, Akib Azmain Turja <akib@disroot.org> wrote:
>
>> The timing maybe wrong, because it is more a year old (and I didn't
>> measure).  I was new to Emacs Lisp (I used Doom before), and my init.el
>> was messy.  So maybe the init file had something in it that was
>> responsible for slow startup when the packages managed by Guix.
>
> Well, if you are able to time the two setups: the one using package.el
> and ’leaf’ and the other one using Guix (and probably replacing the
> lines «:ensure :package :feather :straight :el-get» to use instead the
> Emacs packages installed by Guix).
>
> It could be informing about the potential gap.
>
>
>
> Cheers,
> simon

Yeah.  That's really a good idea.  But unfortunately my Emacs init time
isn't stable after the Emacs 28 upgrade (without native compilation).
Sometimes it is as long as 4 seconds and sometimes only a fraction of
second.  Even if I a calculate an average, that won't be reliable.  I
have no idea why this is happening now, maybe I'll try investigate it
later.  I don't have much problem with this random startup time, as I
don't restart Emacs much (as the time of writing, emacs-uptime says
"5 days, 20 hours, 56 minutes, 26 seconds").

But, why is the message is shown?  Can someone remove it?  It would
probably be better that I myself clone the repo, fix it and send the
patch, but my hard disk space isn't allowing me to do that.  Is it
possible disable that message by modifing any Guix configuration file?

-- 
Akib Azmain Turja

This message is signed by me with my GnuPG key.  It's fingerprint is:

    7001 8CE5 819F 17A3 BBA6  66AF E74F 0EFA 922A E7F5

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

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

* Re: Why Emacs is echoing message for each installed Emacs package while startup
  2022-05-21 11:40                   ` Akib Azmain Turja
@ 2022-05-21 13:45                     ` André A. Gomes
  2022-05-22 11:26                       ` Akib Azmain Turja
  2022-05-21 21:09                     ` Maxim Cournoyer
  1 sibling, 1 reply; 22+ messages in thread
From: André A. Gomes @ 2022-05-21 13:45 UTC (permalink / raw)
  To: Akib Azmain Turja; +Cc: zimoun, raingloom, help-guix

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

Akib Azmain Turja <akib@disroot.org> writes:

> But, why is the message is shown?  Can someone remove it?  It would
> probably be better that I myself clone the repo, fix it and send the
> patch, but my hard disk space isn't allowing me to do that.  Is it
> possible disable that message by modifing any Guix configuration file?

Hi Akib Azmain Turja,

It's not possible to disable the messages by modifying Guix configs.

I'm attaching a patch below.  Would you please send it to the Guix team
and make your argument?  Thank you.


-- 
André A. Gomes
"You cannot even find the ruins..."

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-emacs-Suppress-loading-messages.patch --]
[-- Type: text/x-patch, Size: 914 bytes --]

From d4b449e7c129a6d44414790ad36046e4d325a55e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20A=2E=20Gomes?= <andremegafone@gmail.com>
Date: Sat, 21 May 2022 14:42:12 +0100
Subject: [PATCH] gnu: emacs: Suppress loading messages.

---
 gnu/packages/aux-files/emacs/guix-emacs.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/aux-files/emacs/guix-emacs.el b/gnu/packages/aux-files/emacs/guix-emacs.el
index eff44bfe90..56dbcb8d67 100644
--- a/gnu/packages/aux-files/emacs/guix-emacs.el
+++ b/gnu/packages/aux-files/emacs/guix-emacs.el
@@ -56,7 +56,7 @@ The files in the list do not have extensions (.el, .elc)."
   (let ((autoloads (mapcan #'guix-emacs-find-autoloads
                            (guix-emacs--non-core-load-path))))
     (mapc (lambda (f)
-            (load f 'noerror))
+            (load f 'noerror t))
           autoloads)))
 
 ;;;###autoload
-- 
2.36.0


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

* Re: Why Emacs is echoing message for each installed Emacs package while startup
  2022-05-21 11:40                   ` Akib Azmain Turja
  2022-05-21 13:45                     ` André A. Gomes
@ 2022-05-21 21:09                     ` Maxim Cournoyer
  2022-05-21 22:00                       ` Benjamin Slade
  1 sibling, 1 reply; 22+ messages in thread
From: Maxim Cournoyer @ 2022-05-21 21:09 UTC (permalink / raw)
  To: Akib Azmain Turja; +Cc: zimoun, raingloom, help-guix

Hi,

Akib Azmain Turja <akib@disroot.org> writes:

> zimoun <zimon.toutoune@gmail.com> writes:
>
>> Hi,
>>
>> On Wed, 18 May 2022 at 22:29, Akib Azmain Turja <akib@disroot.org> wrote:
>>
>>> The timing maybe wrong, because it is more a year old (and I didn't
>>> measure).  I was new to Emacs Lisp (I used Doom before), and my init.el
>>> was messy.  So maybe the init file had something in it that was
>>> responsible for slow startup when the packages managed by Guix.
>>
>> Well, if you are able to time the two setups: the one using package.el
>> and ’leaf’ and the other one using Guix (and probably replacing the
>> lines «:ensure :package :feather :straight :el-get» to use instead the
>> Emacs packages installed by Guix).
>>
>> It could be informing about the potential gap.

There were timings made in the past when considering using the builtin
package.el to take care of some of the things we do, but it's much more
code than what we have and is unsurprisingly a bit slower.  If you look
at the guix-emacs.el file that takes care of autoloads discovery you'll
see there's really not much to it, if fits all under 100 lines of code.

> But, why is the message is shown?  Can someone remove it?  It would
> probably be better that I myself clone the repo, fix it and send the
> patch, but my hard disk space isn't allowing me to do that.  Is it
> possible disable that message by modifing any Guix configuration file?

Like Simon, I do not see why the autoloads-related messages are a
problem; they only occur when starting Emacs from scratch.  If you have
so many packages that the loading time or loading messages bothers you,
you may want to consider running Emacs as a server and connecting to it
via emacsclient; that way you load it once when you login to your
session for example and that's it.

For what it's worth, the messages are not printed by that custom Guix
Elisp code explicitly but by the Emacs function `load', on line 59 of
guix-emacs.el: (load f 'noerror).  If it really bothers you could change
it to:

(load f 'noerror 'nomessage)

Hope that helps,

Maxim


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

* Re: Why Emacs is echoing message for each installed Emacs package while startup
  2022-05-21 21:09                     ` Maxim Cournoyer
@ 2022-05-21 22:00                       ` Benjamin Slade
  2022-05-22  2:47                         ` Maxim Cournoyer
  0 siblings, 1 reply; 22+ messages in thread
From: Benjamin Slade @ 2022-05-21 22:00 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: Akib Azmain Turja, zimoun, raingloom, help-guix

On Sat, 21 May 2022 15:09:50 -0600 (50 minutes, 46 seconds ago), Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:

> Hi,

> Akib Azmain Turja <akib@disroot.org> writes:

> > zimoun <zimon.toutoune@gmail.com> writes:
> >
> >> Hi,
> >>
> >> On Wed, 18 May 2022 at 22:29, Akib Azmain Turja <akib@disroot.org> wrote:
> >>
> >>> The timing maybe wrong, because it is more a year old (and I didn't
> >>> measure).  I was new to Emacs Lisp (I used Doom before), and my init.el
> >>> was messy.  So maybe the init file had something in it that was
> >>> responsible for slow startup when the packages managed by Guix.
> >>
> >> Well, if you are able to time the two setups: the one using package.el
> >> and ’leaf’ and the other one using Guix (and probably replacing the
> >> lines «:ensure :package :feather :straight :el-get» to use instead the
> >> Emacs packages installed by Guix).
> >>
> >> It could be informing about the potential gap.

> There were timings made in the past when considering using the builtin
> package.el to take care of some of the things we do, but it's much more
> code than what we have and is unsurprisingly a bit slower.  If you look
> at the guix-emacs.el file that takes care of autoloads discovery you'll
> see there's really not much to it, if fits all under 100 lines of code.

> > But, why is the message is shown?  Can someone remove it?  It would
> > probably be better that I myself clone the repo, fix it and send the
> > patch, but my hard disk space isn't allowing me to do that.  Is it
> > possible disable that message by modifing any Guix configuration file?

> Like Simon, I do not see why the autoloads-related messages are a
> problem; they only occur when starting Emacs from scratch.  If you have
> so many packages that the loading time or loading messages bothers you,
> you may want to consider running Emacs as a server and connecting to it
> via emacsclient; that way you load it once when you login to your
> session for example and that's it.

> For what it's worth, the messages are not printed by that custom Guix
> Elisp code explicitly but by the Emacs function `load', on line 59 of
> guix-emacs.el: (load f 'noerror).  If it really bothers you could change
> it to:

> (load f 'noerror 'nomessage)

> Hope that helps,

> Maxim


The messages also appear when viewing the *Async-native-compile-log* when Emacs is native compiling packages. And the all of the "loading packages" messages are repeated before /each/ package that is compiled.

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

* Re: Why Emacs is echoing message for each installed Emacs package while startup
  2022-05-21 22:00                       ` Benjamin Slade
@ 2022-05-22  2:47                         ` Maxim Cournoyer
  2022-05-22  2:55                           ` Benjamin Slade
  2022-05-22 11:24                           ` Akib Azmain Turja
  0 siblings, 2 replies; 22+ messages in thread
From: Maxim Cournoyer @ 2022-05-22  2:47 UTC (permalink / raw)
  To: Benjamin Slade; +Cc: Akib Azmain Turja, zimoun, raingloom, help-guix

Hi,

[...]

>> > But, why is the message is shown?  Can someone remove it?  It would
>> > probably be better that I myself clone the repo, fix it and send the
>> > patch, but my hard disk space isn't allowing me to do that.  Is it
>> > possible disable that message by modifing any Guix configuration file?
>
>> Like Simon, I do not see why the autoloads-related messages are a
>> problem; they only occur when starting Emacs from scratch.  If you have
>> so many packages that the loading time or loading messages bothers you,
>> you may want to consider running Emacs as a server and connecting to it
>> via emacsclient; that way you load it once when you login to your
>> session for example and that's it.
>
>> For what it's worth, the messages are not printed by that custom Guix
>> Elisp code explicitly but by the Emacs function `load', on line 59 of
>> guix-emacs.el: (load f 'noerror).  If it really bothers you could change
>> it to:
>
>> (load f 'noerror 'nomessage)
>
>> Hope that helps,
>
>> Maxim
>
>
> The messages also appear when viewing the *Async-native-compile-log* when Emacs is native compiling packages. And the all of the "loading packages" messages are repeated before /each/ package that is compiled.

That's not with the Emacs in Guix I guess, since we do not yet have
native compilation enabled.  But it seems like the problem here is not
the printing of the messages, but why when natively compiling packages
it would cause all the packages to be reloaded for each package... which
is crazy.

Maxim


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

* Re: Why Emacs is echoing message for each installed Emacs package while startup
  2022-05-22  2:47                         ` Maxim Cournoyer
@ 2022-05-22  2:55                           ` Benjamin Slade
  2022-05-22 11:24                           ` Akib Azmain Turja
  1 sibling, 0 replies; 22+ messages in thread
From: Benjamin Slade @ 2022-05-22  2:55 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: Akib Azmain Turja, zimoun, raingloom, help-guix

On Sat, 21 May 2022 20:47:17 -0600 (7 minutes, 44 seconds ago), Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:

> Hi,

> [...]

> >> > But, why is the message is shown?  Can someone remove it?  It would
> >> > probably be better that I myself clone the repo, fix it and send the
> >> > patch, but my hard disk space isn't allowing me to do that.  Is it
> >> > possible disable that message by modifing any Guix configuration file?
> >
> >> Like Simon, I do not see why the autoloads-related messages are a
> >> problem; they only occur when starting Emacs from scratch.  If you have
> >> so many packages that the loading time or loading messages bothers you,
> >> you may want to consider running Emacs as a server and connecting to it
> >> via emacsclient; that way you load it once when you login to your
> >> session for example and that's it.
> >
> >> For what it's worth, the messages are not printed by that custom Guix
> >> Elisp code explicitly but by the Emacs function `load', on line 59 of
> >> guix-emacs.el: (load f 'noerror).  If it really bothers you could change
> >> it to:
> >
> >> (load f 'noerror 'nomessage)
> >
> >> Hope that helps,
> >
> >> Maxim
> >
> >
> > The messages also appear when viewing the *Async-native-compile-log* when
> > Emacs is native compiling packages. And the all of the "loading packages"
> > messages are repeated before /each/ package that is compiled.

> That's not with the Emacs in Guix I guess, since we do not yet have
> native compilation enabled. 


It's via a Guix channel for nativecomp Emacs: <https://github.com/flatwhatson/guix-channel> .

> But it seems like the problem here is not
> the printing of the messages, but why when natively compiling packages
> it would cause all the packages to be reloaded for each package... which
> is crazy.

It only seems to be the packages installed via Guix though.

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

* Re: Why Emacs is echoing message for each installed Emacs package while startup
  2022-05-22  2:47                         ` Maxim Cournoyer
  2022-05-22  2:55                           ` Benjamin Slade
@ 2022-05-22 11:24                           ` Akib Azmain Turja
  1 sibling, 0 replies; 22+ messages in thread
From: Akib Azmain Turja @ 2022-05-22 11:24 UTC (permalink / raw)
  To: Maxim Cournoyer, Benjamin Slade; +Cc: zimoun, raingloom, help-guix

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

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> Hi,
>
> [...]
>
>>> > But, why is the message is shown?  Can someone remove it?  It would
>>> > probably be better that I myself clone the repo, fix it and send the
>>> > patch, but my hard disk space isn't allowing me to do that.  Is it
>>> > possible disable that message by modifing any Guix configuration file?
>>
>>> Like Simon, I do not see why the autoloads-related messages are a
>>> problem; they only occur when starting Emacs from scratch.  If you have
>>> so many packages that the loading time or loading messages bothers you,
>>> you may want to consider running Emacs as a server and connecting to it
>>> via emacsclient; that way you load it once when you login to your
>>> session for example and that's it.
>>
>>> For what it's worth, the messages are not printed by that custom Guix
>>> Elisp code explicitly but by the Emacs function `load', on line 59 of
>>> guix-emacs.el: (load f 'noerror).  If it really bothers you could change
>>> it to:
>>
>>> (load f 'noerror 'nomessage)
>>
>>> Hope that helps,
>>
>>> Maxim
>>
>>
>> The messages also appear when viewing the *Async-native-compile-log* when Emacs is native compiling packages. And the all of the "loading packages" messages are repeated before /each/ package that is compiled.
>
> That's not with the Emacs in Guix I guess, since we do not yet have
> native compilation enabled.  But it seems like the problem here is not
> the printing of the messages, but why when natively compiling packages
> it would cause all the packages to be reloaded for each package... which
> is crazy.
>
> Maxim

But why Emacs isn't built with native compilation support?  Any
technical issue or just someone hasn't done it yet?

-- 
Akib Azmain Turja

This message is signed by me with my GnuPG key.  It's fingerprint is:

    7001 8CE5 819F 17A3 BBA6  66AF E74F 0EFA 922A E7F5

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

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

* Re: Why Emacs is echoing message for each installed Emacs package while startup
  2022-05-21 13:45                     ` André A. Gomes
@ 2022-05-22 11:26                       ` Akib Azmain Turja
  2022-05-22 13:04                         ` raingloom
  0 siblings, 1 reply; 22+ messages in thread
From: Akib Azmain Turja @ 2022-05-22 11:26 UTC (permalink / raw)
  To: André A. Gomes; +Cc: zimoun, raingloom, help-guix

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

André A. Gomes <andremegafone@gmail.com> writes:

> Akib Azmain Turja <akib@disroot.org> writes:
>
>> But, why is the message is shown?  Can someone remove it?  It would
>> probably be better that I myself clone the repo, fix it and send the
>> patch, but my hard disk space isn't allowing me to do that.  Is it
>> possible disable that message by modifing any Guix configuration file?
>
> Hi Akib Azmain Turja,
>
> It's not possible to disable the messages by modifying Guix configs.
>
> I'm attaching a patch below.  Would you please send it to the Guix team
> and make your argument?  Thank you.
>
>
> -- 
> André A. Gomes
> "You cannot even find the ruins..."

Thanks a lot.  Just a question, where should I send the patch?
guix-devel?

-- 
Akib Azmain Turja

This message is signed by me with my GnuPG key.  It's fingerprint is:

    7001 8CE5 819F 17A3 BBA6  66AF E74F 0EFA 922A E7F5

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

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

* Re: Why Emacs is echoing message for each installed Emacs package while startup
  2022-05-22 11:26                       ` Akib Azmain Turja
@ 2022-05-22 13:04                         ` raingloom
  0 siblings, 0 replies; 22+ messages in thread
From: raingloom @ 2022-05-22 13:04 UTC (permalink / raw)
  To: Akib Azmain Turja; +Cc: André A. Gomes, zimoun, help-guix

On Sun, 22 May 2022 17:26:55 +0600
Akib Azmain Turja <akib@disroot.org> wrote:

> André A. Gomes <andremegafone@gmail.com> writes:
> 
> > Akib Azmain Turja <akib@disroot.org> writes:
> >  
> >> But, why is the message is shown?  Can someone remove it?  It would
> >> probably be better that I myself clone the repo, fix it and send
> >> the patch, but my hard disk space isn't allowing me to do that.
> >> Is it possible disable that message by modifing any Guix
> >> configuration file?  
> >
> > Hi Akib Azmain Turja,
> >
> > It's not possible to disable the messages by modifying Guix configs.
> >
> > I'm attaching a patch below.  Would you please send it to the Guix
> > team and make your argument?  Thank you.
> >
> >
> > -- 
> > André A. Gomes
> > "You cannot even find the ruins..."  
> 
> Thanks a lot.  Just a question, where should I send the patch?
> guix-devel?
> 

guix-patches is where patches are ideally sent to.


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

end of thread, other threads:[~2022-05-22 13:07 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-15 18:23 Why Emacs is echoing message for each installed Emacs package while startup Akib Azmain Turja
2022-05-15 23:58 ` raingloom
2022-05-16  8:16   ` Akib Azmain Turja
2022-05-16 10:55     ` zimoun
2022-05-16 16:31       ` Akib Azmain Turja
2022-05-16 16:44         ` André A. Gomes
2022-05-16 19:58           ` Akib Azmain Turja
2022-05-16 20:35             ` André A. Gomes
2022-05-16 20:53         ` zimoun
2022-05-17  8:00           ` Akib Azmain Turja
2022-05-17 21:58             ` zimoun
2022-05-18 16:29               ` Akib Azmain Turja
2022-05-18 21:04                 ` zimoun
2022-05-21 11:40                   ` Akib Azmain Turja
2022-05-21 13:45                     ` André A. Gomes
2022-05-22 11:26                       ` Akib Azmain Turja
2022-05-22 13:04                         ` raingloom
2022-05-21 21:09                     ` Maxim Cournoyer
2022-05-21 22:00                       ` Benjamin Slade
2022-05-22  2:47                         ` Maxim Cournoyer
2022-05-22  2:55                           ` Benjamin Slade
2022-05-22 11:24                           ` Akib Azmain Turja

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