The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Hot answers tagged

5

The built-in CSS mode should support this just fine by giving indent-tabs-mode a non-nil value. Note that spaces will still be used for padding if the number of indentation spaces isn't a multiple of tab-width. The default values of tab-width and css-indent-offset are 8 and 4 respectively, so you'll need two levels of indentation before a tab is inserted. ...


5

I use TAB to trigger company-mode on demand in cases like that -- it works fine in your CSS example. I also use TAB to indent (tab-always-indent set to complete). You can integrate company with the built-in indent-for-tab-command using the configuration described here: https://github.com/company-mode/company-mode/issues/94#issuecomment-40884387 Here is the ...


4

Via StackOverflow → Setting an Emacs background image, I found https://github.com/wachikun/emacs_bgex which will allow you to set background images. Although it's an indirect method, if you can generate the image with CSS rules then you can now include it in Emacs BGex (i.e. a patched version of Emacs). For the image generating step, there's a tip posted ...


3

You can switch off css-fontify-colors in the customization buffer that opens on M-x customize-option RET css-fontify-colors RET.


3

As of recent versions of company, this is the way to go: (define-key company-mode-map [remap indent-for-tab-command] #'company-indent-or-complete-common)


2

You don't have to create a one-liner. The following list of definitions should create an imenu items: (setq less-imenu-generic-expression '((nil "\\(^@font-face\\)" 1) (nil "\\(^body\\)" 1) (nil "\\(^#foo\\)" 1) (nil "\\(^h[123]\\)" 1) (nil "\\(^\.CheltenhamBT-BoldHeadline\\)" 1) (nil "\\(^.ClarendonText-Bold\\)...


2

In the end the solution that worked for me was to put the entire email in a DIV tag. (add-hook 'org-mime-html-hook (lambda () (goto-char (point-min)) (insert "<div style=\"font-family:Georgia,serif\">") (goto-char (point-max)) (insert "</div>")))


2

It's probably easier to insert your own stylesheet in the head of your HTML mail instead of replacing the default settings: (add-hook 'org-mime-html-hook (lambda () (insert (concat "<head>\n<style>\n" (with-temp-buffer (insert-file-contents (expand-file-name "~/orgmode/...


2

Looks like #+HTML: <section> does the trick. It adds the <section> without wrapping it in <p> tags.


2

M-x customize-group RET css RET would inform you about: C-hv css-fontify-colors css-fontify-colors is a variable defined in `css-mode.el'. Its value is t This variable is safe as a file local variable if its value satisfies the predicate `booleanp'. Documentation: Whether CSS colors should be fontified using the color as the background. When non-`...


1

palette.el provides a color picker that shows such info, but it does not give HSLA or RGBA. eyedropper.el provides some of that functionality, including for older Emacs versions. hexrgb.el provides functions for converting etc., but, again, not for HSLA or RGBA.


1

OK… wasn't aware of rainbow-mode, wich does exactly, what I intended. Of cource I found it after I posted question here ^^. So the solution is: M-x package-install RET rainbow-mode RET To answer my question completely and enable it in all modes: I added (define-globalized-minor-mode global-rainbow-mode rainbow-mode (lambda () (rainbow-mode 1))) ...


1

If you're feeling adventurous, you can try with CSS mode from the current master branch. which-function-mode should show the surrounding media query after this commit.


1

I just committed a fix to CSS mode, so it should hopefully work as you describe out of the box in the next Emacs release. (Or you could always fetch the latest version from the master branch if you don't want to wait for a release.)


1

You could do that by having the css-mode's completion-at-point-functions return an appropriatr :exit-function property which inserts ": ;" and puts point just before the semi-colon (which it's called with a finished status). Maybe a patch along the lines of: diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index 9e36a88..f8ee3ec 100644 -...


1

Actually the comment of @lawlist helped me to figure out that you just need to "rewind" your point, once you changed the style of an element like so: (add-hook 'org-mime-html-hook (lambda () (org-mime-change-element-style "ul.org-ul li" "font-family: Georgia,serif;") (goto-char (point-min)) (org-mime-change-element-style "ol....


Only top voted, non community-wiki answers of a minimum length are eligible