DISCLAIMER: With "activities overview" I mean whatever is invoked when pressing the Super key / Windows key.
I'm using Ubuntu 22.04.1 and depending how I start emacs (v27.1, installed using apt), julia-repl either works or does not:
julia-repl works when I start emacs as follows:
- typing
emacs or /usr/bin/emacs or gtk-launch emacs in the terminal (starts emacs in a GUI)
- typing
emacs -nw or /usr/bin/emacs -nw or gtk-launch emacs-term in the terminal (starts emacs inside the terminal)
julia-repl fails when I start emacs as follows:
- clicking the
Emacs (GUI) icon in the activities overview (starts emacs in a GUI)
- clicking the
Emacs (Terminal) icon in the activities overview (starts emacs in a terminal)
Does anybody know what can cause the divergence in behaviour? Here's the content of my /usr/share/applications/emacs.desktop:
[Desktop Entry]
Version=1.0
Name=Emacs (GUI)
GenericName=Text Editor
Comment=GNU Emacs is an extensible, customizable text editor - and more
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
TryExec=/usr/bin/emacs
Exec=/usr/bin/emacs %F
Icon=emacs
Type=Application
Terminal=false
Categories=Utility;Development;TextEditor;
StartupWMClass=Emacs
Keywords=Text;Editor;
And here's a minimal init.el for which the error occurs:
require 'package)
(setq package-archives '(("elpa" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")
("org" . "https://orgmode.org/elpa/")))
(package-initialize)
(unless package-archive-contents (package-refresh-contents))
(require 'use-package)
(setq use-package-always-ensure t)
(require 'julia-mode)
(add-to-list 'load-path "path-of-julia-binary")
(require 'julia-repl)
(add-hook 'julia-mode-hook 'julia-repl-mode) ;; always use minor mode