A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://emacs.stackexchange.com/questions/84910/show-only-documentation-in-a-new-frame below:

Show only documentation in a new frame

The following function shows the documentation in a new frame. But it also shows the buffer storing the code. How can I show only the documentation, so the documentation fills the whole frame?

(defun qdesc (function)
  "Show the documentation for FUNCTION in a new Emacs frame."

  (interactive (list (function-called-at-point)))

  (let ( (help-frame  (make-frame '((name . "Help")
                                    (minibuffer . nil)
                                    (width . 80)
                                    (height . 20)))) )
    (with-selected-frame help-frame
      (describe-function function))))

Try this:

    ...
    (with-selected-frame help-frame
      (switch-to-buffer "*Help*")
      (describe-function function)
      (delete-other-windows))
    ...

Untested.

NickDNickD

35.5k44 gold badges3232 silver badges5050 bronze badges

One way you can ensure that your call to describe-function uses the entire frame is by let-binding display-buffer-alist as shown below:

(defun qdesc (function)
  "Show the documentation for FUNCTION in a new Emacs frame."

  (interactive (list (function-called-at-point)))

  (let ((help-frame  (make-frame '((name . "Help")
                                    (minibuffer . nil)
                                    (width . 80)
                                    (height . 20))))
        (display-buffer-alist '((t display-buffer-full-frame))))
    (with-selected-frame help-frame
      (describe-function function))))
mmarshall540mmarshall540

68733 silver badges88 bronze badges

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4