nlamirault / emacs-gitlab

A Gitlab client for Emacs
GNU General Public License v2.0
139 stars 30 forks source link

gitlab-show-projects crashes if owner column is nil #6

Open thomasf opened 9 years ago

thomasf commented 9 years ago

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")
  ...
marcinant commented 9 years ago

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?

thomasf commented 9 years ago

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.

marcinant commented 9 years ago

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

thomasf commented 9 years ago

I'll verify soon, a bit busy atm.

marcinant commented 9 years ago

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

thomasf commented 9 years ago

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

thomasf commented 9 years ago

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.

marcinant commented 9 years ago

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

drym3r commented 7 years ago

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