all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* whitespace-mode highlighting colour
@ 2021-01-01  9:17 michael-franzese
  2021-01-01  9:26 ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 9+ messages in thread
From: michael-franzese @ 2021-01-01  9:17 UTC (permalink / raw)
  To: Help Gnu Emacs


I am using whitespace-mode to highlight the background of tabs.  How can I change
the background colour because on a dark background, the highlighting contrast to
the dark background is difficult to see at times.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: whitespace-mode highlighting colour
  2021-01-01  9:17 whitespace-mode highlighting colour michael-franzese
@ 2021-01-01  9:26 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-01-01 10:07   ` michael-franzese
  0 siblings, 1 reply; 9+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-01-01  9:26 UTC (permalink / raw)
  To: help-gnu-emacs

michael-franzese wrote:

> I am using whitespace-mode to highlight the background of
> tabs. How can I change the background colour because on
> a dark background, the highlighting contrast to the dark
> background is difficult to see at times.

M-x describe-face RET whitespace- TAB

whitespace-big-indent 	whitespace-empty
whitespace-hspace 	whitespace-indentation
whitespace-line 	whitespace-missing-newline-at-eof
whitespace-newline 	whitespace-space
whitespace-space-after-tab 	whitespace-space-before-tab
whitespace-tab 	whitespace-trailing

(set-face-attribute FACE nil
                    :foreground FG
                    :background BG
                    :weight     BLD
                    ; etc
                  )

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: whitespace-mode highlighting colour
  2021-01-01  9:26 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-01-01 10:07   ` michael-franzese
  2021-01-02  6:22     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-01-04  9:15     ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 2 replies; 9+ messages in thread
From: michael-franzese @ 2021-01-01 10:07 UTC (permalink / raw)
  To: moasenwood; +Cc: help-gnu-emacs

Is there any requires sequence to use with whitespace-mode?
Have done as follows.

(setq whitespace-style
	    '(face tab-mark tabs trailing))
(whitespace-mode 1)
(set-face-attribute whitespace-tab nil
   :foreground "black" :background "#FF5E5E")



> Sent: Friday, January 01, 2021 at 2:56 PM
> From: "Emanuel Berg via Users list for the GNU Emacs text editor" <help-gnu-emacs@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: whitespace-mode highlighting colour
>
> michael-franzese wrote:
>
> > I am using whitespace-mode to highlight the background of
> > tabs. How can I change the background colour because on
> > a dark background, the highlighting contrast to the dark
> > background is difficult to see at times.
>
> M-x describe-face RET whitespace- TAB
>
> whitespace-big-indent 	whitespace-empty
> whitespace-hspace 	whitespace-indentation
> whitespace-line 	whitespace-missing-newline-at-eof
> whitespace-newline 	whitespace-space
> whitespace-space-after-tab 	whitespace-space-before-tab
> whitespace-tab 	whitespace-trailing
>
> (set-face-attribute FACE nil
>                     :foreground FG
>                     :background BG
>                     :weight     BLD
>                     ; etc
>                   )
>
> --
> underground experts united
> http://user.it.uu.se/~embe8573
> https://dataswamp.org/~incal
>
>
>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: whitespace-mode highlighting colour
  2021-01-01 10:07   ` michael-franzese
@ 2021-01-02  6:22     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-01-04  9:15     ` Emanuel Berg via Users list for the GNU Emacs text editor
  1 sibling, 0 replies; 9+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-01-02  6:22 UTC (permalink / raw)
  To: help-gnu-emacs

michael-franzese wrote:

> Is there any requires sequence to use with whitespace-mode?
> Have done as follows.
>
> (setq whitespace-style
> 	    '(face tab-mark tabs trailing))
> (whitespace-mode 1)
> (set-face-attribute whitespace-tab nil
>    :foreground "black" :background "#FF5E5E")

byte-compile to find out:

  In toplevel form:
  geh.el:240:7: Warning: assignment to free variable ‘whitespace-style’
  geh.el:243:21: Warning: reference to free variable ‘whitespace-tab’

just add (require 'whitespace)

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: whitespace-mode highlighting colour
  2021-01-01 10:07   ` michael-franzese
  2021-01-02  6:22     ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-01-04  9:15     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-01-04  9:35       ` michael-franzese
  1 sibling, 1 reply; 9+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-01-04  9:15 UTC (permalink / raw)
  To: help-gnu-emacs

Hm ... what does this mean?

  whitespace-tab is a variable defined in ‘whitespace.el’.
  Its value is ‘whitespace-tab’

    This variable is obsolete since 24.4;
    customize the face `whitespace-tab' instead.

GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.5, cairo version 1.16.0) of 2020-10-23

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: whitespace-mode highlighting colour
  2021-01-04  9:15     ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-01-04  9:35       ` michael-franzese
  2021-01-04 11:27         ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 9+ messages in thread
From: michael-franzese @ 2021-01-04  9:35 UTC (permalink / raw)
  To: moasenwood; +Cc: help-gnu-emacs

I want the highlight tabs and trailing spaces.  You say that the variable is obsolete.
How would be best to tackle the task. 


> Sent: Monday, January 04, 2021 at 2:45 PM
> From: "Emanuel Berg via Users list for the GNU Emacs text editor" <help-gnu-emacs@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: whitespace-mode highlighting colour
>
> Hm ... what does this mean?
> 
>   whitespace-tab is a variable defined in ‘whitespace.el’.
>   Its value is ‘whitespace-tab’
> 
>     This variable is obsolete since 24.4;
>     customize the face `whitespace-tab' instead.
> 
> GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
> 3.24.5, cairo version 1.16.0) of 2020-10-23
> 
> -- 
> underground experts united
> http://user.it.uu.se/~embe8573
> https://dataswamp.org/~incal
> 
> 
>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: whitespace-mode highlighting colour
  2021-01-04  9:35       ` michael-franzese
@ 2021-01-04 11:27         ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-01-04 12:02           ` michael-franzese
  0 siblings, 1 reply; 9+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-01-04 11:27 UTC (permalink / raw)
  To: help-gnu-emacs

michael-franzese wrote:

> I want the highlight tabs and trailing spaces. You say that
> the variable is obsolete.
> How would be best to tackle the task.

I guess it means one should use the face, not the variable.

I do this so I don't have to bother with trailing whitespace or
tabs. Maybe one can configure that in an easier way, because
it feels like a basic thing to do.

(defun untab-all ()
  (unless (member major-mode '(makefile-gmake-mode
                               makefile-mode) ) ; exceptions
    (untabify (point-min) (point-max)))
  nil) ; tell "did not write buffer to disk"

(setq-default tab-width 3)

(setq-default indent-tabs-mode nil)

;; (setq before-save-hook nil)
(defun before-save-hook-f ()
  (untab-all)
  (delete-trailing-whitespace) )
(add-hook 'before-save-hook #'before-save-hook-f)

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: whitespace-mode highlighting colour
  2021-01-04 11:27         ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-01-04 12:02           ` michael-franzese
  2021-01-04 12:10             ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 9+ messages in thread
From: michael-franzese @ 2021-01-04 12:02 UTC (permalink / raw)
  To: moasenwood; +Cc: help-gnu-emacs

I do not want to modify the file, but highlight tabs and trailing spaces.

> Sent: Monday, January 04, 2021 at 4:57 PM
> From: "Emanuel Berg via Users list for the GNU Emacs text editor" <help-gnu-emacs@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: whitespace-mode highlighting colour
>
> michael-franzese wrote:
>
> > I want the highlight tabs and trailing spaces. You say that
> > the variable is obsolete.
> > How would be best to tackle the task.
>
> I guess it means one should use the face, not the variable.
>
> I do this so I don't have to bother with trailing whitespace or
> tabs. Maybe one can configure that in an easier way, because
> it feels like a basic thing to do.
>
> (defun untab-all ()
>   (unless (member major-mode '(makefile-gmake-mode
>                                makefile-mode) ) ; exceptions
>     (untabify (point-min) (point-max)))
>   nil) ; tell "did not write buffer to disk"
>
> (setq-default tab-width 3)
>
> (setq-default indent-tabs-mode nil)
>
> ;; (setq before-save-hook nil)
> (defun before-save-hook-f ()
>   (untab-all)
>   (delete-trailing-whitespace) )
> (add-hook 'before-save-hook #'before-save-hook-f)
>
> --
> underground experts united
> http://user.it.uu.se/~embe8573
> https://dataswamp.org/~incal
>
>
>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: whitespace-mode highlighting colour
  2021-01-04 12:02           ` michael-franzese
@ 2021-01-04 12:10             ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 9+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-01-04 12:10 UTC (permalink / raw)
  To: help-gnu-emacs

michael-franzese wrote:

> I do not want to modify the file, but highlight tabs and
> trailing spaces.

Please do...

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-01-04 12:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-01  9:17 whitespace-mode highlighting colour michael-franzese
2021-01-01  9:26 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-01-01 10:07   ` michael-franzese
2021-01-02  6:22     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-01-04  9:15     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-01-04  9:35       ` michael-franzese
2021-01-04 11:27         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-01-04 12:02           ` michael-franzese
2021-01-04 12:10             ` Emanuel Berg via Users list for the GNU Emacs text editor

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.