Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm out of ideas here - my emacs crashes when popup dialog is opened. The x-popup-dialog function is probably to blame but I found no workaround to this. My Emacs version is 23.1.1 . Unfortunately some functionality of emacs calls this (e.x. customize asks whether it should save the changes) which causes the crash.

Does anybody know how to fix it or disable it?

share|improve this question
    
The bug is tagged moreinfo: debbugs.gnu.org/cgi/bugreport.cgi?bug=2877 Maybe someone could get the ball rolling again? –  legoscia Mar 29 '10 at 14:41
    
Is this really a question about programming? –  Silmaril89 Mar 29 '10 at 20:48
add comment

migrated from stackoverflow.com Mar 30 '10 at 3:00

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 1 down vote accepted

Here's a quick elisp bit that will completely disable the graphical dialog for you:

(defadvice yes-or-no-p (around prevent-dialog activate)
  "Prevent yes-or-no-p from activating a dialog"
  (let ((use-dialog-box nil))
    ad-do-it))
(defadvice y-or-n-p (around prevent-dialog-yorn activate)
  "Prevent y-or-n-p from activating a dialog"
  (let ((use-dialog-box nil))
    ad-do-it))

Add this to your .emacs and it'll disable the use of the graphical dialog for the two forms of yes-or-no prompts that emacs uses.

share|improve this answer
    
That made my day. However how to prevent other events from poping dialog box? I.e. flymake insist on popping this dialog when it encounters fatal error - which crashes emacs again. Is there a way to do it on global level? –  radekg Mar 31 '10 at 15:40
    
Actually, for flymake that was as easy as setting the custom-variable. –  radekg Mar 31 '10 at 16:05
add comment

Wow. I had never noticed that, but x-popup-dialog seems to be a problem for me too. At least the example dialog crashed for me. How do you get customize to bring up a dialog? I can't reproduce it.

In general the rule is: if you do it from the keyboard it won't use up a dialog. e.g. use C-x k instead of the mouse to close a buffer and you'll get no dialog. Another, more heavy-handed way, is to set use-dialog-box to nil (though that doesn't stop x-popup-dialog from working if called directly so it may not fix the problem). To fix that you would probably have to advise x-popup-dialog, reimplement it using for example completing-read and never call ad-do-it. Or you could fix the bug. I'm not sure which would be easier :-)

share|improve this answer
    
Customize asks whether I want to save all changes for the buffer when hitting "Save for futher sessions". I thought in carbon-emacs it uses mini-buffer. :/ I will try setting use-dialog to nil and see whether it helps. But this will happen when I get home. Thanks for the answer! –  radekg Mar 29 '10 at 7:42
1  
custom pops up a dialog if you mouse click a button, and uses the minibuffer if you hit enter on the button –  Justin Smith Apr 9 '10 at 0:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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