tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird behaviour when entering the filename


From: Michael Albinus
Subject: Re: Weird behaviour when entering the filename
Date: Tue, 26 Jan 2010 16:49:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux)

Francis Moreau <address@hidden> writes:

>> These files are read by ls, determining which colors to present.
>> dircolors is just a tool supporting you to set $LS_COLORS. When it is
>> not present, it does not mean that ls does not read those files.
>>
>
> Ok. then I have none of the files you previously mentioned.

I've checked the documentation on busybox.net. There is no obvious way
to configure coloring :-(

Well, so I have added a check for "--color=never" to the ls command,
here is the patch (line numbers might differ):

--8<---------------cut here---------------start------------->8---
*** /mnt/src/tramp/lisp/tramp.el.~2.765.~       2010-01-23 11:00:19.000000000 
+0100
--- /mnt/src/tramp/lisp/tramp.el        2010-01-26 16:33:24.000000000 +0100
***************
*** 8018,8026 ****
         (let ((dl (tramp-get-remote-path vec))
               result)
           (while (and dl (setq result (tramp-find-executable vec cmd dl t t)))
!            ;; Check parameter.
             (when (zerop (tramp-send-command-and-check
                           vec (format "%s -lnd /" result)))
               (throw 'ls-found result))
             (setq dl (cdr dl))))))
       (tramp-error vec 'file-error "Couldn't find a proper `ls' command"))))
--- 8018,8029 ----
         (let ((dl (tramp-get-remote-path vec))
               result)
           (while (and dl (setq result (tramp-find-executable vec cmd dl t t)))
!            ;; Check parameters.
             (when (zerop (tramp-send-command-and-check
                           vec (format "%s -lnd /" result)))
+              (when (zerop (tramp-send-command-and-check
+                            vec (format "%s --color=never /" result)))
+                (setq result (concat result " --color=never")))
               (throw 'ls-found result))
             (setq dl (cdr dl))))))
       (tramp-error vec 'file-error "Couldn't find a proper `ls' command"))))
--8<---------------cut here---------------end--------------->8---

Please exit Emacs, and remove the file ~/.emacs.d/tramp before
restarting. Otherwise, cached values will be reused.

Best regards, Michael.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]