Open pank opened 1 month ago
That's a tricky question. In principle I'd say the config file should be respected. That said, this file probably includes some "console-dependent" (such as supported image formats) and some "console-independent" settings (such as preferred color schemes), and it's also probably hard to tell the two classes of settings apart from each other.
I don't use an ipython config file, if you could give me some insight on what kind of settings people typically do there it might help with those design questions.
I mostly use it to improve the output of matplotlib_inline
tbh. I am not sure what they are generally used for but there's an introduction.
c = get_config()
c.TerminalInteractiveShell.confirm_exit = False
c.InteractiveShellApp.extensions = ["autoreload"]
c.InteractiveShellApp.exec_lines = ["%autoreload 2"]
c.InlineBackend.figure_formats = {"svg"}
c.InlineBackend.print_figure_kwargs = {'bbox_inches': None}
c.InteractiveShellApp.exec_lines = ["%matplotlib inline"]
Maybe it's fine to just have such config nil by default? Or maybe it's better to point out how to configure ipython in reasonable ways in docstrings and the README?
For my use case, I think asking the user to configure IPython would make things harder:
comint-mime
, I'd have to make a complex config file that detects whether IPython is running in Emacs.comint-mime
+ tramp
works excellent together – even to servers where I haven't pulled down my dotfiles. If this setting injection is removed from comint-mime
, I'll have to start syncing my dotfiles to all servers to retain the SVG plot feature remotely. Part of the reason I like tramp
is that it works well even for remotes that I haven't configured.My opinion would therefore be that it's perhaps better to keep the current default, where the setting is nil
by default but injects some IPython config if the user turns it on?
If
comint-mime-prefer-svg
is non-nil, the ipython config might be overwritten (e.g.~/.ipython/profile_default/ipython_config.py
). Is it desirable for emacs to configure ipython? I guess it maybe is, since most other ipython consoles are "smarter" than emacs these days (e.g. the qtconsole) so maybe you want to reserveipython_config.py
for those? On the other hand, I would find it confusing if my ipython settings are "overwritten" via comint-mime.Maybe it's fine to just have such config nil by default?
Or maybe it's better to point out how to configure ipython in reasonable ways in docstrings and the README?