pages tagged key_binding http://meng6net.localhost/tag/key_binding/ <p><small>Copyright © 2005-2020 by <code>Meng Lu &lt;lumeng3@gmail.com&gt;</code></small></p> Meng Lu's home page ikiwiki Tue, 16 May 2017 23:59:39 +0000 How to switch font and theme in Emacs http://meng6net.localhost/blog/switch_emacs_font_theme/ http://meng6net.localhost/blog/switch_emacs_font_theme/ computing emacs font key binding theme Tue, 16 May 2017 23:59:39 +0000 2017-05-16T23:59:39Z <p>In my <code>.emacs</code>, I set "Source Code Pro" as my default font and <code>solarized-dark</code> as my default theme. But occasionally, I'd like to switch the theme and font in the current Emacs frame. After some Internet research, I find the commands to do this:</p> <ul> <li>to swith theme to <code>solarized-light</code>, do</li> </ul> <p><kbd>M</kbd>-<kbd>x</kbd>, <code>load-theme</code>, <kbd>Enter</kbd>, <code>solarized-light</code></p> <p>In Emacs 24+, one can also interactively set font using mouse by</p> <p><kbd>M</kbd>-<kbd>x</kbd>, <code>mouse-set-font</code>, and selecting font faimily, typeface, size in the Fonts pop-up window.</p> <ul> <li>to swith font, do</li> </ul> <p><kbd>M</kbd>-<kbd>x</kbd>, <code>set-frame-font</code>, <kbd>Enter</kbd>, <kbd>Space</kbd> (trigger auto-completition to look for candidates, and use <kbd>Up</kbd>, <kbd>Down</kbd> to switch font), <kbd>Enter</kbd></p> <h2>References</h2> <ul> <li><a href= "https://www.gnu.org/software/emacs/manual/html_node/emacs/Modifying-Fontsets.html"> <em>GNU Emacs manual, 22.16 Modifying Fontsets</em></a></li> <li><a href= "https://www.gnu.org/software/emacs/manual/html_node/emacs/Defining-Fontsets.html#Defining-Fontsets"> <em>GNU Emacs manual, 22.15 Defining fontsets</em></a></li> <li><a href= "http://www.emacswiki.org/emacs/FontSets"><em>EmacsWiki, Font Sets</em></a></li> </ul> /blog/switch_emacs_font_theme/#comments