millejoh / emacs-ipython-notebook

Jupyter notebook client in Emacs
http://millejoh.github.io/emacs-ipython-notebook/
GNU General Public License v3.0
1.47k stars 122 forks source link

About colors of `ein:cell-output-area` #556

Closed yefeiyu closed 5 years ago

yefeiyu commented 5 years ago

1, The emacs's background color is white 2, Defined the ein:cell-input-area's background color is white too. 3, Defined the ein:cell-output-area's background color is black. Now 1 and 2 is OK, but 3 can't consistent. If the cursor at the output-area, the ein:cell-output-area's background color is black; when the cursor move to input-area, the ein:cell-output-area's background color become black (this is the emacs's background color).

How to make ein:cell-output-area's background color fixed?

yefeiyu commented 5 years ago

It changes with cursor's position at input or output area to emacs's background color or definated color. How to make it fixed ?

yefeiyu commented 5 years ago

When I set:

'(ein:cell-input-area ((t (:background "white" :foreground "black"))))
 '(ein:cell-output-area ((t (:background "black" :foreground "white"))))

the input area shows normal, but the output-area discoloration with the position of the cursor.

As my test, it is because this two lines in .emacs: '(ein:polymode t)

But If I comment out these two sentences, Auto-completion will fail in ein.

How should I do?

yefeiyu commented 5 years ago

Today, I tried to modify from

(custom-set-variables
'(ein:polymode t)
)

to

(setq ein:polymode t)

The color of output-area correct, But the result of the ipynb got this error after I input C-c C-c:

In [ ]:
print('a')
Python 3.7.3 (default, Mar 27 2019, 16:54:48) 
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> python.el: native completion setup loaded
>>> In [ ]:
                                        ...: print('a')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/charlesthomas/.pyenv/versions/xenv/lib/python3.7/ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "/var/folders/_9/_tq_lwb961n1yv_wwwvsxyg00000gn/T/pyKSrwYH", line 2
    In [ ]:
         ^
SyntaxError: invalid syntax
>>>