From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jonas Bernoulli Newsgroups: gmane.emacs.bugs Subject: bug#58073: 29.0.50; Uninstalled emacs sends startup messages to stderr Date: Sun, 25 Sep 2022 20:30:05 +0200 Message-ID: <87mtanmhn6.fsf@bernoul.li> References: <87pmfjmqnt.fsf@bernoul.li> <83tu4vl9wr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20606"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58073@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 25 20:31:34 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ocWPe-0005Cx-PT for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Sep 2022 20:31:34 +0200 Original-Received: from localhost ([::1]:56882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ocWPc-0007Rk-VR for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Sep 2022 14:31:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37354) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocWPA-0007RW-VZ for bug-gnu-emacs@gnu.org; Sun, 25 Sep 2022 14:31:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49443) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ocWP8-0007au-OO for bug-gnu-emacs@gnu.org; Sun, 25 Sep 2022 14:31:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ocWP8-0001Dj-9t for bug-gnu-emacs@gnu.org; Sun, 25 Sep 2022 14:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jonas Bernoulli Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Sep 2022 18:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58073 X-GNU-PR-Package: emacs Original-Received: via spool by 58073-submit@debbugs.gnu.org id=B58073.16641306134613 (code B ref 58073); Sun, 25 Sep 2022 18:31:02 +0000 Original-Received: (at 58073) by debbugs.gnu.org; 25 Sep 2022 18:30:13 +0000 Original-Received: from localhost ([127.0.0.1]:48521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ocWOK-0001CK-SJ for submit@debbugs.gnu.org; Sun, 25 Sep 2022 14:30:13 -0400 Original-Received: from mail.hostpark.net ([212.243.197.30]:57348) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ocWOG-0001C7-K7 for 58073@debbugs.gnu.org; Sun, 25 Sep 2022 14:30:11 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id 5174A163CB; Sun, 25 Sep 2022 20:30:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bernoul.li; h= content-type:content-type:mime-version:message-id:date:date :references:in-reply-to:subject:subject:from:from:received :received; s=sel2011a; t=1664130606; bh=CBoSFnNDj0XpzvGdaOXIDP5P 7kA4t/I2ebUsEsIpMwo=; b=zPRJPvvIKFqWnum1MH7wLhR30OZ1ktN56oI7yn/r AlpIweaaUlivL2mnWQnl6xr8Y/Q8sxZpXeGkzqQKc7meveaVBne6hzCjLSQxM3pg FTCbbGAI6z8+Za+4qPDM0TUv5SmRYITb6zKxcmgGwYLUIN9N6q0bjoyMYjOfBT9e JDA= X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Original-Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail1.hostpark.net [127.0.0.1]) (amavisd-new, port 10224) with ESMTP id 6rcVTkdqC_Zc; Sun, 25 Sep 2022 20:30:06 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id 1BE9116483; Sun, 25 Sep 2022 20:30:06 +0200 (CEST) In-Reply-To: <83tu4vl9wr.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:243610 Archived-At: >> Due to reasons that aren't important here, I recently had to replace the >> symlink with a wrapper script, and that resulted in these messages being >> send to stderr. I was very wrong about that not being important here. Installing emacs using guix sets EMACSLOADPATH in a file that is sourced by the shells startup file. To me it looks like they are abusing this variable; it makes it impossible to use an emacs that wasn't installed using guix, without something to counter their modification. I did that with a wrapper script. The value that is set somewhere in the shell's init files is something like "/home/jonas/.guix-home/profile/share/emacs/site-lisp". It doesn't contain an empty element, which would "stand for the default value of `load-path'", according to (info "(emacs)General Variables"). The side startup file is located inside this directory and contains (when (require 'guix-emacs nil t) (guix-emacs-autoload-packages) (advice-add 'package-load-all-descriptors :after #'guix-emacs-load-package-descriptors)) The file "guix-emacs.el" is located in the same directory. So the purpose of setting EMACSLOADPATH seems to be to allow using `require' to load that file. This doesn't seem right to me, they could just as well extend the load-path inside "site-lisp.el", or load their additional init file using `load'. To deal with the incomplete EMACSLOADPATH, as set in the shell environment, they use a wrapper script named "emacs" and located on PATH: #!/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash export XDG_DATA_DIRS="/gnu/store/h6qdfd4sjdg28jq16600hcjky0cfw9gx-shared-mime-info-1.15/share:/gnu/store/bnsf9il448hl5xjavbhq3rcx355svz2v-glib-2.70.2/share:/gnu/store/7njbpmsgwmx59xn2r6q097iy2wwscb44-gtk+-3.24.30/share:/gnu/store/w0ssipd06il3kvyvqihpmw4lwbhwwfq3-emacs-28.1/share${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS" export GTK_PATH="/gnu/store/7njbpmsgwmx59xn2r6q097iy2wwscb44-gtk+-3.24.30/lib/gtk-3.0${GTK_PATH:+:}$GTK_PATH" export PATH="$PATH${PATH:+:}/gnu/store/0c1yfbxyv877mlgychfgvmk5ha2jqh52-gzip-1.10/bin:/gnu/store/8fpk2cja3f07xls48jfnpgrzrljpqivr-coreutils-8.32/bin" export EMACSLOADPATH="$EMACSLOADPATH${EMACSLOADPATH:+:}/gnu/store/w0ssipd06il3kvyvqihpmw4lwbhwwfq3-emacs-28.1/share/emacs/28.1/lisp" exec -a "$0" "/gnu/store/w0ssipd06il3kvyvqihpmw4lwbhwwfq3-emacs-28.1/bin/.emacs-28.1-real" "$@" I am under the impression that they should stop setting EMACSLOADPATH and should either invent their own variable to replace that or load "guix-emacs.el" using simpler means as I suggested above. What do you think? I intend to raise the issue with the guix folks but would first like to hear your opinion. If I unset EMACSLOADPATH, then everything works as expected. > Emacs has special support for running from the build tree, but in your > case it somehow doesn't realize that. As a side-note, the wrapper script that I previously used looked like this: #!/bin/sh export EMACSLOADPATH="\ /home/jonas/.guix-home/profile/share/emacs/site-lisp:\ /home/jonas/src/emacs/emacs/lisp" exec -a "$0" "/home/jonas/src/emacs/emacs/src/emacs" "$@" The build tree is at "/home/jonas/src/emacs/emacs"; I think the value I set above is correct (correct me if I am wrong), so it seems that when running from the build tree EMACSLOADPATH has to be unset; explicitly doubling down on the defaults doesn't work. I also tried with an empty element.