help-gnu-emacs
[Top][All Lists]
Advanced

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

How to use connection-local variables with dired?


From: Vladimir Nikishkin
Subject: How to use connection-local variables with dired?
Date: Wed, 25 Aug 2021 11:14:40 +0800
User-agent: mu4e 1.6.3; emacs 27.1

Hello, everyone

My problem is the following:

I generally use dired to manage files, with `dired-listing-switches` set
to "-lahD". This "-D" is GNU-specific, and while it makes dired work
consistently, there is no "-D" option on non-GNU machines, which I also
have a few.

I would like to tell dired to use the switches without "-D" when
connecting to the non-GNU machines, but I have not found a way to do so.

E.g.:

#+begin_src: elisp
(connection-local-set-profile-variables 'remote-ksh
                                        '((shell-file-name . "/bin/ksh")
                                          (shell-command-switch . "-c")
                                          (dired-listing-switches . "-lah")))
(connection-local-set-profiles
 '(:application tramp
                :machine "bsd-machine.example"
                :protocol "ssh")
 'remote-ksh) ; works


(connection-local-set-profiles
 '(
   :application dired
                :machine "bsd-machine.example"
                )
 'remote-ksh) ; broken
#+end_src

The variables are, indeed, set correctly in the
*tramp/bsd-machine.example* buffer, but not in the dired buffer, hence
dired does not work.

Is there some way to achieve what I want?

Thanks everyone for help.

-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



reply via email to

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