2

I would like to create a (read-only) popup window with some text in it, such that the user can close it by pressing 'q'. You know - the kind you see when you try compiling and get errors.

Any pointers to elisp functions I should look at?

Edit: I managed to get a popup buffer with the text I need, but I still need to make it read-only and respond to 'q' to kill the buffer.

2
  • Use define-derived-mode with special-mode as parent. Call the mode function for your newly defined mode in the buffer you created. That defines the right binding for the key q and makes the buffer read-only. – Tobias Jun 15 '19 at 23:22
  • 2
    There are several ways to do what you describe. One place to start is with the Elisp manual, node Temporary Displays. – Drew Jun 16 '19 at 0:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.