re5et / emux

emacs terminal multiplexer
24 stars 5 forks source link

Error when loading a configuration without hitting tab or rotating the search ring #2

Open radamant opened 11 years ago

radamant commented 11 years ago

It appears there is no default candidate for completing read.

Reproduction: 1) run emux-session-load-template 2) see default option chosen 3) hit RET 4) see following error:

Debugger entered--Lisp error: (file-error "Cannot open load file" "/Users/adam/.emacs.d/emux-templates/.el")
  load("/Users/adam/.emacs.d/emux-templates/.el" nil nil t)
  load-file("~/.emacs.d/emux-templates/.el")
  (progn (emux-session-create (list (quote :name) template)) (load-file (concat "~/.emacs.d/emux-templates/" template ".el")) (message "%s template loaded" template))
  (if (cond ((not (emux-session-from-name template)) t) (t (yes-or-no-p (format "session %s already exists, really load?" template)))) (progn (emux-session-create (list (quote :name) template)) (load-file (concat "~/.emacs.d/emux-templates/" template ".el")) (message "%s template loaded" template)))
  (let ((template (emux-completing-read "load emux session template: " (mapcar (function (lambda (filename) (substring filename 0 -3))) (directory-files "~/.emacs.d/emux-templates" nil "^[^#].*.el"))))) (if (cond ((not (emux-session-from-name template)) t) (t (yes-or-no-p (format "session %s already exists, really load?" template)))) (progn (emux-session-create (list (quote :name) template)) (load-file (concat "~/.emacs.d/emux-templates/" template ".el")) (message "%s template loaded" template))))
  emux-session-load-template()
  call-interactively(emux-session-load-template nil nil)
radamant commented 11 years ago

This does not reproduce if I set emacs-completing-read-command to "ido-completing-read"