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: Fri, 23 Oct 2020 11:10:28 +0300 Message-ID: References: <20201018092201.GG9782@protected.rcdrun.com> <2F36D10F-A179-445D-9417-65194F1CF2F1@mit.edu> <5AA05FFC-47C1-458D-AAA9-1AC63CF30858@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="29519"; 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 Fri Oct 23 10:14:40 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 1kVsDg-0007Yw-5C for get-emacs-tangents@m.gmane-mx.org; Fri, 23 Oct 2020 10:14:40 +0200 Original-Received: from localhost ([::1]:41608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVsDd-0006ZB-D5 for get-emacs-tangents@m.gmane-mx.org; Fri, 23 Oct 2020 04:14:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVs9k-0004dO-Or for emacs-tangents@gnu.org; Fri, 23 Oct 2020 04:10:37 -0400 Original-Received: from static.rcdrun.com ([95.85.24.50]:39409) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVs9h-0007gA-Dl for emacs-tangents@gnu.org; Fri, 23 Oct 2020 04:10:36 -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 00000000002A0B3A.000000005F928FF7.00001DBE; Fri, 23 Oct 2020 08:10:30 +0000 Content-Disposition: inline In-Reply-To: <5AA05FFC-47C1-458D-AAA9-1AC63CF30858@mit.edu> 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/23 03:26:13 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:431 Archived-At: I will post this to emacs-tangents, maybe other people wish to contribute to this package. * Qiantan Hong [2020-10-23 05:42]: > Just implemented option 2 and pushed. > > Also talking about savannah, I’ve just registered an account. > Any further action to take? > Also our school’s copyright office is being super slow these days > and I haven’t got my disclaimer yet. Alright, regarding that you please communicate to eliz AT gnu.org Eli Zaretskii or somebody else. I am not in GNU project neither represent GNU project, I am just interested to have collaboration. By the way, please look into the package rudel as that package was also compatible with Gobby editor. I do not say that you should make compatibility, that is not necessary, it is better that we have it for Emacs only. You may always try to install package: M-x package-install-from-buffer and you will see compiler warnings, it may be little different than if you just use M-x emacs-lisp-byte-compile In toplevel form: crdt.el:77:1: Warning: Unused lexical variable ‘eol’ crdt.el:367:1: Warning: Unused lexical argument ‘key’ crdt.el:454:1: Warning: Unused lexical argument ‘crdt-buffer’ crdt.el:467:1: Warning: Unused lexical argument ‘k’ crdt.el:498:1: Error: Symbol’s function definition is void: crdt--with-buffer-name-make-body There are some issues in the package for convention purposes: ;; Keywords: collaboration crdt Keywords should only be those that you may find when using: M-x finder-list-keywords To verify if your keywords are alright, please use: M-x checkdoc-package-keywords It will give you errors. People will start installing the package and it is good that you increase version numbers, so that it is not always 0.0.0, at least 0.0.1 and so on, it could be 0.0.10 and 0.0.11 and I do not know if there is some format for that, it is good to increase version numbers. Commentary section shall later involve more instructions for users. Docstrings are missing for some functions. Items TODO, by my opinion: - [ ] after M-x crdt-share-buffer, the prompt is as following: "Choose a server session (create if not exists): " However, there is nothing to be chosen. Thus: - [ ] if there is no server session to be chosen, let the user create new session, maybe something like: "New session name? " - "create if not exists" is imperative, but that asks user to create it. It has somehow vague meaning. The way how prompt looks like it gives me impression that some default session will be created if I just press enter. Is it maybe good to create default session automatically? Maybe username@host-number could be something good for new session name to be invented by default. This default value could be shown to user on the prompt, and user could just change it. See function docstring for read-from-minibuffer if you use that one - Other issue is that if I do press ENTER, it quits with the beep. That is not enough, it is better if you give message that crdt aborted. The workflow for me was: crdt-share-buffer, it tells me "create if not exists" and I may assume that it will be created by default, I press enter and then what? I can see "Quit" but I cannot know what really it means, did I quit session maybe? What did I quit? It is better to use prompt that will not let user go out of it by pressing enter. - [ ] I see that in M-x crdt-list-users there is one user name highlighted, I do not think that highlighting is necessary and if you include that, that you should not hard code highlighting as users may have such different themes. Additionally, is good to test it on console as well. - [ ] crdt-connect should not fail because host name was not entered as it should not move to port prompt if host name is not entered. - [ ] my suggestion is that you try to share the buffer always, so I tried sharing this buffer for email to you. It gave me some errors. I was using M-x orgalist mode inside. My debugger opened up on error. Now, because there were errors, I could not save the buffer. See this temporary video: https://gnu.support/files/tmp/2020-10-23/2020-10-23-10:54:21.ogv The video will self destruct after some weeks. - [ ] M-x crdt-connect, now I get the screen of the session, I can see: Local Buffer in first column, what does that mean for me as remote user? Does it mean the remote buffer should become my local buffer? I do not know as user - [ ] M-x crdt-connect, when entered into same list of buffers, I can see "Network Name" and under that column I can see the name of the file being edited. That is contradictory. I think that you should not call that Network as you have not asked user for Network name, you asked for Session name. Maybe you mean session, maybe file, now I do not know it. - [ ] in the same list i see entry under Local Buffer "--" and this is also vague. If you wish to tell there is none buffer or similar, then you could say maybe "not yet connected". - [ ] column width in the tabulated mode can be adjusted, you could assume safely that most users have at least 80 chars width. When I finally connect to the buffer, I see: crdt - mutt-pr... but that is way to narrow, my file name was mutt-protected-1001-9722-56588427 and more than that. - [ ] Gobby editor also helps users choose a color. I see that cursor of other user is visible and it looks as block cursor. Some people will want to customize their own cursor to be like a line or else. I am just thinking as if you wish to show multiple cursors in one buffer which is also logical for multi user editing, then maybe you should assign to users various colors. Is that maybe why you highlighted the username in the list of buffers? - [ ] I could not save the buffer shared, I tried killing it too. If I kill the buffer the connected user should maybe get informed and connection to that buffer should disconnect. Debugger entered--Lisp error: (wrong-type-argument hash-table-p nil) puthash("mutt-protected-1001-9722-5658842758353437585" nil nil) (progn (puthash crdt--buffer-network-name nil (crdt--buffer-table)) (crdt--broadcast-maybe (crdt--format-message (cons 'cursor (cons crdt--buffer-network-name (cons (crdt--local-id) '(nil nil nil nil)))))) (if (eq (crdt--focused-buffer-name) crdt--buffer-network-name) (progn (crdt--broadcast-maybe (crdt--format-message (cons 'focus (cons (crdt--local-id) '...)))) (crdt--focused-buffer-name-setter nil))) (crdt--refresh-users-maybe)) (if crdt--buffer-network-name (progn (puthash crdt--buffer-network-name nil (crdt--buffer-table)) (crdt--broadcast-maybe (crdt--format-message (cons 'cursor (cons crdt--buffer-network-name (cons (crdt--local-id) '...))))) (if (eq (crdt--focused-buffer-name) crdt--buffer-network-name) (progn (crdt--broadcast-maybe (crdt--format-message (cons 'focus (cons ... ...)))) (crdt--focused-buffer-name-setter nil))) (crdt--refresh-users-maybe))) crdt--kill-buffer-hook() kill-buffer("mutt-protected-1001-9722-5658842758353437585") funcall-interactively(kill-buffer "mutt-protected-1001-9722-5658842758353437585") #(kill-buffer nil nil) apply(# kill-buffer (nil nil)) call-interactively@ido-cr+-record-current-command(# kill-buffer nil nil) apply(call-interactively@ido-cr+-record-current-command # (kill-buffer nil nil)) call-interactively(kill-buffer nil nil) command-execute(kill-buffer) -- Jean Louis