emacs-gitlab icon indicating copy to clipboard operation
emacs-gitlab copied to clipboard

gitlab-show-projects crashes if owner column is nil

Open thomasf opened this issue 10 years ago • 9 comments

I do not currently know why its nil.

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-width(nil)
  tabulated-list-print-col(1 nil 28)
  tabulated-list-print-entry("311" ["somethingdocker-drone" nil "docker-containers" "Docker configuration for https://drone.something.se"])
  apply(tabulated-list-print-entry ("311" ["somethingdocker-drone" nil "docker-containers" "Docker configuration for https://drone.something.se"]))
  tabulated-list-print(t)
  gitlab-show-projects()
  call-interactively(gitlab-show-projects record nil)
  command-execute(gitlab-show-projects record)
  execute-extended-command(nil "gitlab-show-projects")
  ...

thomasf avatar Apr 19 '15 15:04 thomasf

Weird. AFAIK each project has to have an owner. emacs-gitlab shouldn't die while owner name is empty. However I don't know how to duplicate this issue. How can I remove user name?

marcinant avatar May 29 '15 12:05 marcinant

I think it might be caused by projects only owned by groups instead of a user, ie. no project members, only group members. .. I can try to verify that if you cannot reproduce.

thomasf avatar May 29 '15 14:05 thomasf

@thomasf Could you please confirm if #12 resolved this problem?

marcinant avatar Jun 01 '15 22:06 marcinant

I'll verify soon, a bit busy atm.

thomasf avatar Jun 04 '15 11:06 thomasf

Ok. Please, take a look at other changes and improvements merged recently, too.

marcinant avatar Jun 04 '15 11:06 marcinant

I still get an error from gitlab-show-projects.. Will investigate at once.

thomasf avatar Jun 11 '15 11:06 thomasf

This might be another issue, not sure. The new error is caused by an (description) with a nil cdr in the data which makes (replace-regexp-in-string "\^M\\|\n" " " (assoc-default 'description p)) become evaluated as (replace-regexp-in-string(" \\|\n" " " nil) and the last nil argument causes an error.

Changing that line to (replace-regexp-in-string "\^M\\|\n" " " (or (assoc-default 'description p) "")) now lists all projects for me.. Actually it seems to list about half of the projects twice.

thomasf avatar Jun 11 '15 11:06 thomasf

Ok. As I understand problem with list is when project has no description. I'll try to fix it soon.

marcinant avatar Jun 17 '15 10:06 marcinant

Oh, I know see there's an issue for this. Fixed on https://github.com/drym3r/emacs-gitlab/commit/a3a9c3574a507bb64db7ba92d3a80ea57faeab50

drym3r avatar Jul 10 '17 13:07 drym3r