unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Arthur Miller <arthur.miller@live.com>
To: chad <yandros@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, raman <raman@google.com>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	EMACS development team <emacs-devel@gnu.org>
Subject: Re: Async rebuild package-quickstart after packages update? was Re: 28.0.50; Proposal: slightly more efficient package-quickstart.el
Date: Sat, 07 Aug 2021 07:45:33 +0200	[thread overview]
Message-ID: <AM9PR09MB49771727C09C9B50BDAE484696F49@AM9PR09MB4977.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <CAO2hHWbdVEr7v7fnorDCSGfK_26B5Ztyorz06hD7LzF06O-2GA@mail.gmail.com> (chad's message of "Fri, 6 Aug 2021 17:46:43 -0700")

chad <yandros@gmail.com> writes:

> As near as I can tell, the moderate-sized potential problem with "just start another full interactive session, and communicate with
> it" is the near-certainty that some people's interactive startup isn't (effectively) reentrant. There are lots of ways this can happen
> -- package auto-loading and refreshing, cache files like desktop/places/recent/history/etc, configurations that automatically open
> dedicated frames in various places, multiple servers confusing emacsclient, and the like. (Back in the 90's and early 00's, I used to
> see user configurations like this all the time.)

I thought that emacs does not open frames in daemon mode (more than one
invisible or how it works).


> There is some mitigation for this effect in that it overlaps with daemon-mode non-rerentrancy, and also some in that only a subset
> of users will use package-quickstart. That's probably enough to put together an experiment, but I would expect some (solvable!)
> problems to crop up.
>
> On the other hand, if I understand T.V Raman's suggestion to put together a package that learns which parts of the environment
> are necessary to share between a configured emacs and a subsequent emacs batch process, it sounds like a reasonable approach
> toward a similar middle ground, but starting from the cleaner -Q state. If I'm reading async.el correctly, it already has machinery
> for this in, for example, async-inject-variable.
>
>  (defun async-inject-variables
>
>      (include-regexp &optional predicate exclude-regexp noprops)  "Return a `setq' form that replicates part of the calling
>  environment.
>  It sets the value for every variable matching INCLUDE-REGEXP and
>  also PREDICATE.  It will not perform injection for any variable
>  matching EXCLUDE-REGEXP (if present) or representing a `syntax-table'
>  i.e. ending by \"-syntax-table\".
>  When NOPROPS is non nil it tries to strip out text properties of each
>  variable's value with `async-variables-noprops-function'.
>  It is intended to be used as follows:
>      (async-start
>         \\=`(lambda ()
>            (require \\='smtpmail)
>            (with-temp-buffer
>              (insert ,(buffer-substring-no-properties (point-min) (point-max)))
>              ;; Pass in the variable environment for smtpmail
>              ,(async-inject-variables \"\\\\=`\\(smtpmail\\|\\(user-\\)?mail\\)-\")
>              (smtpmail-send-it)))
>         \\='ignore)"  
>
> It also has this option, which suggests that this issue comes up at least some of the time, and is worked around in situ rather than
> solved at the package level:
>
>  (defvar async-quiet-switch "-Q"
>    "The Emacs parameter to use to call emacs without config.
>  Can be one of \"-Q\" or \"-q\".
>  Default is \"-Q\" but it is sometimes useful to use \"-q\" to have a
>  enhanced config or some more variables loaded.") 
>
> I think there's an interesting area to explore here, especially given the relatively low utility of make-thread, the way cores are
> multiplying, and the extra crunching-power desired by potential changes like native-comp, json, lsp, and tree-sitter (which I
> assume, perhaps wrongly, will end up with loadable binary objects for some/most languages), this seems like a good problem to
> look at.

I agree that it is an interesting problem, it seems like a lot of work.



  parent reply	other threads:[~2021-08-07  5:45 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-20  0:27 28.0.50; Proposal: slightly more efficient package-quickstart.el Arthur Miller
2021-07-20  2:54 ` Stefan Monnier
2021-07-20  6:01   ` Arthur Miller
2021-07-20 15:49     ` Stefan Monnier
2021-07-22 22:38       ` Arthur Miller
2021-07-23 14:36         ` Stefan Monnier
2021-07-23 14:50           ` Async rebuild package-quickstart after packages update? was " T.V Raman
2021-08-03 22:20             ` Stefan Monnier
2021-08-04  2:24               ` T.V Raman
2021-08-04  3:25                 ` Stefan Monnier
2021-08-04 14:20                   ` T.V Raman
2021-08-04 17:19                     ` Stefan Monnier
2021-08-04 18:36                       ` T.V Raman
2021-08-05  0:22                       ` T.V Raman
2021-08-05  6:00                         ` Eli Zaretskii
2021-08-05 14:17                           ` T.V Raman
2021-08-05 14:29                           ` T.V Raman
2021-08-05 14:59                             ` Stefan Monnier
2021-08-05 15:21                               ` T.V Raman
2021-08-05 16:23                                 ` Stefan Monnier
2021-08-06  5:18                                   ` Arthur Miller
2021-08-06  6:39                                     ` Eli Zaretskii
2021-08-06 13:20                                       ` Arthur Miller
2021-08-06 13:28                                         ` Eli Zaretskii
2021-08-06 14:13                                           ` Arthur Miller
2021-08-06 14:53                                           ` Arthur Miller
2021-08-07  0:46                                             ` chad
2021-08-07  5:26                                               ` Eli Zaretskii
2021-08-07  5:45                                               ` Arthur Miller [this message]
2021-08-06 14:24                                       ` Stefan Monnier
2021-08-06 14:29                                         ` T.V Raman
2021-08-05 16:25                                 ` Eli Zaretskii
2021-08-05 16:57                                   ` T.V Raman
2021-08-05 17:03                                     ` Eli Zaretskii
2021-08-05 18:11                                     ` Stefan Monnier
2021-08-05 18:23                                       ` T.V Raman
2021-08-05 19:48                                       ` On The Use(fullness) of make-thread " T.V Raman
2021-08-06  5:24                                       ` Arthur Miller
2021-08-07  4:19                                       ` Clément Pit-Claudel
2021-08-07  5:38                                         ` Arthur Miller
2021-07-23 17:00           ` Arthur Miller
2021-07-23 22:26       ` Arthur Miller
2021-07-23 22:37         ` Arthur Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM9PR09MB49771727C09C9B50BDAE484696F49@AM9PR09MB4977.eurprd09.prod.outlook.com \
    --to=arthur.miller@live.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=raman@google.com \
    --cc=yandros@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).