emacs-purpose icon indicating copy to clipboard operation
emacs-purpose copied to clipboard

Messes with company documentation

Open qleguennec opened this issue 6 years ago • 1 comments

company-box (https://github.com/sebastiencs/company-box) opens a *Help* buffer to display a help tooltip. With emacs-purpose on, this buffer gets opened in a new frame. Is there a way to ignore opening cetain buffers according to the major mode?

qleguennec avatar Mar 21 '19 13:03 qleguennec

(setq pop-up-frames nil) fixes the issue

This is actually not related to company-box at all, my bad.

The function responsible for this behavior is

(defun elisp--company-doc-buffer (str)
  (let ((symbol (intern-soft str)))
    ;; FIXME: we really don't want to "display-buffer and then undo it".
    (save-window-excursion
      ;; Make sure we don't display it in another frame, otherwise
      ;; save-window-excursion won't be able to undo it.
      (let ((display-buffer-overriding-action
             '(nil . ((inhibit-switch-frame . t)))))
        (ignore-errors
          (cond
           ((fboundp symbol) (describe-function symbol))
           ((boundp symbol) (describe-variable symbol))
           ((featurep symbol) (describe-package symbol))
           ((facep symbol) (describe-face symbol))
           (t (signal 'user-error nil)))
          (help-buffer))))))

qleguennec avatar Mar 23 '19 17:03 qleguennec