thread314 / intuitive-tab-line-mode

GNU General Public License v3.0
20 stars 3 forks source link

Error on startup when `initial-buffer-choice` is a function. #2

Closed ideasman42 closed 2 years ago

ideasman42 commented 2 years ago

This package assumes initial-buffer-choice is a file, when it's not an error occurs on startup.

(setq initial-buffer-choice
  (lambda ()
    (with-current-buffer (get-buffer-create "*scratch*")
      (insert "Test me\n")
      (current-buffer))))

(require 'intuitive-tab-line)

Error,

Debugger entered--Lisp error: (wrong-type-argument stringp (closure (bootstrap-version t) nil (save-current-buffer (set-buffer (get-buffer-create "*scratch*")) (insert "Test me\n") (current-buffer))))
  expand-file-name((closure (bootstrap-version t) nil (save-current-buffer (set-buffer (get-buffer-create "*scratch*")) (insert "Test me\n") (current-buffer))))
  find-file-noselect((closure (bootstrap-version t) nil (save-current-buffer (set-buffer (get-buffer-create "*scratch*")) (insert "Test me\n") (current-buffer))) nil nil nil)
  find-file((closure (bootstrap-version t) nil (save-current-buffer (set-buffer (get-buffer-create "*scratch*")) (insert "Test me\n") (current-buffer))))
  my/load-initial-buffer-only()
--- snip ---
thread314 commented 2 years ago

Thanks for pointing this out - I was not even aware that initial-buffer-choice could be a function.

I have updated my/load-initial-buffer-only to handle functions, also my/load-initial-buffer-only no longer loads by default.