GNU bug report logs -
#52292
29.0.50; when ~/.emacs.d is a relative symlink to ~/foo/bar, (setq find-file-visit-truename t) causes package-install to generate incorrect autoloads
Previous Next
To reply to this bug, email your comments to 52292 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#52292
; Package
emacs
.
(Sun, 05 Dec 2021 04:43:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Faerryn <alexandre.liao <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 05 Dec 2021 04:43:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
In an empty HOME directory, run the following shell commands:
mkdir -p ~/foo/bar
ln -srf ~/foo/bar ~/.emacs.d
emacs -Q
In emacs, type the following elisp in the scratch buffer:
(progn
(setq find-file-visit-truename t)
(package-install 'vertico))
Then type 'C-x C-e' to evaluate. Once Emacs is done evaluating, type
'C-x C-c' to quit from emacs.
In the shell, run 'emacs -Q' again. Then type the following elisp in
the scratch buffer:
(package-initialize)
And type 'C-x C-e' to evaluate. Then type 'M-x' and 'vertico-mode' in
the prompt. Emacs will complain that it could not open the load file
for vertico.
Currently I use this snippet to patch the issue up:
(defun faerryn-patch-package-find-file-visit-truename (oldfun &rest r)
(let ((find-file-visit-truename nil))
(apply oldfun r)))
(advice-add #'package-install :around
#'faerryn-patch-package-find-file-visit-truename)
In GNU Emacs 29.0.50 (build 9, x86_64-pc-linux-gnu, X toolkit, cairo
version 1.17.4, Xaw3d scroll bars)
of 2021-12-04 built on FaerrynLaptop
Repository revision: f14a4c377dfa6602e9e159c806656137854a667b
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101001
System Description: Arch Linux
Configured using:
'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
--localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games
--with-sound=alsa --with-modules --without-gconf --without-gsettings
--with-native-compilation --with-x-toolkit=lucid --with-xft
--with-xaw3d --without-compress-install
'--program-transform-name=s/\([ec]tags\)/\1.emacs/'
'CFLAGS=-march=native -O2 -pipe -fno-plt -fexceptions
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security
-fstack-clash-protection -fcf-protection'
LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM HARFBUZZ JPEG JSON LCMS2
LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY
PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11
XAW3D XDBE XIM XPM LUCID ZLIB
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: EXWM
Minor modes in effect:
global-git-commit-mode: t
shell-dirtrack-mode: t
display-time-mode: t
display-battery-mode: t
global-auto-revert-mode: t
electric-pair-mode: t
global-display-line-numbers-mode: t
display-line-numbers-mode: t
gcmh-mode: t
global-eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
global-prettify-symbols-mode: t
tab-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
buffer-read-only: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
/home/faerryn/.emacs.d/elpa/transient-0.3.7/transient hides
/usr/share/emacs/29.0.50/lisp/transient
Features:
(shadow sort mail-extr emacsbug sendmail git-rebase ediff ediff-merg
ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util
let-alist magit-bookmark bookmark magit-submodule magit-obsolete
magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull
magit-fetch magit-clone magit-remote magit-commit magit-sequence
magit-notes magit-worktree magit-tag magit-merge magit-branch
magit-reset magit-files magit-refs magit-status magit magit-repos
magit-apply magit-wip magit-log magit-diff smerge-mode diff git-commit
magit-core magit-autorevert magit-margin magit-transient magit-process
magit-mode magit-git magit-section magit-utils which-func imenu ido crm
with-editor transient log-edit pcvs-util add-log benchmark dash edmacro
checkdoc term ehelp eshell esh-cmd esh-ext esh-opt esh-proc esh-io
esh-arg esh-module esh-groups esh-util pcase compile autoload lisp-mnt
tar-mode arc-mode archive-mode mm-archive cus-edit cus-start cus-load
shortdoc pp cl-print help-fns radix-tree vc-git diff-mode vc-dispatcher
org-indent org-element avl-tree generator ol-eww eww xdg url-queue
mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search
eieio-opt speedbar ezimage dframe gnus-art mm-uu mml2015 mm-view
mml-smime smime dig gnus-sum shr pixel-fill kinsoku svg dom gnus-group
gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail mail-source utf7
netrc nnoo parse-time gnus-spec gnus-int gnus-range message yank-media
rfc822 mml mml-sec epa derived epg rfc6068 epg-config mm-decode
mm-bodies mm-encode mailabbrev gmm-utils mailheader gnus-win gnus
nnheader gnus-util rmail rmail-loaddefs text-property-search wid-edit
ol-docview doc-view jka-compr image-mode exif ol-bibtex ol-bbdb ol-w3m
ol-doi org-link-doi org ob ob-tangle ob-ref ob-lob ob-table ob-exp
org-macro org-footnote org-src ob-comint org-pcomplete org-list
org-faces org-entities noutline outline easy-mmode org-version
ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex iso8601 ol
org-keys oc org-compat advice org-macs org-loaddefs find-func cal-menu
calendar cal-loaddefs time-date shell pcomplete comint ansi-color ring
dired-aux dired-x dired dired-loaddefs thingatpt mail-utils comp
comp-cstr warnings rx cl-extra help-mode exwm exwm-input xcb-keysyms
xcb-xkb exwm-manage exwm-floating xcb-cursor xcb-render exwm-layout
exwm-workspace exwm-core xcb-ewmh xcb-icccm xcb xcb-xproto xcb-types
xcb-debug kmacro server time format-spec battery dbus xml gnutls
network-stream url-http mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr url-gw nsm rmc puny url-cache url-auth disp-table
whitespace autorevert filenotify elec-pair modus-vivendi-theme
modus-themes info display-line-numbers gcmh finder-inf package
browse-url url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map url-vars seq gv subr-x byte-opt bytecomp
byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice
button loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting font-render-setting cairo x-toolkit x multi-tty
make-network-process native-compile emacs)
Memory information:
((conses 16 735182 520539)
(symbols 48 43675 1482)
(strings 32 139031 55401)
(string-bytes 1 4616283)
(vectors 16 76452)
(vector-slots 8 1331544 461443)
(floats 8 548 2348)
(intervals 56 4297 2144)
(buffers 992 28))
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#52292
; Package
emacs
.
(Fri, 10 Dec 2021 00:36:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 52292 <at> debbugs.gnu.org (full text, mbox):
Jiacai Liu <hello <at> liujiacai.net> writes:
>> Can you report the problem with `M-x report-emacs-bug'
>
> After some search, I found someone else already did this.
> - https://lists.gnu.org/r/bug-gnu-emacs/2021-12/msg00376.html
>
> If it helps, below is the step I use to reproduce this issue:
>
> 1. mkdir an empty dir, and soft link to emacs config dir
> `mkdir /tmp/emacs-conf && ln -s /tmp/emacs-conf $HOME/.emacs.d`
> 2. (setq find-file-visit-truename t)
> 3. package-install undo-tree
>
> Then open generated autoloads file for undo-tree under
> $HOME/.emacs.d/undo-tree-${version}/undo-tree-autoloads.el,
> the content is something like
>
> (autoload 'undo-tree-mode
> "../../../../../Users/${username}/.emacs.d/elpa/undo-tree-0.7.5/undo-tree"
> "long docsting" t nil)
>
> In Emacs 27, the content is
> (autoload 'undo-tree-mode "undo-tree" "long docsting" t nil)
(Re-sent to land in the bug tracker.)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Forcibly Merged 52292 52413.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 11 Dec 2021 03:30:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#52292
; Package
emacs
.
(Sun, 10 Apr 2022 02:49:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 52292 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I am also observing this on Windows with Emacs 28. Reverting to Emacs 27.2
resolved the issue.
I was also able to work around this issue on Emacs 28 by using an
around-advice similar to the one provided by Faerryn but tailored for
straight.el, wrapping function straight--build-autoloads.
You can find other users running into this problem in this straight.el
issue: https://github.com/raxod502/straight.el/issues/701
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#52292
; Package
emacs
.
(Wed, 11 May 2022 04:26:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 52292 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
The solution for this seems simple enough, but I'm not sure
exactly where it should be placed.
In any case, here's a patch which may solve the problem.
Offering it in hopes that someone more knowledgeable in this area
can step in and apply the actual fix.
[0001-autoload.el-Don-t-use-file-truename-for-symlinked-au.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#52292
; Package
emacs
.
(Wed, 11 May 2022 11:18:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 52292 <at> debbugs.gnu.org (full text, mbox):
> Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, alexandre.liao <at> gmail.com
> From: No Wayman <iarchivedmywholelife <at> gmail.com>
> Date: Wed, 11 May 2022 00:23:42 -0400
>
> diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
> index 1e4b2c14a0..23e34ddad0 100644
> --- a/lisp/emacs-lisp/autoload.el
> +++ b/lisp/emacs-lisp/autoload.el
> @@ -282,6 +282,7 @@ autoload-find-generated-file
> (let ((enable-local-variables :safe)
> (enable-local-eval nil)
> (find-file-hook nil)
> + (find-file-visit-truename nil)
> (delay-mode-hooks t))
> ;; We used to use `raw-text' to read this file, but this causes
> ;; problems when the file contains non-ASCII characters.
I think I'd prefer to run the file name through expand-file-name
instead, as not resolving symlinks and other similar "equivalences"
could have adverse effect elsewhere, if someone compares the file name
to some other file name.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#52292
; Package
emacs
.
(Wed, 11 May 2022 17:55:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 52292 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> I think I'd prefer to run the file name through expand-file-name
> instead, as not resolving symlinks and other similar
> "equivalences"
> could have adverse effect elsewhere, if someone compares the
> file name
> to some other file name.
Sounds good.
Too busy to tackle this myself now, but hopefully someone can take
initiative given that we have a reproducible test case and a
suggested solution now.
This bug report was last modified 3 years and 37 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.