How to make minimap run in specified modes? - emacs

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)

Related

How do I use Font Awesome 5 with emacs after changing the default font of 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.

.scss file with emacs web-mode & colorization

I'm using emacs with web modes and other stuff.
I'm updating my .emacs because I'm working with new tools. One of them is Sass. So, I wanna work with my *.scss files without problem and in fact it works cool. But not perfect. Why?
My emacs has:
(setq web-mode-enable-css-colorization t)
And in my css I can see the colors. But in my scss I can't.
How can I activate css-colorization to scss files?
Maybe this could help.
There is a Major mode for editing SCSS files in Emacs:
https://www.emacswiki.org/emacs/ScssMode
I finally did it.
But it was with a work around. So,
I installed the rainbow-mode from Elpa.
Plus, in my .emacs I added:
(add-hook 'web-mode-hook 'rainbow-mode)
Thanks!

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.

LaTeX-mode hooks not loading in emacs (24.3.50) with AUCTeX (11.87.3)

Since I updated to emacs 24 I cannot get AUCTeX to load the LaTeX-mode hooks, e.g.
(add-hook 'LaTeX-mode-hook 'visual-line-mode)
despite:
C-h m tells me that my major mode is Major mode in AUCTeX for editing LaTeX files.
the AUCTeX mode help states:
Entering LaTeX mode calls the value of `text-mode-hook',
then the value of `TeX-mode-hook', and then the value
of `LaTeX-mode-hook'.
(Indeed, the text-mode hooks are not loaded either.)
Hooks for other modes (e.g. for Markdown or Python) do work.
And, of course, I have tested that manual activation, e.g. M-x visual-line-mode, does work.
Thanks!
This is strange C-hm gives me
Entering Latex mode runs the hook text-mode-hook', then
tex-mode-hook', and finally `latex-mode-hook'.
Notice that it is latex-mode-hook and not LaTeX-mode-hook.
EDIT - I do not have auctex installed maybe that explains why the help messages are different for us, ignore the part above. You can try the below as an alternative
(add-hook 'latex-mode-hook 'visual-line-mode)
As is noted in the comments in the other answer, this issue is caused by AucTeX being unable to create XPM images. This occurs when when Emacs is not compiled with the libxpm library, which might be the case when you run Emacs primarily inside your favorite terminal emulator.
Anyways, you can still correct this issue without recompiling Emacs. In fact, the images are only used for the AucTeX toolbar. Thus, disabling it will effectively remove the problem altogether. You can do this by adding:
(unless (image-type-available-p 'xpm)
(setq LaTeX-enable-toolbar nil))
To your .emacs (or .emacs.d/init.el) file.
This snippet simply checks if XPM images are available in the Emacs installation and if not, it disables the toolbar.

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.