emacs-dashboard / emacs-dashboard

An extensible emacs dashboard
GNU General Public License v3.0
1.33k stars 136 forks source link

Error when setting `dashboard-items` to nil #158

Open Luis-Henriquez-Perez opened 5 years ago

Luis-Henriquez-Perez commented 5 years ago

I don't think this should happen. I expected the dashboard to just popup the emacs logo and its startup messages and nothing else. I did not expect an error when I said I wanted no items.

This is the stack trace:

Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil) dashboard-insert-startupify-lists() dashboard-resize-on-hook()

f(compiled-function () #<bytecode 0x1e39ea9>)()

run-hooks(window-setup-hook)

f(compiled-function () #<bytecode 0x3ec929>)()

normal-top-level()

JesusMtnez commented 5 years ago

I completely agree it should display nothing, not fail :thinking: . I'll try to take a look on this

Luis-Henriquez-Perez commented 5 years ago

This error is caused because of (goto-char (car (last dashboard--section-starts))). last-dashboard--section-starts is nil when dashboard-items is nil. This results in (goto-char nil) which gives an error.

Dragoncraft89 commented 4 years ago

This one was resolved by #204 I guess.

I can't reproduce it anymore on the latest master