unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#64124: 29.0.91; Loading ‘tramp’ unconditionally loads ‘ls-lisp’
@ 2023-06-17  8:55 Sebastian Miele
  2023-06-17 10:18 ` Michael Albinus
  0 siblings, 1 reply; 9+ messages in thread
From: Sebastian Miele @ 2023-06-17  8:55 UTC (permalink / raw)
  To: 64124

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))





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#64124: 29.0.91; Loading ‘tramp’ unconditionally loads ‘ls-lisp’
  2023-06-17  8:55 bug#64124: 29.0.91; Loading ‘tramp’ unconditionally loads ‘ls-lisp’ Sebastian Miele
@ 2023-06-17 10:18 ` Michael Albinus
  2023-06-17 12:37   ` Sebastian Miele
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2023-06-17 10:18 UTC (permalink / raw)
  To: Sebastian Miele; +Cc: 64124

[-- Attachment #1: Type: text/plain, Size: 683 bytes --]

Sebastian Miele <iota@whxvd.name> writes:

Hi Sebastian,

> 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.

Could you please check whether the appended patch fixes this for you?

Best regards, Michael.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2653 bytes --]

diff --git a/lisp/tramp-compat.el b/lisp/tramp-compat.el
index 1386f301..44a67259 100644
--- a/lisp/tramp-compat.el
+++ b/lisp/tramp-compat.el
@@ -32,11 +32,13 @@
 (require 'ansi-color)
 (require 'auth-source)
 (require 'format-spec)
-(require 'ls-lisp) ;; Due to `tramp-handle-insert-directory'.
 (require 'parse-time)
 (require 'shell)
 (require 'subr-x)

+(when (memq system-type '(ms-dos windows-nt))
+  (require 'ls-lisp)) ;; Due to `tramp-handle-insert-directory'.
+
 (declare-function tramp-compat-rx "tramp")
 (declare-function tramp-error "tramp")
 (declare-function tramp-file-name-handler "tramp")
diff --git a/lisp/tramp-sh.el b/lisp/tramp-sh.el
index ec28b51c..7915ea9a 100644
--- a/lisp/tramp-sh.el
+++ b/lisp/tramp-sh.el
@@ -38,6 +38,7 @@
 (declare-function dired-compress-file "dired-aux")
 (declare-function dired-remove-file "dired-aux")
 (defvar dired-compress-file-suffixes)
+(defvar ls-lisp-use-insert-directory-program)
 ;; Added in Emacs 28.1.
 (defvar process-file-return-signal-string)
 (defvar vc-handled-backends)
@@ -2634,7 +2635,7 @@ The method used must be an out-of-band method."
     (access-file filename "Reading directory"))
   (with-parsed-tramp-file-name (expand-file-name filename) nil
     (if (and (featurep 'ls-lisp)
-	     (not (symbol-value 'ls-lisp-use-insert-directory-program)))
+	     (not ls-lisp-use-insert-directory-program))
 	(tramp-handle-insert-directory
 	 filename switches wildcard full-directory-p)
       (when (stringp switches)
diff --git a/lisp/tramp.el b/lisp/tramp.el
index c5a82d7b..90fd53b0 100644
--- a/lisp/tramp.el
+++ b/lisp/tramp.el
@@ -63,6 +63,7 @@
 (declare-function file-notify-rm-watch "filenotify")
 (declare-function netrc-parse "netrc")
 (defvar auto-save-file-name-transforms)
+(defvar ls-lisp-use-insert-directory-program)

 ;; Reload `tramp-compat' when we reload `tramp-autoloads' of the GNU
 ;; ELPA package.
@@ -4326,6 +4327,7 @@ Let-bind it when necessary.")
 (defun tramp-handle-insert-directory
   (filename switches &optional wildcard full-directory-p)
   "Like `insert-directory' for Tramp files."
+  (require 'ls-lisp)
   (unless switches (setq switches ""))
   ;; Mark trailing "/".
   (when (and (directory-name-p filename)
@@ -4338,7 +4340,6 @@ Let-bind it when necessary.")
     (with-tramp-progress-reporter v 0 (format "Opening directory %s" filename)
       (let (ls-lisp-use-insert-directory-program start)
 	;; Silence byte compiler.
-	(ignore ls-lisp-use-insert-directory-program)
 	(tramp-run-real-handler
 	 #'insert-directory
 	 (list filename switches wildcard full-directory-p))

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* bug#64124: 29.0.91; Loading ‘tramp’ unconditionally loads ‘ls-lisp’
  2023-06-17 10:18 ` Michael Albinus
@ 2023-06-17 12:37   ` Sebastian Miele
  2023-06-17 14:14     ` Michael Albinus
  0 siblings, 1 reply; 9+ messages in thread
From: Sebastian Miele @ 2023-06-17 12:37 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 64124

Hi Micheal,

Michael Albinus <michael.albinus@gmx.de> writes:

> Could you please check whether the appended patch fixes this for you?

the patch does not apply to my Emacs 29 checkout.  I suspect that the
patch is relative to another repository (probably a/the Tramp repository
outside of Emacs).  I tried changing "lisp/…" into "lisp/net/…".  But
even then, I get:

  error: patch failed: lisp/net/tramp-compat.el:32
  error: lisp/net/tramp-compat.el: patch does not apply

I also tried cloning git://git.savannah.gnu.org/tramp.git, and applying
the (unmodified) patch on its current master branch, but I get the same
error (only with "lisp/…" instead of "lisp/net/…").  I tried both using
‘magit-patch-apply’.

Finally, I tried with "patch -p1" on the current master branch of the
Tramp repository.  It get:

  patching file lisp/tramp-compat.el
  Hunk #1 FAILED at 32.
  1 out of 1 hunk FAILED -- saving rejects to file lisp/tramp-compat.el.rej
  patching file lisp/tramp-sh.el
  Hunk #2 succeeded at 2552 (offset -83 lines).
  patching file lisp/tramp.el
  Hunk #2 succeeded at 4403 (offset 76 lines).
  Hunk #3 succeeded at 4416 (offset 76 lines).

Looks like basically the same error, only with a different message.

(I did not look into tramp-compat.el.)





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#64124: 29.0.91; Loading ‘tramp’ unconditionally loads ‘ls-lisp’
  2023-06-17 12:37   ` Sebastian Miele
@ 2023-06-17 14:14     ` Michael Albinus
  2023-06-17 14:52       ` Sebastian Miele
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2023-06-17 14:14 UTC (permalink / raw)
  To: Sebastian Miele; +Cc: 64124

[-- Attachment #1: Type: text/plain, Size: 460 bytes --]

Sebastian Miele <iota@whxvd.name> writes:

> Hi Micheal,

Hi Sebastian,

> the patch does not apply to my Emacs 29 checkout.  I suspect that the
> patch is relative to another repository (probably a/the Tramp repository
> outside of Emacs).

The patch was based on the tramp-2-6-stable branch of the Tramp git
repostory.

Appended is the same patch, but now based on the emacs-29 branch of the
Emacs git repository.

Best regards, Michael.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2687 bytes --]

diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index f176476a73a..3d3ba7a4f43 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -31,11 +31,13 @@

 (require 'auth-source)
 (require 'format-spec)
-(require 'ls-lisp) ;; Due to `tramp-handle-insert-directory'.
 (require 'parse-time)
 (require 'shell)
 (require 'subr-x)

+(when (memq system-type '(ms-dos windows-nt))
+  (require 'ls-lisp)) ;; Due to `tramp-handle-insert-directory'.
+
 (declare-function tramp-compat-rx "tramp")
 (declare-function tramp-error "tramp")
 (declare-function tramp-file-name-handler "tramp")
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 392a654df21..48ba3d09e3e 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -38,6 +38,7 @@
 (declare-function dired-compress-file "dired-aux")
 (declare-function dired-remove-file "dired-aux")
 (defvar dired-compress-file-suffixes)
+(defvar ls-lisp-use-insert-directory-program)
 ;; Added in Emacs 28.1.
 (defvar process-file-return-signal-string)
 (defvar vc-handled-backends)
@@ -2659,7 +2660,7 @@ tramp-sh-handle-insert-directory
     (access-file filename "Reading directory"))
   (with-parsed-tramp-file-name (expand-file-name filename) nil
     (if (and (featurep 'ls-lisp)
-	     (not (symbol-value 'ls-lisp-use-insert-directory-program)))
+	     (not ls-lisp-use-insert-directory-program))
 	(tramp-handle-insert-directory
 	 filename switches wildcard full-directory-p)
       (when (stringp switches)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 7df455954d8..b46eeb8e374 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -63,6 +63,7 @@
 (declare-function file-notify-rm-watch "filenotify")
 (declare-function netrc-parse "netrc")
 (defvar auto-save-file-name-transforms)
+(defvar ls-lisp-use-insert-directory-program)

 ;; Reload `tramp-compat' when we reload `tramp-autoloads' of the GNU
 ;; ELPA package.
@@ -4181,6 +4182,7 @@ tramp-handle-find-backup-file-name
 (defun tramp-handle-insert-directory
   (filename switches &optional wildcard full-directory-p)
   "Like `insert-directory' for Tramp files."
+  (require 'ls-lisp)
   (unless switches (setq switches ""))
   ;; Mark trailing "/".
   (when (and (directory-name-p filename)
@@ -4193,7 +4195,6 @@ tramp-handle-insert-directory
     (with-tramp-progress-reporter v 0 (format "Opening directory %s" filename)
       (let (ls-lisp-use-insert-directory-program start)
 	;; Silence byte compiler.
-	(ignore ls-lisp-use-insert-directory-program)
 	(tramp-run-real-handler
 	 #'insert-directory
 	 (list filename switches wildcard full-directory-p))

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* bug#64124: 29.0.91; Loading ‘tramp’ unconditionally loads ‘ls-lisp’
  2023-06-17 14:14     ` Michael Albinus
@ 2023-06-17 14:52       ` Sebastian Miele
  2023-06-17 16:19         ` Michael Albinus
  0 siblings, 1 reply; 9+ messages in thread
From: Sebastian Miele @ 2023-06-17 14:52 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 64124

Hi Micheal,

> Appended is the same patch, but now based on the emacs-29 branch of the
> Emacs git repository.

thank you!  That patch seems to work.  In particular: globstar patterns
work locally with ‘dired’.  They do not work with ‘dired’ over Tramp.
(featurep 'ls-lisp) remains nil, even after some tramping.

All tried with just emacs -Q.

However, another problem came to my attention (still with just emacs -Q
from commit c8357582389 (emacs-29 branch from last thursday) + your
patch):

When I try to find a file starting with "/ssh:user@host:", Emacs starts
using 100 % CPU and hangs.  The same with "sshx" works fine.  I did not
try without the patch, yet.  I am currently compiling the most recent
emacs-29 without the patch, and will send a quick note on what happens
there.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#64124: 29.0.91; Loading ‘tramp’ unconditionally loads ‘ls-lisp’
  2023-06-17 14:52       ` Sebastian Miele
@ 2023-06-17 16:19         ` Michael Albinus
       [not found]           ` <87v8fmm2px.fsf@whxvd.name>
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2023-06-17 16:19 UTC (permalink / raw)
  To: Sebastian Miele; +Cc: 64124

Sebastian Miele <iota@whxvd.name> writes:

> Hi Micheal,

Hi Sebastian,

>> Appended is the same patch, but now based on the emacs-29 branch of the
>> Emacs git repository.
>
> thank you!  That patch seems to work.  In particular: globstar patterns
> work locally with ‘dired’.  They do not work with ‘dired’ over Tramp.
> (featurep 'ls-lisp) remains nil, even after some tramping.
>
> All tried with just emacs -Q.

Thanks for the feedback. I've pushed the patch to the emacs-29 branch.

> However, another problem came to my attention (still with just emacs -Q
> from commit c8357582389 (emacs-29 branch from last thursday) + your
> patch):
>
> When I try to find a file starting with "/ssh:user@host:", Emacs starts
> using 100 % CPU and hangs.  The same with "sshx" works fine.  I did not
> try without the patch, yet.  I am currently compiling the most recent
> emacs-29 without the patch, and will send a quick note on what happens
> there.

Pls set tramp-verbose to 10, and rerun your test. There will be a Tramp
debug buffer, which tells us what happens.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#64124: 29.0.91; Loading ‘tramp’ unconditionally loads ‘ls-lisp’
       [not found]           ` <87v8fmm2px.fsf@whxvd.name>
@ 2023-06-17 17:26             ` Michael Albinus
  2023-06-18 15:33               ` Sebastian Miele
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2023-06-17 17:26 UTC (permalink / raw)
  To: Sebastian Miele; +Cc: 64124

Sebastian Miele <iota@whxvd.name> writes:

Hi Sebastian,

> Apart from that, there is a really long buffer ‘*debug tramp/ssh
> w@wolke*’ with 48 MiB of content.  In the hope that I do not publicly
> expose sensible information, I attached it to this mail.

It contains the following reponse from your remote host:

--8<---------------cut here---------------start------------->8---
18:58:58.587468 tramp-send-command (6) # exec ssh -l w -o ControlMaster=auto -o ControlPath=tramp.%C -o ControlPersist=no -e none wolke
18:59:58.593899 tramp-process-actions (6) # 
Last login: Sat Jun 17 18:57:59 2023 from 84.154.24.251
%                                                                               \r[33m%[00m [?2004h
--8<---------------cut here---------------end--------------->8---

I suppose rour remote host runs zsh, which sets this prompt. Pls check
the Tramp manual how to mitigate this.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#64124: 29.0.91; Loading ‘tramp’ unconditionally loads ‘ls-lisp’
  2023-06-17 17:26             ` Michael Albinus
@ 2023-06-18 15:33               ` Sebastian Miele
  2023-06-18 16:05                 ` Michael Albinus
  0 siblings, 1 reply; 9+ messages in thread
From: Sebastian Miele @ 2023-06-18 15:33 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 64124

>> Apart from that, there is a really long buffer ‘*debug tramp/ssh
>> w@wolke*’ with 48 MiB of content.  In the hope that I do not publicly
>> expose sensible information, I attached it to this mail.
>
> It contains the following reponse from your remote host:
>
> […]
>
> I suppose rour remote host runs zsh, which sets this prompt. Pls check
> the Tramp manual how to mitigate this.

Yes.  Thank you!

All the best!
Sebastian





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#64124: 29.0.91; Loading ‘tramp’ unconditionally loads ‘ls-lisp’
  2023-06-18 15:33               ` Sebastian Miele
@ 2023-06-18 16:05                 ` Michael Albinus
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Albinus @ 2023-06-18 16:05 UTC (permalink / raw)
  To: Sebastian Miele; +Cc: 64124-done

Version: 29.1

Sebastian Miele <iota@whxvd.name> writes:

Hi Sebastian,

>> I suppose rour remote host runs zsh, which sets this prompt. Pls check
>> the Tramp manual how to mitigate this.
>
> Yes.  Thank you!

Good. Nothing left to do, so I'm closing the bug.

> All the best!
> Sebastian

Best regards, Michael.





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-06-18 16:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-17  8:55 bug#64124: 29.0.91; Loading ‘tramp’ unconditionally loads ‘ls-lisp’ Sebastian Miele
2023-06-17 10:18 ` Michael Albinus
2023-06-17 12:37   ` Sebastian Miele
2023-06-17 14:14     ` Michael Albinus
2023-06-17 14:52       ` Sebastian Miele
2023-06-17 16:19         ` Michael Albinus
     [not found]           ` <87v8fmm2px.fsf@whxvd.name>
2023-06-17 17:26             ` Michael Albinus
2023-06-18 15:33               ` Sebastian Miele
2023-06-18 16:05                 ` Michael Albinus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).