emacs-helm/helm — pull request #492 by syohex (2014-05-02 04:46:08+00:00)
Title: Do nothing when helm-buffer is not existed

Error('no such buffer') is raised if `init` function takes time.
For example, it reads user input with `read-string` or similar
functions. Helm buffer is not created until user input and
init function are done, then `with-helm-buffer` in
`helm--maybe-update-keymap` raises error.

Following code is sample code for reproducing this issue.

```lisp
(defun helm-sample-init ()
(let ((dir (read-directory-name "Search Directory> ")))
(with-current-buffer (helm-candidate-buffer 'global)
(call-process "ls" nil t nil "-1" (expand-file-name dir)))))

(defvar helm-sample-source
'((name . "Sample")
(init . helm-sample-init)
(candidates-in-buffer)))

(defun helm-sample ()
(interactive)
(helm :sources '(helm-sample-source) :buffer "*helm-sample*"))
```

If you executed `M-x helm-sample` then you get following error.

```
Error in post-command-hook (helm--maybe-update-keymap): (error "No buffer named *helm-sample*")
```

Please see this patch.