2

(message "abc\ndef") displays a two line message, while (message-box "%s" "abc\ndef") does not. Can the controlled two line display be replicated in message-box?

Also, M-x customize didn't seem to have a section for customizing the message-box appearance (e.g. different background colors for the OK vs the message). Can message-box's appearance be customized?

Can either of these issues be remedied by going to a pop-up (of some sort, e.g. x-popup-dialog), or some other emacs package?

1
  1. No, message-box does not allow that. It simply removes the newline char.

  2. No, there is no customization for message-box.

  3. x-pop-dialog won't help either. It too removes newline chars.

  4. And neither will display-message-or-buffer.

Your best bet is probably to display a buffer that shows whatever complex text you like, and then read user input - either a character or a string. You can use read-char and the like to read a char, and you can use read-from-minibuffer, read-string, completing-read and the like to read a string.

See also variable (option) use-dialog-box.

  • I'd be happy to. How? Where on the page is the hot spot for accepting the answer? – zugzwang Jun 26 '15 at 18:39

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.