0

I'm editing python code using emacs, elpy and magit. When starting emacs using the -nw option (from bash and gnome-terminal in gnome 3). When started this way, emacs highlight the indented blocks of code using a black background single character; when using a graphic display (without the -nw option), the same character is a light gray. Please check out the two attached screenshots:

in graphical mode

in terminal

Is there a way to modify the darkness of the face in order make it less prominent?

Tom Fenech
  • 72,334
  • 12
  • 107
  • 141
Lorenzo Trojan
  • 117
  • 1
  • 9
  • I've managed to change the face using the following steps: 1 - place the cursor on the indented block; 2 - `M-x` `costumize-face`; 3 - select the default value (`highlight-indentation-face`); 4 - select `Show all` (the face inherit from `fringes`); 5 - tick `Background`; 6 - `Choose` `gray`; would it be possible to place all this in the `.emacs` file wen elpy is loaded? – Lorenzo Trojan Jul 09 '15 at 09:46

1 Answers1

1

I found a solutions that works. I'm not sure if it's the best one: if anybody knows a better way to do this, please comment!

In short:

  1. Place the cursor on the indented block;
  2. M-x customize-face;
  3. Select the default value (highlight-indentation-face);
  4. Select Show all (the face inherit from fringes);
  5. Tick Background (this will overwrite the fringe background color);
  6. Choose the white color (which is aliased to #e5e5e5)
  7. Press Apply and Save

The last step will write few lines to the ~/.emacs file (on linux) to preserve the customization values. In my system, the lines that were added are:

(custom-set-variables)
(custom-set-faces
  '(highlight-indentation-face ((t (:inherit fringe :background "white")))))
Randy Morris
  • 39,631
  • 8
  • 69
  • 76
Lorenzo Trojan
  • 117
  • 1
  • 9
  • 1
    Looks good to me. A suggestion would be to use the variable `custom-file`, setting it to a different file from your init file (`~/.emacs`). It's good to separate code that you write and manage from code that Customize writes and manages automatically. See the Emacs manual, node [Saving Customizations](http://www.gnu.org/software/emacs/manual/html_node/emacs/Saving-Customizations.html). – Drew Jul 09 '15 at 14:00