From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.tangents Subject: Re: TODO crdt-stop-session, selecting deleted buffer, fails to remove session from the list Date: Thu, 22 Oct 2020 02:47:36 +0300 Message-ID: References: <20201018092201.GG9782@protected.rcdrun.com> <2F36D10F-A179-445D-9417-65194F1CF2F1@mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28828"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/+ (1036f0e) (2020-10-18) Cc: emacs-tangents@gnu.org To: Qiantan Hong Original-X-From: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Thu Oct 22 01:48:13 2020 Return-path: Envelope-to: get-emacs-tangents@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 1kVNq0-0007PP-K7 for get-emacs-tangents@m.gmane-mx.org; Thu, 22 Oct 2020 01:48:12 +0200 Original-Received: from localhost ([::1]:60966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVNpz-00056o-Jb for get-emacs-tangents@m.gmane-mx.org; Wed, 21 Oct 2020 19:48:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVNpi-00056S-T0 for emacs-tangents@gnu.org; Wed, 21 Oct 2020 19:47:54 -0400 Original-Received: from static.rcdrun.com ([95.85.24.50]:44289) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVNpg-0002DD-K0 for emacs-tangents@gnu.org; Wed, 21 Oct 2020 19:47:54 -0400 Original-Received: from localhost ([::ffff:41.202.241.51]) (AUTH: PLAIN admin, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by static.rcdrun.com with ESMTPSA id 00000000002A0B3E.000000005F90C8A6.00007543; Wed, 21 Oct 2020 23:47:49 +0000 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=95.85.24.50; envelope-from=bugs@gnu.support; helo=static.rcdrun.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/21 17:52:21 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-tangents@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-tangents" Xref: news.gmane.io gmane.emacs.tangents:416 Archived-At: I think you should at least post this to emacs-tangents@gnu.org as it is related to Emacs, not yet to Emacs development. I make copy there, OK? There could be people with good ideas. You have that account on Savannah to contribute to Emacs or ELPA? I hope so. * Qiantan Hong [2020-10-22 02:31]: > I find that it require some non trivial refactoring to do this > — currently I just assume that client always open any buffer server is sharing. > > So to solve the problem there’s two way: > > - Keep the invariant "client always open any buffer server is sharing”. > If client try to kill a shared buffer, warn them and say if doing so, it will > cause the client to leave the whole session. This is very simple to do. > > - Change the model and not keeping the invariant > "client always open any buffer server is sharing”. This will require > non-trivial work. After doing so, however, we can allow feature like > lazily pull buffer from server (only when the client need it). > > What do you think? My suggestion is that you install Gobby collaborative editor and look inside, I did, then follow the well established model, you almost have it by same model. My opinion is that client should connect: - immediately to the buffer shared, if it is the only one - to the selection of buffers if there are multiple - and to be given option to connect to other available buffers, but not automatically > - Keep the invariant "client always open any buffer server is sharing”. > If client try to kill a shared buffer, warn them and say if doing so, it will > cause the client to leave the whole session. This is very simple to do. It is not good to kill the session by closing the buffer, as client did not decide to kill the session, and in the mean time, server could provide other files, right? It is better to ask user if the session should be also disconnected, and not do it automatically. If there are other available files that appeared in the mean time, user shall be informed in that message. Generally option 2 seem logical more than option 1, which looks not well planned for multi users having multi sessions with multi buffers. Jean