Dear Werner, I am most grateful for your help. And I just found that with the option "--no-site-lisp, -nsl", emacs is fine. E. g., daniel@capriolo:~> emacs -nsl test.txt works as expected. Maybe the site-lisp-files are broken? The site-lisp directory came with the new emacs installation, as I deleted /usr/share/emacs before a fresh emacs installation: Just a few minutes ago, I deinstalled emacs, emacs-info, etags and emacs-x11. Then I deleted /usr/share/emacs and rebooted the machine. Then, I installed emacs via zypper. With it came emacs-info, etags, and emacs-x11 (please see post scriptum for the installation log). In response to the other tests you asked for: I agree that the shell is behaving strangely. I use bash and never used anything else. With it, I get the message "emacs is hashed". But when I start bash explicitely, I get a different behaviour than in the "normal" bash: daniel@capriolo:~> echo $SHELL /bin/bash daniel@capriolo:~> ps PID TTY TIME CMD 2213 pts/1 00:00:00 bash 7991 pts/1 00:00:00 ps daniel@capriolo:~> type emacs emacs is hashed (/usr/bin/emacs) daniel@capriolo:~> bash daniel@capriolo:~> type emacs emacs ist /usr/bin/emacs Regarding excecution path: daniel@capriolo:~> echo $PATH /home/daniel/bin:/usr/local/bin:/usr/bin:/bin Here are the X resources around Emacs: daniel@capriolo:~> xrdb -query | grep -i emacs Emacs*Background: #fcfcfc Emacs*Dialog*background: #eff0f1 Emacs*Dialog*foreground: #232627 Emacs*Foreground: #232627 Emacs*XlwScrollBar.Background: #eff0f1 Emacs*XlwScrollBar.Foreground: #232627 Emacs*backgroundToolBarColor: #eff0f1 Emacs*bottomToolBarShadowColor: #eff0f1 Emacs*menubar*background: #eff0f1 Emacs*menubar*foreground: #232627 Emacs*popup*Background: #eff0f1 Emacs*popup*Foreground: #232627 Emacs*toolBarShadowThickness: 0 Emacs*topToolBarShadowColor: #eff0f1 Emacs.default.attributeBackground: #fcfcfc Emacs.default.attributeForeground: #232627 daniel@capriolo:~> ls -l ~/.emacs* ~/.gnu-emacs* -rw-r--r-- 1 daniel users 707 30. Sep 2019 /home/daniel/.gnu-emacs-custom~ /home/daniel/.emacs.d: insgesamt 4 -rw-r--r-- 1 daniel users 631 27. Aug 10:33 early-init.el # Comment: This is the file I listed earlier (your comment: "This does not harm.") daniel@capriolo:~> find ~/.emacs.d/ /home/daniel/.emacs.d/ /home/daniel/.emacs.d/early-init.el daniel@capriolo:~> ls -l ~/Emacs ls: Zugriff auf '/home/daniel/Emacs' nicht möglich: No such file or directory daniel@capriolo:~> rpm -qf /usr/share/emacs/site-lisp/* | sort -u emacs-27.1-342.2.x86_64 Best regards, Daniel -- PS: Here is the log of the installation procedure: capriolo:~ # whoami root capriolo:~ # zypper refresh Repository 'Text editors and hex editors for Linux (openSUSE_Tumbleweed)' is up to date. Repository 'home:FrankyU2' is up to date. Repository 'openSUSE:Factory' is up to date. Repository 'home:adrianSuSE' is up to date. Repository 'openSUSE:Tumbleweed' is up to date. Repository 'packman' is up to date. Repository 'Packman Repository' is up to date. Repository 'repo-debug' is up to date. Repository 'repo-non-oss' is up to date. Repository 'repo-oss' is up to date. Repository 'repo-update' is up to date. All repositories have been refreshed. capriolo:~ # zypper install -r editors emacs Loading repository data... Reading installed packages... Resolving package dependencies... The following 4 NEW packages are going to be installed: emacs emacs-info emacs-x11 etags 4 new packages to install. Overall download size: 27.4 MiB. Already cached: 0 B. After the operation, additional 108.7 MiB will be used. Continue? [y/n/v/...? shows all options] (y): Retrieving package emacs-info-27.1-342.2.noarch (1/4), 4.7 MiB ( 4.6 MiB unpacked) Retrieving: emacs-info-27.1-342.2.noarch.rpm ... [done (3.5 MiB/s)] Retrieving package etags-27.1-342.2.x86_64 (2/4), 174.2 KiB (305.8 KiB unpacked) Retrieving: etags-27.1-342.2.x86_64.rpm ... [done] Retrieving package emacs-27.1-342.2.x86_64 (3/4), 16.7 MiB ( 71.3 MiB unpacked) Retrieving: emacs-27.1-342.2.x86_64.rpm ... [done (3.7 MiB/s)] Retrieving package emacs-x11-27.1-342.2.x86_64 (4/4), 5.7 MiB ( 32.5 MiB unpacked) Retrieving: emacs-x11-27.1-342.2.x86_64.rpm ... [done (4.1 MiB/s)] Checking for file conflicts: ...........................................................................................................[done] (1/4) Installing: emacs-info-27.1-342.2.noarch .........................................................................................[done] (2/4) Installing: etags-27.1-342.2.x86_64 ..............................................................................................[done] (3/4) Installing: emacs-27.1-342.2.x86_64 ..............................................................................................[done] (4/4) Installing: emacs-x11-27.1-342.2.x86_64 ..........................................................................................[done] -- Daniel Schlieper email: daniel.schlieper@tuxomania.net On Thu, 27 Aug 2020, Dr. Werner Fink wrote:
On 2020/08/27 12:13:08 +0200, Daniel Schlieper wrote:
Dear Werner,
many thanks for your kind help. I am now running TW 20200824-0. Also, I deinstalled emacs, rebooted the machine, then installed emacs from editors.
emacs -Q test.txt works fine.
Here is the complete protocol: daniel@capriolo:~> kate test.txt kf.kio.widgets.kdirmodel: protocol mismatch: "" vs "file" daniel@capriolo:~> # Comment: I can open a file with kate
Nevertheless it throws a warning message, OK this is KDE, there is always some nasty messsages at all.
daniel@capriolo:~> emacs test.txt daniel@capriolo:~> # Comment: I cannot open a file with emacs daniel@capriolo:~> bash -x emacs test.txt 2> trace.log no emacs binary found
If you install emacs package you also have to install at least emacs-nox and emacs-x11
daniel@capriolo:~> cat trace.log + : gtk + test gtk = gtk + LC_NUMERIC=POSIX + XLIB_SKIP_ARGB_VISUALS=1 + GDK_RGBA=0 + export LC_NUMERIC XLIB_SKIP_ARGB_VISUALS GDK_RGBA + arg0=emacs + argv=("$@") + test -x emacs-gtk + test -x emacs-x11 + test -x emacs-nox + echo 'no emacs binary found' + exit 1 daniel@capriolo:~> which emacs /usr/bin/emacs
Ah ... some steps missed here ... or you execution path is broken are ypu using bash or zsh or tcsh or any other shell, like ksh or mksh or whatsoever as your SHELL?
daniel@capriolo:~> bash -x /usr/bin/emacs test.txt 2> trace.log daniel@capriolo:~> # Comment: Emacs opens scratch, but not test.txt daniel@capriolo:~> cat trace.log + : gtk + test gtk = gtk + LC_NUMERIC=POSIX + XLIB_SKIP_ARGB_VISUALS=1 + GDK_RGBA=0 + export LC_NUMERIC XLIB_SKIP_ARGB_VISUALS GDK_RGBA + arg0=/usr/bin/emacs + argv=("$@") + test -x /usr/bin/emacs-gtk + set -- /usr/bin/emacs-gtk ++ type -p dbus-daemon + dbusdaemon=/usr/bin/dbus-daemon + test -n /usr/bin/dbus-daemon + test -s /var/lib/dbus/machine-id + read -t1 mid + test -n unix:path=/run/user/1000/bus + for guid in ${DBUS_SESSION_BUS_ADDRESS//,/ } + case "$guid" in + dpid= + for suid in "${HOME}/.dbus/session-bus/"${mid}* + test -e '/home/daniel/.dbus/session-bus/b1eba01c39ff4065abb49f7b4e7c0155*' + break + test -z '' + case ":$DBUS_SESSION_BUS_ADDRESS" in + test -z unix:path=/run/user/1000/bus + unset mid guid suid dadd + test -z unix:path=/run/user/1000/bus + test -S /run/user/1000/bus ++ type -p dbus-update-activation-environment + dbusupdate=/usr/bin/dbus-update-activation-environment ++ systemctl --user is-active dbus.service + dbusstatus=active + test -n /usr/bin/dbus-update-activation-environment -a active '!=' active + unset dbuslaunch dbusdaemon + test -z NO_AT_BRIDGE + unset G_MESSAGES_DEBUG G_DEBUG G_MESSAGES_PREFIXED + exec -a /usr/bin/emacs /usr/bin/emacs-gtk test.txt daniel@capriolo:~> type emacs emacs is hashed (/usr/bin/emacs)
That is not a bash, as this would be
emacs is /usr/bin/emacs
And why it is now in path?
daniel@capriolo:~> locale LANG=de_DE.UTF-8 LC_CTYPE="de_DE.UTF-8" LC_NUMERIC="de_DE.UTF-8" LC_TIME="de_DE.UTF-8" LC_COLLATE="de_DE.UTF-8" LC_MONETARY="de_DE.UTF-8" LC_MESSAGES="de_DE.UTF-8" LC_PAPER="de_DE.UTF-8" LC_NAME="de_DE.UTF-8" LC_ADDRESS="de_DE.UTF-8" LC_TELEPHONE="de_DE.UTF-8" LC_MEASUREMENT="de_DE.UTF-8" LC_IDENTIFICATION="de_DE.UTF-8" LC_ALL=
fine
daniel@capriolo:~> emacs -Q test.txt daniel@capriolo:~> # Comment: all fine: Opens test.txt
If the -Q option results in a OK behaviour, does that mean I have problems with the X resources?
Something is wrong, maybe one of you X resources or one of the emacs packages below your ~/.emacs.d/ of below /usr/share/emacs/site-lisp/
here is my humble init-file: daniel@capriolo:~> cd .emacs.d/ daniel@capriolo:~/.emacs.d> ls early-init.el daniel@capriolo:~/.emacs.d> cat early-init.el (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(delete-selection-mode nil)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(default ((t (:family "Source Code Pro" :foundry "ADBO" :slant normal :weight normal :height 120 :width normal)))))
This does not harm.
Tell me what shell are you using, do you have some aliases and/or shell functionss around emacs. Also show me the X resources
xrdb -query | grep -i emacs
and do you have an Emacs file in your HOME directory? What is below ~/.emacs.d/ and do the files ~/.emacs and ~/.gnu-emacs and their backup/custom variants exist:
ls -l ~/.emacs* ~/.gnu-emacs* find ~/.emacs.d/ ls -l ~/Emacs rpm -qf /usr/share/emacs/site-lisp/* | sort -u
-- "Having a smoking section in a restaurant is like having a peeing section in a swimming pool." -- Edward Burr