The Computer Oracle

How can I hide the Tool-bar in Emacs persistently?

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Lost Meadow

--

Chapters
00:00 How Can I Hide The Tool-Bar In Emacs Persistently?
00:25 Accepted Answer Score 53
00:40 Answer 2 Score 11
01:02 Answer 3 Score 6
01:28 Answer 4 Score 7
01:50 Thank you

--

Full question
https://superuser.com/questions/127420/h...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#linux #emacs #toolbar

#avk47



ACCEPTED ANSWER

Score 53


Add the following to your init file (~/.emacs or _emacs or ~/.emacs.d/init.el):

(tool-bar-mode -1)



ANSWER 2

Score 11


Emacs has a nice built-in customization interface.

Select Options › Customize Emacs › Specific Option, start typing tool, then hit TAB to see the options starting with tool. Choose tool-bar-mode then. Toggle its value to switch it off, and press Save for future sessions.




ANSWER 3

Score 7


Just for future reference.

~/.emacs file with tool-bar, menu-bar and scroll-bar hidden

;; Disabling things
;;-----------------------------------------------------------------------
(menu-bar-mode -1) 
(toggle-scroll-bar -1) 
(tool-bar-mode -1) 

;;Note: If, after turning any of these off, you want to re-enable them for a single emacs window, you can do so by pressing Meta-x and then typing the command at the M-x prompt. (Copied from Web)
;;Example:
;;M-x tool-bar-mode
;;will turn the toolbar back on. 
;;-----------------------------------------------------------------------

Now, your emacs will look like this.




ANSWER 4

Score 6


I agree with michael. But if you only add this line to your .emacs file, there will be errors when you run emacs in the command line mode. Thus, a better solution may be adding the following to you .emacs file:

(if window-system
    (tool-bar-mode -1)
)

so that, tool bar will be hidden only when you run it in GUI. Emacs in command line mode does not seem to have a tool bar.