unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#42110: Whitespace Newline Face Doesn't Disappear
@ 2020-06-28 15:37 Robin via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-06-28 16:28 ` Basil L. Contovounesios
  0 siblings, 1 reply; 5+ messages in thread
From: Robin via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-06-28 15:37 UTC (permalink / raw)
  To: 42110

[-- Attachment #1: Type: text/plain, Size: 7145 bytes --]

From: Robin Choudhury <robin_choudhury1@protonmail.com>
To: bug-gnu-emacs@gnu.org
Subject: 26.3; Whitespace Newline Face Doesn't Disappear
-----

When typing at the bottom of a document, a newline is inserted. An
additional newline is then inserted. Upon insertion, a face higlights
the first newline's emptiness. Typing in the second newline should make
this face disappear. However, it remains.

The whitespace configuration (13.2.2):
(use-package whitespace
:ensure t
:init
(setq prelude-whitespace nil)
(setq whitespace-line-column 80)
;; Highlight trailing whitespace
(setq whitespace-style
;; There's a bug in empty where the face doesn't go away after
;; typing below the newline.
'(face trailing lines-tail indentation::space tab-mark empty))
:config
(global-whitespace-mode t))

-----

In GNU Emacs 26.3 (build 1, x86_64-apple-darwin19.5.0, NS appkit-1894.50 Version 10.15.5 (Build 19F101))
of 2020-06-27 built on jupiter.local
Windowing system distributor 'Apple', version 10.3.1894
Recent messages:
Checking for load-path shadows...done
Auto-saving...done
Saving file /Users/robin/*message*-20200628-083045...
Wrote /Users/robin/*message*-20200628-083045
Auto-saving...done
Quit [2 times]
Mark saved where search started [2 times]
Saving file /Users/robin/*message*-20200628-083045...
Wrote /Users/robin/*message*-20200628-083045
Mark saved where search started [2 times]

Configured using:
'configure --disable-dependency-tracking --disable-silent-rules
--enable-locallisppath=/usr/local/share/emacs/site-lisp
--infodir=/usr/local/Cellar/emacs-plus@26/26.3/share/info/emacs
--prefix=/usr/local/Cellar/emacs-plus@26/26.3 --with-xml2 --with-gnutls
--with-imagemagick --with-modules --with-rsvg --with-ns
--disable-ns-self-contained'

Configured features:
JPEG RSVG IMAGEMAGICK GLIB NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS NS MODULES THREADS LCMS2

Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix

Major mode: Help

Minor modes in effect:
projectile-mode: t
doom-modeline-mode: t
helm-mode: t
helm--remap-mouse-mode: t
evil-leader-mode: t
global-magit-file-mode: t
diff-auto-refine-mode: t
magit-auto-revert-mode: t
global-git-commit-mode: t
async-bytecomp-package-mode: t
global-undo-tree-mode: t
undo-tree-mode: t
shell-dirtrack-mode: t
evil-mode: t
evil-local-mode: t
global-whitespace-mode: t
show-paren-mode: t
mode-icons-mode: t
global-hl-line-mode: t
global-hl-todo-mode: t
display-time-mode: t
global-linum-mode: t
linum-mode: t
override-global-mode: t
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
buffer-read-only: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t

Load-path shadows:
None found.

Features:
(misearch multi-isearch pp shadow sort mail-extr emacsbug sendmail
winner helm-command helm-elisp helm-eval edebug helm-info face-remap
org-rmail org-mhe org-irc org-info org-gnus nnir gnus-sum gnus-group
gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls
utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range gnus-win gnus
nnheader wid-edit org-docview doc-view jka-compr image-mode org-bibtex
bibtex org-bbdb org-w3m vc-git vc-bzr vc-src vc-sccs vc-svn vc-cvs
vc-rcs vc vc-dispatcher project ido projectile grep compile ibuf-ext
ibuffer ibuffer-loaddefs rainbow-delimiters elec-pair doom-modeline
doom-modeline-segments doom-modeline-env doom-modeline-core shrink-path
rx f s all-the-icons all-the-icons-faces data-material data-weathericons
data-octicons data-fileicons data-faicons data-alltheicons memoize
exec-path-from-shell diminish helm-mode helm-files helm-buffers
helm-occur helm-tags helm-locate helm-grep helm-regexp helm-utils
helm-help helm-types helm helm-source eieio-compat helm-multi-match
helm-lib org-bullets org-element avl-tree generator org org-macro
org-footnote org-pcomplete org-list org-faces org-entities noutline
outline org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob
ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs
org-loaddefs find-func cal-menu calendar cal-loaddefs evil-leader
evil-magit magit-submodule magit-obsolete magit-blame magit-stash
magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone
magit-remote magit-commit magit-sequence magit-notes magit-worktree
magit-tag magit-merge magit-branch magit-reset magit-files magit-refs
magit-status magit magit-repos magit-apply magit-wip magit-log
which-func imenu magit-diff smerge-mode diff-mode magit-core
magit-autorevert autorevert filenotify magit-margin magit-transient
magit-process magit-mode git-commit transient magit-git magit-section
magit-utils crm log-edit message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec epa derived epg gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils
mailheader pcvs-util add-log with-editor async-bytecomp async server
subr-x dash evil evil-keybindings evil-integration undo-tree diff
evil-maps evil-commands reveal flyspell ispell evil-jumps
evil-command-window evil-types evil-search evil-ex shell pcomplete
comint ansi-color evil-macros evil-repeat evil-states evil-core
evil-common windmove thingatpt rect evil-digraphs evil-vars ring edmacro
kmacro doom-oceanic-next-theme doom-themes doom-themes-base disp-table
whitespace paren time-date warnings mode-icons advice color hl-line
hl-todo cl-extra help-mode time linum use-package use-package-ensure
use-package-delight use-package-diminish use-package-bind-key bind-key
easy-mmode use-package-core finder-inf info package easymenu epg-config
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win
ucs-normalize mule-util term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads kqueue cocoa ns lcms2 multi-tty make-network-process
emacs)

Memory information:
((conses 16 738153 45480)
(symbols 48 51716 2)
(miscs 40 668 440)
(strings 32 190321 8761)
(string-bytes 1 5406976)
(vectors 16 84206)
(vector-slots 8 1287169 41462)
(floats 8 980 400)
(intervals 56 2014 1003)
(buffers 992 20))

[-- Attachment #2: Type: text/html, Size: 10208 bytes --]

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

* bug#42110: Whitespace Newline Face Doesn't Disappear
  2020-06-28 15:37 bug#42110: Whitespace Newline Face Doesn't Disappear Robin via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-06-28 16:28 ` Basil L. Contovounesios
       [not found]   ` <6DSVEaDOI_Q9I_GH8R12lTvRDtbDQ2-4su3haR_jnJeCf6nQ_xCHD0aXRdfwezFBOxGGpwpnfIUdXT-J8_5K_3T9ntDxRQKjFuRfxn9Lkso=@protonmail.com>
  2020-06-28 18:08   ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 5+ messages in thread
From: Basil L. Contovounesios @ 2020-06-28 16:28 UTC (permalink / raw)
  To: 42110; +Cc: Robin, Reuben Thomas

found 37467 25.3
forcemerge 37467 42110
quit

> From: Robin Choudhury <robin_choudhury1@protonmail.com>
> To: bug-gnu-emacs@gnu.org
> Subject: 26.3; Whitespace Newline Face Doesn't Disappear
> -----
>
> When typing at the bottom of a document, a newline is inserted. An
> additional newline is then inserted. Upon insertion, a face higlights
> the first newline's emptiness. Typing in the second newline should make
> this face disappear. However, it remains.

Thanks, I can reproduce this in Emacs versions 25.3-28 inclusive, but
not in 24.5.  I think this is a duplicate of bug#37467, and sounds like
it might be related/due to bug#24745; CCing Reuben.

Some minor notes on your configuration:

> The whitespace configuration (13.2.2):
> (use-package whitespace
>   :ensure t
    ^^^^^^^^^
No need for this, lisp/whitespace.el is built-in.

>   :init
>   (setq prelude-whitespace nil)
>   (setq whitespace-line-column 80)
>   ;; Highlight trailing whitespace
>   (setq whitespace-style
>         ;; There's a bug in empty where the face doesn't go away after
>         ;; typing below the newline.
>         '(face trailing lines-tail indentation::space tab-mark empty))
>   :config
>   (global-whitespace-mode t))
                           ^^^
No well behaved mode function documents t as a valid argument for
enabling it.  Instead, you should write one of the following or
equivalent:

  (global-whitespace-mode)
  (global-whitespace-mode 1)

Here's a simpler reproduction recipe:

0. emacs -Q
1. C-o
2. (progn (setq whitespace-style '(face empty))
          (whitespace-mode))
3. C-x C-e
4. C-m C-m
5. asd

Expected: the yellow highlight on the empty line 6 disappears, since
line 6 is not at EOB any longer.

Observed: the empty line 6 is still highlighted with the
whitespace-empty face.

Thanks,

-- 
Basil





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

* bug#42110: Whitespace Newline Face Doesn't Disappear
       [not found]   ` <6DSVEaDOI_Q9I_GH8R12lTvRDtbDQ2-4su3haR_jnJeCf6nQ_xCHD0aXRdfwezFBOxGGpwpnfIUdXT-J8_5K_3T9ntDxRQKjFuRfxn9Lkso=@protonmail.com>
@ 2020-06-28 17:21     ` Basil L. Contovounesios
  0 siblings, 0 replies; 5+ messages in thread
From: Basil L. Contovounesios @ 2020-06-28 17:21 UTC (permalink / raw)
  To: Robin; +Cc: 42110

Robin <robin_choudhury1@protonmail.com> writes:

>> 0. emacs -Q
>> 1. C-o
>> 2. (progn (setq whitespace-style '(face empty))
>>           (whitespace-mode))
>> 3. C-x C-e
>> 4. C-m C-m
>> 5. asd
>
> I was able to reproduce it (screenshot attached).

Thanks for confirming.

[ In general, please keep the bug address <42110@debbugs.gnu.org> CCed
  (e.g. via "Reply to All") so that all relevant parts of the discussion
  are archived by the bug tracker.  Thanks.  ]

-- 
Basil





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

* bug#42110: Whitespace Newline Face Doesn't Disappear
  2020-06-28 16:28 ` Basil L. Contovounesios
       [not found]   ` <6DSVEaDOI_Q9I_GH8R12lTvRDtbDQ2-4su3haR_jnJeCf6nQ_xCHD0aXRdfwezFBOxGGpwpnfIUdXT-J8_5K_3T9ntDxRQKjFuRfxn9Lkso=@protonmail.com>
@ 2020-06-28 18:08   ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 0 replies; 5+ messages in thread
From: Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-06-28 18:08 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: Robin, 42110

[-- Attachment #1: Type: text/plain, Size: 1236 bytes --]

On Sun, 28 Jun 2020 at 17:28, Basil L. Contovounesios <contovob@tcd.ie>
wrote:

> found 37467 25.3
> forcemerge 37467 42110
> quit
>
> > From: Robin Choudhury <robin_choudhury1@protonmail.com>
> > To: bug-gnu-emacs@gnu.org
> > Subject: 26.3; Whitespace Newline Face Doesn't Disappear
> > -----
> >
> > When typing at the bottom of a document, a newline is inserted. An
> > additional newline is then inserted. Upon insertion, a face higlights
> > the first newline's emptiness. Typing in the second newline should make
> > this face disappear. However, it remains.
>
> Thanks, I can reproduce this in Emacs versions 25.3-28 inclusive, but
> not in 24.5.  I think this is a duplicate of bug#37467, and sounds like
> it might be related/due to bug#24745; CCing Reuben.
>

Sorry, I had a look at this and can see how it is related to the bug I
fixed, but can't see how, before the fix, the unhighlighting would have
happened, i.e. how space highlighted at the end of the document would have
been unhighlighted after inserting characters at EOB.

I suppose that would be the logic in the function
whitespace-empty-at-eob-regexp? I don't understand how regions are
un-highlighted in this mode/in font-lock, though.

-- 
https://rrt.sc3d.org

[-- Attachment #2: Type: text/html, Size: 2200 bytes --]

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

* bug#42110: Whitespace Newline Face Doesn't Disappear
  2022-06-29 21:28 ` bug#37467: [PATCH] whitespace: Redo BoB/EoB empty line highlighting Richard Hansen
@ 2022-09-11 11:46   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-11 11:46 UTC (permalink / raw)
  To: Richard Hansen; +Cc: 37467, 42110

Richard Hansen <rhansen@rhansen.org> writes:

> The attached patch series should fix this bug.

Thanks.  I've now tested the patch series, and it seems to fix the
reported problems, so I've now pushed it to Emacs 29.





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

end of thread, other threads:[~2022-09-11 11:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-28 15:37 bug#42110: Whitespace Newline Face Doesn't Disappear Robin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-06-28 16:28 ` Basil L. Contovounesios
     [not found]   ` <6DSVEaDOI_Q9I_GH8R12lTvRDtbDQ2-4su3haR_jnJeCf6nQ_xCHD0aXRdfwezFBOxGGpwpnfIUdXT-J8_5K_3T9ntDxRQKjFuRfxn9Lkso=@protonmail.com>
2020-06-28 17:21     ` Basil L. Contovounesios
2020-06-28 18:08   ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
  -- strict thread matches above, loose matches on Subject: below --
2019-09-20  5:30 bug#37467: 26.3; whitespace-mode doesn't update BOB/EOB highlights Dale Sedivec
2022-06-29 21:28 ` bug#37467: [PATCH] whitespace: Redo BoB/EoB empty line highlighting Richard Hansen
2022-09-11 11:46   ` bug#42110: Whitespace Newline Face Doesn't Disappear Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).