syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.65k stars 4.89k forks source link

space-doc-mode appears to render _some_ TITLE blocks of the README docs with strangely elided characters #11930

Closed qizwiz closed 4 years ago

qizwiz commented 5 years ago

Description

The correct version below I got by toggling space-doc-mode with , T V. I tried to troubleshoot this myself to no avail. I believe the problem lies somewhere in the spacemacs-space-doc-modificators-functions but so far I haven't been able to manually reproduce this by running those decorators separately. Intuition suggests that it's in spacemacs//space-doc-alternative-tags-look because of it's call to spacemacs//space-doc-font-lock-fontify-region-function. But again, I haven't been able to prove that.

Reproduction guide

Observed behaviour: The TITLE block looks like this: screenshot from 2019-01-31 10-19-02

or this: screenshot from 2019-01-31 14-39-08

Expected behaviour: It should look like this:

screenshot from 2019-02-01 10-11-28

System Info :computer:

duianto commented 5 years ago

Update: It's now reproducible in Ubuntu, see comment below

Original post I'm unable to reproduce the issue. The expected result is shown in:

With both:

dotspacemacs-pretty-docs is a variable defined in ‘core-dotspacemacs.el’. Its value is t

SPC h l erlang RET

virtualboxvm_2019-02-03_12-35-51

SPC h l emacs-lisp RET

virtualboxvm_2019-02-03_12-39-25

System Info :computer:

System Info :computer:

qizwiz commented 5 years ago

I've noticed a couple of more things.

1) If the file is opened from a dired buffer or find-file (with and without helm), you have to open it twice to see the eliding effect demonstrated above. Thereafter it always does it. 2) If the file is opened from SPC h l (helm-spacemacs-help-layers), then you never get the eliding effect

I know it hasn't been reproduced by anyone else here yet, but maybe those observations will help in troubleshooting. I can reliably reproduce this on my work linux box AND my personal macbook pro.

My theory is that somewhere in the find-file chain of events, space-doc-mode is getting called twice with all the spacemacs-space-doc-modificators-functions. I think this would explain why I can't reproduce it with edebug. helm-spacemacs-help-layers seems to follow a different path, but I haven't had the time to fully document the differences yet.

duianto commented 5 years ago

Confirmed in Ubuntu 18.04.1 (as a virtualbox client), when opening: ~/.emacs.d/layers/+lang/erlang/README.org from either a Dired (SPC a d) buffer or SPC f f (it happens the first and subsequent times, it didn't require opening it twice).

virtualboxvm_2019-02-14_19-46-36

When readme.org is opened then it first shows it correctly for a split second before the letters disappear.

The mode line shows Org major mode in both Windows and Ubuntu,

But in Ubuntu it shows three extra minor modes ViewIndSD.This is the description when the mouse pointer is moved over the minor mode indicators:

Pressing SPC m shows:

SPC m is undefined

Calling M-x space-doc-mode RET shows all the letters in the title, until the buffer is closed and reopened.

The issue still doesn't occur in Windows 10 1803, when opening with Dired or find files. SPC m works, it opens the which-key popup Major mode commands.

System Info :computer:

github-actions[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!