You are not logged in.

#1 2020-09-16 13:59:05

dsh
Member
Registered: 2020-09-16
Posts: 3

emacs - help with reproducing reported emacs bug #43363

After recent emacs update to v27.1 I've detected a bug and reported it.
One fine gentleman, Eli, tried to help me... but he say that he wasn't able to reproduce the bug.

Now, I'm trying to find out if the bug is somehow Arch related, considering I have detected it on my computer that has Arch Linux installed (with i3wm).
This would help me to know if I should expand or constrict my search for the cause of this buggy behavior.
Thus, I'm interested if other Arch users can reproduce this. (goto TL;DR)

Full bug report (with some pictures big_smile) can be found here
And the excerpt from that report:

Expected behavior:
When a single line comment that is wrapped gets selected (or when cursor is
positioned on that line) text color should be the one defined with the
emacs color theme.

Detected behavior:
Instead of expected behavior text is colored partially as a comment and
partially as a regular text.

REPRODUCING THE BUG:
1. Start emacs with "emacs -Q"
2. Type a comment with Cyrillic text that is really long so it could wrap
(through multiple "rows")
3. Select the text and comment should be displayed with multiple colors,
described in "Detected behavior".

Sample text used for lisp-mode:

First comment
;; Ово је пример текста на ћирилици. Користим emacs 27.1 верзију и имам проблем са бојом текста у коментару који се простире на више редова, али припада истој линији (wrapped) исписом. Дакле, један део коментара добија боју регуларног текста а остатак коментара добија боју предвиђену за боју коментара. Промена боје настаје када се коментар селектује... Мислим да је ово довољно текста у коментару да би се тестирало понашање. САВ ОВАЈ ТЕКСТ ЈЕ У ЈЕДНОЈ ЛИНИЈИ... Ово је пример текста на ћирилици. Користим emacs 27.1 верзију и имам проблем са бојом текста у коментару који се простире на више редова, али припада истој линији (wrapped) исписом. Дакле, један део коментара добија боју регуларног текста а остатак коментара добија боју предвиђену за боју коментара. Промена боје настаје када се коментар селектује... Мислим да је ово довољно текста у коментару да би се тестирало понашање. САВ ОВАЈ ТЕКСТ ЈЕ У ЈЕДНОЈ ЛИНИЈИ
Second comment
;; Ово је пример текста на ћирилици. Користим emacs 27.1 верзију и имам проблем са бојом текста у коментару који се простире на више редова, али припада истој линији (wrapped) исписом. Дакле, један део коментара добија боју регуларног текста а остатак коментара добија боју предвиђену за боју коментара. Промена боје настаје када се коментар селектује... Мислим да је ово довољно текста у коментару да би се тестирало понашање. САВ ОВАЈ ТЕКСТ ЈЕ У ЈЕДНОЈ ЛИНИЈИ... Ово је пример текста на ћирилици. Користим emacs 27.1 верзију и имам проблем са бојом текста у коментару који се простире на више редова, али припада истој линији (wrapped) исписом. Дакле, један део коментара добија боју регуларног текста а остатак коментара добија боју предвиђену за боју коментара. Промена боје настаје када се коментар селектује... Мислим да је ово довољно текста у коментару да би се тестирало понашање. САВ ОВАЈ ТЕКСТ ЈЕ У ЈЕДНОЈ ЛИНИЈИ

(well, I've added a bit more text to the Cyrillic comment so that the issue would be more apparent)

TL;DR

  1. Start emacs with

    emacs -Q
  2. you should now be in the scratch buffer that has lisp mode on, so paste this

    First comment
    ;; Ово је пример текста на ћирилици. Користим emacs 27.1 верзију и имам проблем са бојом текста у коментару који се простире на више редова, али припада истој линији (wrapped) исписом. Дакле, један део коментара добија боју регуларног текста а остатак коментара добија боју предвиђену за боју коментара. Промена боје настаје када се коментар селектује... Мислим да је ово довољно текста у коментару да би се тестирало понашање. САВ ОВАЈ ТЕКСТ ЈЕ У ЈЕДНОЈ ЛИНИЈИ... Ово је пример текста на ћирилици. Користим emacs 27.1 верзију и имам проблем са бојом текста у коментару који се простире на више редова, али припада истој линији (wrapped) исписом. Дакле, један део коментара добија боју регуларног текста а остатак коментара добија боју предвиђену за боју коментара. Промена боје настаје када се коментар селектује... Мислим да је ово довољно текста у коментару да би се тестирало понашање. САВ ОВАЈ ТЕКСТ ЈЕ У ЈЕДНОЈ ЛИНИЈИ
    Second comment
    ;; Ово је пример текста на ћирилици. Користим emacs 27.1 верзију и имам проблем са бојом текста у коментару који се простире на више редова, али припада истој линији (wrapped) исписом. Дакле, један део коментара добија боју регуларног текста а остатак коментара добија боју предвиђену за боју коментара. Промена боје настаје када се коментар селектује... Мислим да је ово довољно текста у коментару да би се тестирало понашање. САВ ОВАЈ ТЕКСТ ЈЕ У ЈЕДНОЈ ЛИНИЈИ... Ово је пример текста на ћирилици. Користим emacs 27.1 верзију и имам проблем са бојом текста у коментару који се простире на више редова, али припада истој линији (wrapped) исписом. Дакле, један део коментара добија боју регуларног текста а остатак коментара добија боју предвиђену за боју коментара. Промена боје настаје када се коментар селектује... Мислим да је ово довољно текста у коментару да би се тестирало понашање. САВ ОВАЈ ТЕКСТ ЈЕ У ЈЕДНОЈ ЛИНИЈИ
  3. make sure the text is wrapped, (M-x visual-line-mode) should be enabled

  4. select the text and see if the comment is displayed with same color or not. Something like this

  5. let me know what happens

Thank you.

Offline

#2 2020-09-17 11:12:22

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: emacs - help with reproducing reported emacs bug #43363

Same color for comment and text here, but I use emacs-git from AUR.

Edit: Wait: Do you meen different colors between Comments and cyrillic texts? or in between the cyrillic text? I now see different colors in the cyrillic text. Strangely, if I press C-x 3 and view the same contents of *scratch* buffer in the newly created scratch buffer, the problem vanishes in this second buffer.

Last edited by Stefan Husmann (2020-09-17 11:27:39)

Offline

#3 2020-09-17 11:25:52

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 1,973
Website

Re: emacs - help with reproducing reported emacs bug #43363

I cannot reproduce the error with emacs 27.1 from the official repos either.
https://home.richard-neumann.de/Bildsch … %3A22.webm

Update:
I can partially reproduce the error when there is an unsual UTF-8 character instead of the space.
In the example it's a no-break-space (UTF-8 0xc2a0) between истој and линији:
https://home.richard-neumann.de/Bildsch … -36-11.png

Last edited by schard (2020-09-17 11:38:14)


macro_rules! yolo { { $($tokens:tt)* } => { unsafe { $($tokens)* } }; }

Offline

#4 2020-09-17 18:00:49

dsh
Member
Registered: 2020-09-16
Posts: 3

Re: emacs - help with reproducing reported emacs bug #43363

@Stefan Husmann
Yes, if I understand you correctly, I think you see the issue I was talking about. And when I split the window (C-x 3) I get the same result as you do. Thanks!
Different color is between characters within the same comment (when that comment gets selected). Comment is in one long line that gets wrapped (with visual-line mode) and is written with Cyrillic letters.
Hopefully this image shows the issue better than I explained it.

@schard
Yes! That's excellent, that is the issue I was referring to! Thank you so much for the visual!
Btw, I'm not sure if you're wrapping words with M-x visual-line-mode... for me, the issue gets even more apparent if I use M-x visual-line-mode... that is, if I go to Options > Line wrapping in this buffer > Word wrap (visual line mode)


If anyone else tries to find the issue, please let me know.

Offline

#5 2020-09-18 23:20:06

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: emacs - help with reproducing reported emacs bug #43363

It seems this is theme dependent. With "Immaterial light" theme set, the problem seems to go away either.

Offline

#6 2020-09-19 11:01:46

dsh
Member
Registered: 2020-09-16
Posts: 3

Re: emacs - help with reproducing reported emacs bug #43363

Stefan Husmann wrote:

It seems this is theme dependent. With "Immaterial light" theme set, the problem seems to go away either.

Even with the suggested theme I can still reproduce the issue.
Also, I've already tried a lot of different themes and the problem was always present... thanks for the effort.
Btw. what desktop environment are you using?

Offline

#7 2020-09-19 14:41:59

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: emacs - help with reproducing reported emacs bug #43363

No desktop environment, just bspwm.

Offline

Board footer

Powered by FluxBB