[Emacs] Shortcut to close a window containing a buffer in emacs? - Printable Version +- Linux-Noob Forums (https://www.linux-noob.com/forums) +-- Forum: Linux Noob (https://www.linux-noob.com/forums/forum-3.html) +--- Forum: How Do I? (https://www.linux-noob.com/forums/forum-60.html) +--- Thread: [Emacs] Shortcut to close a window containing a buffer in emacs? (/thread-816.html) |
[Emacs] Shortcut to close a window containing a buffer in emacs? - Schneidel - 2008-09-29 I have just started using Emacs as an IDE. What I would like to do is this: I would like to compile a file(using M-x Compile which opens a new window showing errors/success) and then if there are no errors I want to close the newly opened window containing the buffer named *compilation*(using a single command sequence) so that the whole frame layout is back to what it was before. I don't think there's an inbuilt key-combination to do this, does somebody have any ideas how I can achieve this using some macro or something ? [Emacs] Shortcut to close a window containing a buffer in emacs? - vegacom - 2008-11-28 Quote:I have just started using Emacs as an IDE. What I would like to do is this: I would like to compile a file(using M-x Compile which opens a new window showing errors/success) and then if there are no errors I want to close the newly opened window containing the buffer named *compilation*(using a single command sequence) so that the whole frame layout is back to what it was before. I don't think there's an inbuilt key-combination to do this, does somebody have any ideas how I can achieve this using some macro or something ? Hi, try this: add this line to ~/.emacs (global-set-key (kbd "<f9>") 'compile) so you can compile by pressing F9 to get rid of the compile messages, type ESC three times: ESC ESC ESC kind regards, [Emacs] Shortcut to close a window containing a buffer in emacs? - Schneidel - 2008-11-29 Thanks, it works! Quote:<blockquote data-ipsquote="" class="ipsQuote" data-ipsquote-contentcommentid="12647" data-ipsquote-username="Schneidel" data-cite="Schneidel" data-ipsquote-contentapp="forums" data-ipsquote-contenttype="forums" data-ipsquote-contentid="3604" data-ipsquote-contentclass="forums_Topic"><div>I have just started using Emacs as an IDE. What I would like to do is this: I would like to compile a file(using M-x Compile which opens a new window showing errors/success) and then if there are no errors I want to close the newly opened window containing the buffer named *compilation*(using a single command sequence) so that the whole frame layout is back to what it was before. I don't think there's an inbuilt key-combination to do this, does somebody have any ideas how I can achieve this using some macro or something ? Hi, try this: add this line to ~/.emacs (global-set-key (kbd "<f9>") 'compile) so you can compile by pressing F9 to get rid of the compile messages, type ESC three times: ESC ESC ESC kind regards, </div></blockquote> |