13

I intend to change certain features/functions in Emacs. I was wondering whether there is any feature in Emacs to popup a windows to show a warning message? Also, I would appreciate any alternative ideas if this feature is not available.

Cheers all.

Arash
  • 568
  • 3
  • 17
  • Any specific platform (eg, MS Windows), or for all platforms? – Michael Paulukonis Jun 23 '12 at 20:16
  • @MichaelPaulukonis all platforms solution will be the most favorite. But Unix/Linux platform is the main focus. The user is expected to interact with a GUI though. Cheers mate. – Arash Jun 23 '12 at 20:21
  • 2
    I don't know how to popup modal GUI dialog boxes (and I'm rather glad that this usually isn't done in Emacsland), but since you're also asking for alternatives: Usually, one would just print the warning message in the echo area (using `message`, which also appends it to the `*Messages*` buffer), or use `warn`/`display-warning` which append to and pop up the `*Warnings*` buffer. You might also be able to do what you want using D-Bus, but let's wait for other answers to come in – maybe what you're asking for is possibe after all. – danlei Jun 23 '12 at 22:59
  • @danlei thanks for your reply mate. Can you please give me more information about the D-Bus idea? or just direct me toward a link or anything that may help? Cheers. – Arash Jun 24 '12 at 13:14
  • 1
    I've never used it myself. Documentation: `M-: (info "(dbus)")`. There are also some blog posts in the first hits for "emacs dbus". – danlei Jun 25 '12 at 16:47

2 Answers2

9

(message-box "World's on fire")

You might also want to M-x apropos RET ^x- to find out about other GUI features emacs supports.

If you want something more sophisticated, you have to use/write separte programs.
Emacs GUI support is limited, but it interacts quite well with other processes.

sabof
  • 8,062
  • 4
  • 28
  • 52
  • Thanks for your reply mate. As for using/writing programs suggestion, can you please advice me on where I can find more information about this? Is this included in the documentation. Unfortunately I couldn't find it in there :-(. I'm just learning Emacs so if I'm wrong please accept my apologies. Cheers – Arash Jun 24 '12 at 13:12
  • I meant using something outside Emacs, such as QT, XULRunner or existing applications with a command line interface – sabof Jun 24 '12 at 13:46
3

You might want to look at the following. These are the popups that autocomplete uses.

https://github.com/m2ym/popup-el/tree/v0.4

Sid
  • 31
  • 1