all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Sebastian Miele <iota@whxvd.name>
Cc: 64124@debbugs.gnu.org
Subject: bug#64124: 29.0.91; Loading ‘tramp’ unconditionally loads ‘ls-lisp’
Date: Sat, 17 Jun 2023 12:18:43 +0200	[thread overview]
Message-ID: <87sfaqjssc.fsf@gmx.de> (raw)
In-Reply-To: <87legixw49.fsf@whxvd.name> (Sebastian Miele's message of "Sat, 17 Jun 2023 10:55:08 +0200")

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

  reply	other threads:[~2023-06-17 10:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sfaqjssc.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=64124@debbugs.gnu.org \
    --cc=iota@whxvd.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.