emacs-tangents
[Top][All Lists]
Advanced

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

Re: TODO crdt-stop-session, selecting deleted buffer, fails to remove se


From: Jean Louis
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
User-agent: Mutt/+ (1036f0e) (2020-10-18)

I will post this to emacs-tangents, maybe other people wish to
contribute to this package.

* Qiantan Hong <qhong@mit.edu> [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")
  #<subr call-interactively>(kill-buffer nil nil)
  apply(#<subr call-interactively> kill-buffer (nil nil))
  call-interactively@ido-cr+-record-current-command(#<subr call-interactively> 
kill-buffer nil nil)
  apply(call-interactively@ido-cr+-record-current-command #<subr 
call-interactively> (kill-buffer nil nil))
  call-interactively(kill-buffer nil nil)
  command-execute(kill-buffer)

-- 
Jean Louis



reply via email to

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