Hot answers tagged

4

What you call the bottom bar is the "mode line". I recommend reading the first fews sections of the manual, especially this one to know the names of the various screen elements (this is not difficult at all, but not straightforward for newcomers.) The graphical attributes of text in emacs are grouped in "faces". As mentionned in the manual: By default, ...


4

The problem is that you're trying it out in fundamental-mode. As explained in the docstring of hi-lock-mode: [...] In buffers where Font Lock mode is disabled, patterns are applied using overlays; in this case, the highlighting will not be updated as you type. so in order for the matching to be done as you type, you need to be using font-lock in that ...


3

My use case for this SE is to have a box around region face, so the highlighted region in transient-mark-mode is visible even when the region overlaps with some other overlays: (set-face-attribute 'region nil :box '(:line-width -1 :color "gtk_selection_bg_color" :style nil)) For ...


2

The standard method to do this sort of thing, given that the faces are defined in the font-latex library: (with-eval-after-load 'font-latex (set-face-attribute 'font-latex-italic-face nil :foreground green) (set-face-attribute 'font-latex-math-face nil :foreground orange) (set-face-attribute 'font-latex-script-char-face nil :foreground red) (set-...


2

If you can't put point at the correct place and use C-u C-x =, it might be due to the fact that the relevant element is displayed via an overlay's before/after-string, or because that element disappears/changes when you try to put point in it or when you C-u C-x =. You can try to avoid those problems as follows: use posn-at-x-y which will return a ...


2

You should not try to fontify the buffer yourself. I describe here a method that works in buffers with font-lock activated. Add the keywords with font-lock-add-keywords as long as you need them and remove them afterwards with font-lock-remove-keywords. After such actions you should invalidate the buffer fontification with font-lock-flush. This method has ...


2

The following code puts an overlay with red bold face on the running clock whenever you call org-clock-in. It removes the overlay when you call org-clock-out. I am not entirely sure whether that is the right thing for you since the LOGBOOK drawer is not shown by default. But the code could easily be adapted such that the overlay is put on the heading with ...


2

A glance on org-export--dispatch-ui shows that org-export--dispatch-action is the action right after generating the dispatch buffer. The function org-export--dispatch-action already handles the key-presses for the export options. Therefore you have no other choice than to put the font setting function before org-export--dispatch-action with the help of an ...


2

I think you cannot really delete the faces from the internal face table of the current frame. Maybe I am mistaken in that point because I did not carefully inspect the c-source code. So I would very much appreciate acknowledgement of somebody who knows the Emacs internals better. Gilles is right in his answer that you can change the default faces for newly ...


2

Faces are not held in an obarray. unintern won't help you to delete a face. There's no way to completely delete a face. The best you can do is to “hide” it by removing it from the list of faces that facep tests and face-list enumerates. As you've already found, what defines a face in this respect is being present in face-new-frame-defaults. There is no ...


2

The bold text you see in your test does not use face bold. It uses face Man-overstrike. And (face-bold-p 'Man-overstrike) returns nil. (face-bold-p 'Man-overstrike) evals this: (face-attribute 'Man-overstrike :weight frame inherit), which returns unspecified. Then (memq 'unspecified '(semi-bold bold extra-bold ultra-bold)) returns nil. You need to pass a ...


2

They are displayed in the diredp-omit-file-name face defined in the very same file: (defface diredp-omit-file-name (if (assq :inherit custom-face-attributes) ; Emacs 22+ '((((background dark)) (:inherit diredp-ignored-file-name :strike-through "#555555555555")) ; ~ dark gray (t (:inherit diredp-ignored-file-name :strike-...


1

It seems this issue has affected many users over the years, I implemented this workaround: (defun fc-list () "Genera una lista de tipografías disponibles usando fc-list" (if (executable-find "fc-list") (split-string (shell-command-to-string "fc-list --format='%{family[0]}\n' | sort | uniq") "\n") (progn (warn "fc-list command is not ...


1

Just remove the strike-throughs in lines 3839-3842 of dired+.el, to give (defface diredp-omit-file-name ;; (if (assq :inherit custom-face-attributes) ; Emacs 22+ '((((background dark)) (:inherit diredp-ignored-file-name)) (t (:inherit diredp-ignored-file-name))) Either rename the file or make a note of the change so you're not ...


1

This works for me. (defface pandoc-citation-face '((t :foreground "yellow")) "Face for pandoc citation syntax") (font-lock-add-keywords nil '(("\\[@.+?\\]" 0 'pandoc-citation-face)))


1

Here we are: /* Indices of face attributes in Lisp face vectors. Slot zero is the symbol `face'. */ enum lface_attribute_index { LFACE_FAMILY_INDEX = 1, LFACE_FOUNDRY_INDEX, LFACE_SWIDTH_INDEX, LFACE_HEIGHT_INDEX, LFACE_WEIGHT_INDEX, LFACE_SLANT_INDEX, LFACE_UNDERLINE_INDEX, LFACE_INVERSE_INDEX, LFACE_FOREGROUND_INDEX, ...


1

Here's my attempt with help from @Tobias and @Hubisan. You can toggle the overlay using the toggle-headline-overlay command. You can also edit the headline as usual. BTW this is a proof of concept. Expect some hiccups. (defvar headline-overlay-p nil) (defvar headline-overlay-point nil) (defun edit-headline () (when (and (eq major-mode 'org-mode) ...


1

Barely tested, but try this: (transient-mark-mode 0) (define-minor-mode local-transient-mark-mode "Toggle `transient-mark-mode' (see which) for the current buffer." :variable transient-mark-mode) (make-variable-buffer-local 'transient-mark-mode) (add-hook 'emacs-lisp-mode-hook #'local-transient-mark-mode)


1

Well, this was embarassing. It turned out that putting text properties is way faster than deleting and inserting text. Other answers and suggestions are still welcome though :)


1

Set org-fontify-done-headlines to t and then org-headline-done face to the desired face Non-nil means change the face of a headline if it is marked DONE. Normally, only the TODO/DONE keyword indicates the state of a headline. When this is non-nil, the headline after the keyword is set to the ‘org-headline-done’ as an additional indication. However, ...


1

Replace SOMETHING by 'font-lock-face '(:foreground "red") or 'face '(:foreground "red"). You want font-lock-face when font-locking is active, otherwise property face is correct. Please look at EmacsWiki Text Properties for more explanation.


1

You can use the package multicolumn. It allows you, among else, to resize and reposition a frame so that it contains a number of side-by-side windows. The height of the editing area becomes a multiple of the height of the default font -- which ensures that there is no line clipping (as long as you don't mix fonts with different hights).


1

An alternate solution might be to use a color picker and provide the color value to list-faces-for-color defined below (in case the color picker is a bit off, use the distance argument): (defun list-faces-for-color (color &optional distance) "List faces which use COLOR as fg or bg color. Accept colors within DISTANCE which defaults to 0." ...


1

I had asked the same question on Usenet group fr.comp.applications.emacs on September, 10. I received an answer by "Joseph Girod" on December, 18 which I translate here The documentation of custom-theme-set-face states you have to either add a non-nil argument after the font specification to tell "now", that is, apply the font immediately, or call ...


1

Add (setq frame-background-mode 'dark) to ~/.emacs.d/init.el


1

Line faces are defined in mu4e~headers-line-handler-functions. To change the face conditionally you can set your preferences in mu4e-mailing-list-colors and try the following code (based on the mu4e~headers-line-apply-flag-face function): (defvar mu4e-mailing-list-colors '(("emacs-devel.gnu.org" . "green") ("emacs-orgmode.gnu.org" . "blue"))) (defun ...


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