Subject: bug#64124: 29.0.91; Loading ‘tramp’ unconditionally loads ‘ls-lisp’

From: Sebastian Miele <[email-masked]>
Date: Sat, 17 Jun 2023 10:55:08 +0200

Feature ‘tramp’ unconditionally requires ‘tramp-compat’, which in turn
unconditionally requires ‘ls-lisp’.  ‘ls-lisp’ advises ‘dired’ with
‘ls-lisp--dired’.  That in particular has the effect that globstar
patterns do not work as advertised in [[info:emacs#Dired Enter]], even
though my SHELL does support them out of the box.

So now the situation is: If you use Tramp, then you also use ‘ls-lisp’,
and cannot use globstar patterns, as advertised in the Emacs manual.

This can be alliviated by removing the advice around ‘dired’ in my
config.  However, I do not know whether that breaks anything.

I don't know a good way out.  As far as I understand the description of
‘tramp-compat’, it should not be necessary for Emacs 29, so it should
not be required unconditionally in ‘tramp’.  But even then, and for
Emacs <29, a compatibility layer ideally would not make a decision like
whether to use ‘ls-lisp’, or not.

In any case, if ‘ls-lisp’ is necessary when using Tramp,
[[info:emacs#Dired Enter]] definitely should mention that.  It took me
more than two hours to figure out what is wrong with one of the first
Dired features explained in the Emacs manual.

In GNU Emacs 29.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.17.8) of 2023-06-15 built on huette
Repository revision: c8357582389e7090744c9fbc3ea577d7d639cd1b
Repository branch: HEAD
Windowing system distributor 'The X.Org Foundation', version 11.0.12101008
System Description: Arch Linux

Configured using:
 'configure --with-x-toolkit=gtk --with-native-compilation=yes
 --with-tree-sitter --with-json --with-mailutils --with-imagemagick'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ
IMAGEMAGICK JPEG JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3
THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2
XPM GTK3 ZLIB

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: C.UTF-8
  locale-coding-system: utf-8-unix

Major mode: ELisp/l

Minor modes in effect:
  windmove-mode: t
  bug-reference-prog-mode: t
  async-bytecomp-package-mode: t
  mu4e-modeline-mode: t
  envrc-global-mode: t
  envrc-mode: t
  editorconfig-mode: t
  outline-minor-mode: t
  marginalia-mode: t
  vertico-mode: t
  minibuffer-depth-indicate-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  auto-revert-mode: t
  info-rename-buffer-mode: t
  shell-dirtrack-mode: t
  server-mode: t
  savehist-mode: t
  recentf-mode: t
  global-so-long-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  temp-buffer-resize-mode: t

Load-path shadows:
/home/w/.config/w-emacs/usr/transient-20230602.2121/transient hides /home/w/usr/emacs/0/.0/lisp/transient

Features:
(shadow emacsbug macrostep-c cmacexp consult-org whx-boot-lib::elpa
loadhist semantic/symref/grep grep semantic/symref semantic/util-modes
semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local
cedet dired-aux hmouse-tag kview kfill klabel windmove rng-nxml
rng-valid nxml-mode nxml-outln nxml-rap mhtml-mode vc-hg vc-bzr vc-src
vc-sccs vc-svn vc-cvs vc-rcs log-view package-vc vc bug-reference
magit-patch magit-subtree magit-extras magit-gitignore magit-ediff ediff
ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init
ediff-util display-line-numbers cl-print hyperbole cus-start
kotl-autoloads hinit hibtypes hib-doc-id klink hib-kbd hib-debbugs
hib-social hsys-www hypb-ert hactypes hui-mini hui hui-mouse hmouse-key
hargs etags fileloop hsys-org hui-menu hyrolo-menu hyrolo hui-jmenu
hpath hmouse-sh hmouse-drv hui-window hycontrol hui-select hsettings
hui-em-but hbut view hbdata hgnus gnus-msg hsmail hmail htz cal-julian
hbmap hmoccur hvar hypb locate hact hhist set hversion hload-path
hyperbole-autoloads loaddefs-gen lisp-mnt tar-mode arc-mode archive-mode
async-bytecomp async mm-archive url-cache url-http url-auth url-gw
tabify calc-map calc-stat calc-vec calc-ext calc-menu calc-aent calc
calc-loaddefs rect calc-macs network-stream nsm mailalias textsec
uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check qp
sort mail-extr pulse face-remap misearch multi-isearch cal-move
org-clock saveplace oc-basic ol-eww ol-rmail ol-mhe ol-irc ol-info
ol-gnus nnselect ol-docview doc-view jka-compr image-mode exif ol-bibtex
bibtex ol-bbdb ol-w3m ol-doi org-link-doi whx-init::later whx-etc::gc
whx::binary-unit-prefix mu4e mu4e-org mu4e-notification notifications
mu4e-main mu4e-view gnus-art mm-uu mml2015 mm-view mml-smime smime
gnutls dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus dbus
gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int
gnus-range gnus-win mu4e-headers mu4e-compose mu4e-draft mu4e-actions
smtpmail mu4e-search mu4e-lists mu4e-bookmarks mu4e-mark mu4e-message
flow-fill mule-util hl-line mu4e-contacts mu4e-update mu4e-folders
mu4e-context mu4e-query-items mu4e-server mu4e-modeline mu4e-vars
mu4e-helpers mu4e-config mu4e-window mu4e-obsolete ob-python ob-shell
org-superstar ol-man whx::password whx::pcase whx::walk ox-odt rng-loc
rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns
nxml-enc xmltok nxml-util ox-latex ox-icalendar org-agenda ox-html table
ox-ascii ox-publish ox eglot external-completion array jsonrpc ert ewoc
xref envrc inheritenv web-mode disp-table css-mode sgml-mode facemenu
eww url-queue shr pixel-fill kinsoku url-file svg xml dom mm-url gnus
nnheader range docker-compose-mode dockerfile-mode apache-mode systemd
pkgbuild-mode flymake-proc flymake cmake-font-lock cmake-mode rst
gitignore-mode gitconfig-mode conf-mode gitattributes-mode python
project sh-script smie executable lua-mode advice json-mode
json-snatcher js c-ts-common treesit cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine yaml-mode vcard markdown-mode color
tex-mode compile editorconfig editorconfig-core editorconfig-core-handle
editorconfig-fnmatch ace-window avy embark-org org-element org-persist
xdg org-id org-refile avl-tree generator embark-consult embark ffap
thingatpt org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro
org-pcomplete org-list org-footnote org-entities ob-emacs-lisp org-table
ol org-loaddefs noutline outline consult magit-bookmark bookmark
marginalia vertico-quick vertico-directory vertico orderless mb-depth
magit-submodule 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 log-edit message sendmail yank-media puny rfc822 mml mml-sec
epa epg rfc6068 epg-config gnus-util text-property-search mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader
pcvs-util add-log magit-core magit-autorevert autorevert filenotify
magit-margin magit-transient magit-process with-editor magit-mode
derived magit-git magit-base which-func vc-git diff-mode easy-mmode
vc-dispatcher ido magit-section cursor-sensor crm diary-lib
diary-loaddefs cal-iso cal-menu calendar cal-loaddefs helpful cc-langs
cc-vars cc-defs imenu trace edebug info-look f f-shortdoc help-fns
radix-tree elisp-refs man dired dired-loaddefs info-rename-buffer
tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x
tramp-compat shell pcomplete parse-time iso8601 ls-lisp server
whx::safe-local org-src org-keys oc ob-comint comint ansi-osc ansi-color
ob-core org-cycle org-fold org-fold-core org-compat ob-eval whx-etc::0
whx::transient comp comp-cstr warnings whx::arg transient cl-extra
edmacro kmacro whx::elpa whx-etc::elisp whx::bind whx::log whx::meta
whx::cl whx::elisp whx::string s whx::feature whx::error debug backtrace
help-mode find-func macrostep ring whx-etc::session savehist recentf
tree-widget whx::custom whx-etc::custom whx-etc::core-settings so-long
diminish whx-etc::modus-themes modus-vivendi-tritanopia-theme
modus-operandi-tritanopia-theme modus-vivendi-deuteranopia-theme
modus-operandi-deuteranopia-theme modus-vivendi-tinted-theme
modus-operandi-tinted-theme modus-vivendi-theme org-faces org-version
org-macs format-spec whx::face whx::alist whx::plist whx::list dash
modus-operandi-theme modus-themes time-date no-littering compat
finder-inf ace-window-autoloads apache-mode-autoloads async-autoloads
avy-autoloads cmake-font-lock-autoloads cmake-mode-autoloads
diminish-autoloads docker-compose-mode-autoloads
dockerfile-mode-autoloads editorconfig-autoloads
embark-consult-autoloads consult-autoloads embark-autoloads
envrc-autoloads geiser-guile-autoloads geiser-autoloads
git-modes-autoloads helpful-autoloads elisp-refs-autoloads f-autoloads
info-rename-buffer-autoloads inheritenv-autoloads json-mode-autoloads
json-snatcher-autoloads lua-mode-autoloads macrostep-autoloads
magit-autoloads git-commit-autoloads magit-section-autoloads
dash-autoloads marginalia-autoloads markdown-mode-autoloads
modus-themes-autoloads no-littering-autoloads orderless-autoloads
org-superstar-autoloads pkgbuild-mode-autoloads s-autoloads
systemd-autoloads transient-autoloads vcard-autoloads vertico-autoloads
vimrc-mode-autoloads web-mode-autoloads with-editor-autoloads
compat-autoloads yaml-mode-autoloads package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source eieio eieio-core password-cache json map byte-opt bytecomp
byte-compile url-vars info whx-init::early whx-boot whx-boot::litter
whx-boot::run-level whx-boot-etc::run-level whx-boot-etc::packages
whx-boot-etc::directories whx-boot::after-init-hook
whx-boot-etc::core-settings whx-boot-lib::custom whx-boot-lib::fs-path
cl-seq whx-boot-lib::symbol whx-boot::session-type whx-boot::verbosity
whx-boot-lib::log whx-boot::early-cmdline whx-boot-lib::string rx
whx-boot-lib::feature whx-boot-lib::0 whx-boot-lib::list subr-x
whx-boot-lib::meta whx-boot-lib::pcase pcase whx-boot-lib::error cl-macs
gv cus-edit pp cus-load icons wid-edit cl-loaddefs cl-lib rmc iso-transl
tooltip cconv 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 nadvice seq
simple cl-generic indonesian philippine 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 abbrev obarray oclosure cl-preloaded button
loaddefs theme-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 system-font-setting font-render-setting
cairo move-toolbar gtk x-toolkit xinput2 x multi-tty
make-network-process native-compile emacs)

Memory information:
((conses 16 2684702 1200096)
 (symbols 48 82619 26)
 (strings 32 440773 56312)
 (string-bytes 1 22199193)
 (vectors 16 161251)
 (vector-slots 8 3680030 272007)
 (floats 8 931 2249)
 (intervals 56 90678 3518)
 (buffers 984 78))