emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Async rebuild package-quickstart after packages update? was Re: 28.0


From: Arthur Miller
Subject: Re: Async rebuild package-quickstart after packages update? was Re: 28.0.50; Proposal: slightly more efficient package-quickstart.el
Date: Fri, 06 Aug 2021 16:53:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Arthur Miller <arthur.miller@live.com>
>> Cc: monnier@iro.umontreal.ca,  raman@google.com,  emacs-devel@gnu.org
>> Date: Fri, 06 Aug 2021 15:20:19 +0200
>> 
>> >> Why do you even care for -Q option there? You would like to do it async,
>> >> so just start the process with user settings and forgett about it and
>> >> let it chew until it's done.
>> >
>> > Starting "emacs -batch" with user settings could easily fail, since
>> > many settings in the init files are for interactive sessions, and will
>> > signal errors when done in batch mode.
>> 
>> Aha. Ok. Fair enough. But why runing in batch mode at all. 
>> 
>> Why not start normal emacs server process on another socket and
>> ask it to refresh quickstart file form another client? Two processes,
>> but no tinkering needed? Would that work?
>
> You mean, start a new interactive session, open an Emacs frame, run
> all the customizations, including perhaps restoring the last session
> via desktop, etc.?  Doesn't sound right to me.

I mean something like this:

(start-process
       "quickstartserver" " *quickstartserver*"
       (expand-file-name invocation-name invocation-directory)
       "--daemon=quickstart-refresher")

(start-process
       "quickstartclient" " *quickstartclient*"
       "emacsclient"
       "--socket-name=quickstart-refresher"
       "--eval "
       "'(progn (require 'package) (package-quickstart-refresh) (kill-emacs))'")

I am not sure how do I pass eval argument to cient in
start-process. When I run above start process for server it runs, and I
can run belov progn to generate quickstart file and kill emacs from
terminal. But when I start client with start-process it does not seem to
run. I guess I am not getting arguments correctly, but that is the
idea. Sure less efficient then with --batch, but I don't think it
matters; it is run once in a while in async process.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]