How do I use Font Awesome 5 with emacs after changing the default font of emacs? - emacs

Whenever I open a file which contains font awesome 5 icons in it, or I paste a icon into emacs buffer, emacs will freeze forever.
After researching for an afternoon, I found that as long as I don't customize emacs default font (by putting (add-to-list 'default-frame-alist '(font . "NovaMono-12")) in my emacs config file), it will work fine.
Alse, using emacs with -nw flag can display the icons normally too.

Related

How to make minimap run in specified modes?

I installed GNU minimap (version 1.2).
When I open certain type of files , e.g. .py, .c, the minimap comes out as expected.
However, when I open .html file, the minimap is not started.
Is there a way to add additional modes where the minimap automatically shown?
I tried to add hooks to .emacs file but it just starts minimap-mode, but no displaying any minimap.
(add-hook 'html-mode-hook 'minimap-mode)
By default, minimap-mode only works for modes that derive from prog-mode (most modern modes for programming, including python-mode and c-mode). Modify minimap-major-modes if you want to activate it for others, e.g.
(setq minimap-major-modes '(prog-mode html-mode))
or
(add-to-list 'minimap-major-modes 'html-mode)

How do I activate "lisp mode" for cljs files in emacs?

Currently emacs isn't turning on paredit and isn't using any syntax highlighting when I edit .cljs files. It does when I edit .clj files and I want it to treat .cljs similar.
What do I have to do?
If you already have everything working for clojure you can just turn clojure-mode on for the current buffer using
M-x clojure-mode
If you want it turned on automatically you need to add an entry to the Auto Mode AList. In my case, adding the following to init.el did the trick:
(add-to-list 'auto-mode-alist '("\.cljs$" . clojure-mode))
After that you need to reload your init.el (M-x load-file) and re-open the file.

emacs and emacsclient colors

When I started to use emacs as daemon and emacsclient with new frame as interface, all was just fine. But then I wanted to adopt emacsclient for running in urxvt terminal. I’ve installed color-scheme package from my distro’s package manager and added initializing code to my ~/.emacs.d/init.el I switched between various color themes, but then realized that colors are actually depend of color palette of the terminal emacsclient is running in. So I deleted the color-theme package and removed lines related to it from my init.el. But something went wrong and I was left with default black foreground color, totally black cursor (I use only default X cursor which is black arrow outlined white, but what I got was looking almost like this, but totally black) and decreased font-size.
I was digging to fix all that as fast as possible, and started to use
'(default-frame-alist (quote ((menu-bar-lines . 0) (left-fringe . 0) (right-fringe) (tool-bar-lines . 0) (background-color . "#2e3436") (foreground-color . "#d3d7cf") (cursor-color . "#ffffff"))))
This is what appeared in my custom-set-variables of my init.el after I finally hit on an appropriate item crawling the customize menu. However, now I need to specify more and more of things to make them look as in usual emacs (not as deamon, there colors and font are still fine). Then a question appeared: ‘Why before installation of color-theme frames of emacsclient were always inherit the default look of emacs I described through customize menu and saved to init.el?’
Deleted all frame-related stuff from init.el and it works like before now.

emacs 24 ansi-term seems to ignore theme colors

I have upgraded to Emacs 24 from Emacs 23 on OSX using brew. Right now, I'm updating my .emacs to use the new stuff from emacs 24 esp. the new package manager and the built-in color themes. I installed the zenburn theme from marmalade (I think), deleted the old color-theme extension from my extensions directory, and removed my configuration which adds the old color-theme extension to the load path.
One thing I have noticed is that ansi-term colors does not follow the color theme. In emacs 23, my ansi-term looked like this:
But now it looks like this:
I have checked ansi-color-names-vector and ansi-color-map. Both of them reports colors from zenburn. Switching themes still do not change the ansi-term colors, so I think this is not a theme specific problem.
Any ideas how I can fix this problem?
The variable ansi-term-color-vector was not set in the new version of the zenburn-theme. I submitted a pull request to fix it.
In the mean time just use the following line:
(setq ansi-term-color-vector [unspecified "#3f3f3f" "#cc9393" "#7f9f7f" "#f0dfaf" "#8cd0d3" "#dc8cc3" "#93e0e3" "#dcdccc"])
The external color-theme requires no configuration to work well. Just save your color theme using color-theme-print, and insert its output FUNCTION in .emacs, and this one:
(and
(eq window-system 'x)
(color-theme-FUNCTION) )

Scheme in Emacs blows off color scheme

When I edit scheme (.scm) files in Emacs, I seem to lose my chosen color theme. I'm on Ubuntu 11.10; Emacs 23.3.2 GTK+ and here's my relevant .emacs for color theming:
(require 'color-theme)
(eval-after-load "color-theme"
'(progn
(color-theme-initialize)
(setq color-theme-is-global t)
(color-theme-tm)))
The tm theme looks good and is easy on the eyes (warm pastels). But when I load a .scm file, the scheme mode seems to have its own ideas about colors and gives me horrible intense glaring blues and, much worse, glowing red for parens. I can open a .lisp file and it conforms to the tm theme nicely -- as do all other file formats. I've switched over to emacs -nw console with term256 set up ... and that seems to calm down the glow a bit, but in GUI Emacs, it's as if only scheme files throw out the tm theme, throw out even 256 colors to glower viciously at me. Even choosing from GUI Emacs menu choice "Tools/Color Themes" doesn't alter the bad scheme-mode color theme. I also use quack.el, but commented out doesn't seem to influence bad colors. Is this an omen to switch to Haskell?
This problem was caused by the Quack plugin. To fix it, click on the Quack menu and go to Options->Customize. Scroll down to Quack Fontify Style, click on Value Menu, and choose either Extended GNU Emacs Style or Emacs Default. Scroll back up, click "Save for future sessions," and Exit.