From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: Emacs design and architecture. How about copy-on-write? Date: Sat, 23 Sep 2023 21:23:00 +0700 Message-ID: References: <87cyyhc7uu.fsf@dataswamp.org> <83ttrsg9nx.fsf@gnu.org> <83h6nrg4eg.fsf@gnu.org> <83v8c7elan.fsf@gnu.org> <877conk5ny.fsf@localhost> <83ttrreeu0.fsf@gnu.org> <87bkdzeas1.fsf@localhost> <83cyyfe5l8.fsf@gnu.org> <87led2o0nb.fsf@localhost> <83ttrqcpfb.fsf@gnu.org> <877comnv4a.fsf@localhost> <83fs3ackrq.fsf@gnu.org> <87ttrp89bx.fsf@localhost> <83led1aqnq.fsf@gnu.org> <87v8c3zun7.fsf@localhost> <83r0mr8w0j.fsf@gnu.org> <87bkduxz3l.fsf@localhost> <83cyya75eb.fsf@gnu.org> <877coh2lmd.fsf@localhost> <83r0mp3zh5.fsf@gnu.org> <55f29d31-947f-4cfc-a90e-36b0592ba12e@gutov.dev> <83lecx3uxt.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="759"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , yantar92@posteo.net, acm@muc.de, incal@dataswamp.org, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 23 16:24:57 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qk3Z2-000AUo-60 for ged-emacs-devel@m.gmane-mx.org; Sat, 23 Sep 2023 16:24:56 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qk3XR-00085R-5R; Sat, 23 Sep 2023 10:23:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qk3XQ-000849-1x for emacs-devel@gnu.org; Sat, 23 Sep 2023 10:23:16 -0400 Original-Received: from mail-vs1-xe31.google.com ([2607:f8b0:4864:20::e31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qk3XO-0003Sj-Gu; Sat, 23 Sep 2023 10:23:15 -0400 Original-Received: by mail-vs1-xe31.google.com with SMTP id ada2fe7eead31-45269fe9d6bso1679753137.2; Sat, 23 Sep 2023 07:23:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695478992; x=1696083792; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=hb9UejY6cOYJO12t1vakyDA4EZuSJyRE/kioSfsyVHw=; b=M4TlLMehS2icZ7df7kjZPiZd5+O2qbx/CD45lMTsIL0N91UhqZhVQO/qfHHLmQ0chG 9SAue+tW2AJzDU5nWn127eX8nBwHU8UqNcszKUNAlgtE4HIgXAfZpEFtwPTRToCMm1EW rBZ0YAw1w/ZNeKyi6bQ03FJLnBLgy6c6TiDdihD+zEAIhjro0CCCdcMwTkbbb5byyFS+ 4FDy38SlXLtNU5tpfDg1IwCnQQuTgjDSb3ztArKo3XhYZHdNRjiPh5OKoVOkcxplvwiO T4xBoFmWfkdMxW6ECG2/F0hpMlOi6ipA0OrkafQVfCXJ0olaULaKtU3xr9VZJjzus9ZK rF7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695478992; x=1696083792; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hb9UejY6cOYJO12t1vakyDA4EZuSJyRE/kioSfsyVHw=; b=Uu2Cb70R7PPjZprb2qHqHafuQy3oSSFpjUmpiYpi2nK5AuoWAXblNvZQS+JSCVGLhW wpAN3sgB++MFfMTlYEF6vpC6kK3yJyk5KY3zBc8sniSlTzFakZ2SqEP6GB6hh3NLaBjV j+pqi8gt9Hl1gTu4hzIqK0Q1jx00ddmrcYlAsDy75JCrvBzF1sR+lbuUgAnw0WHJe74h T7RiqcmNna26D/H5+iF1hA3J4/hJvzUc5mcL3V+zyEPtGEIN21SRd+9+dMMWxby7FIoJ 0LRpKa1o3QK3R1kownPEa0KZQmafvZiY2J1hRZo+dsHLEl3VABoGnwJVix/Jy2MHOxgT ISoQ== X-Gm-Message-State: AOJu0YwnaAz3yUbUsEu3d8Lv0d81aZEjsukAxf9uvYaZ+A8L4GYt6JNj 6Q1/eiCwzb57sVYWg0HRLEkWr3i/YW/8cc9Aoiw= X-Google-Smtp-Source: AGHT+IHV+1cQE7h+uPIm+bXbBOWUvJE0fC5L+rY3MDXQJbKgeVVX5OEt4H33Nk+EJnh5MEj7Ew8XvKIc/f81duk+6DQ= X-Received: by 2002:a67:e309:0:b0:452:5798:64bd with SMTP id j9-20020a67e309000000b00452579864bdmr1560951vsf.35.1695478992617; Sat, 23 Sep 2023 07:23:12 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::e31; envelope-from=yurivkhan@gmail.com; helo=mail-vs1-xe31.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:311004 Archived-At: On Sat, 23 Sept 2023 at 20:09, Dmitry Gutov wrote: > I agree: functions like yes-or-no-p will have to, internally in their > implementation, acquire the "redisplay lock" or whatever it'll be > called, and do other things to ensure that they work from non-default > threads too. That=E2=80=99s not the only possible implementation. A function that wants = a confirmation could package up the prompt with a continuation function, and post that as a message to the main thread. The main thread would pump its message queue, display the prompt, and schedule the continuation (with the prompt result) to a worker thread. That would require the code using prompt functions to be transformed to continuation-passing style though, either explicitly in code, or automatically by the lisp reader.