all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: help-gnu-emacs@gnu.org
Subject: Re: tramp mode locale for dir listings
Date: Sat, 22 Aug 2015 20:39:25 +0200	[thread overview]
Message-ID: <871tevmale.fsf@gmx.de> (raw)
In-Reply-To: <8xxr3mwqpfm.fsf@village.keycorner.org> (Hikaru Ichijyo's message of "Fri, 21 Aug 2015 16:53:01 -0500")

Hikaru Ichijyo <ichijyo@macross.sdf.jp> writes:

Hi,

> When I list directories locally in Dired, they show up the way I like,
> with "C" locale, dotfiles listed first.
>
> When I connect to a remote directory via Tramp, usually I get some other
> locale, with files/dirs aphabetized as though the initial dot of
> dotfiles didn't exist.  This means lots of dotfiles are mixed in with
> regular non-dot files in the listing, but Dired only does this to remote
> machines.
>
> Is there any kind of variable I can set to get a "C" locale for Dired
> listings whether the target is remote or local?

Tramp determines the locale environment on the remote host, and keeps
its value in the cache. Usually, this is something like "LC_ALL=en_US.utf8"
or "LC_ALL=C.utf8". Check the file ~/.emacs.d/tramp for such settings.

You could change it in this file to your preferred value, like "LC_ALL=C".
This must be done *prior* Tramp is activated in Emacs.

With a recent Tramp version (say 2.2.12), it is possible to set this
value in your ~/.emacs (without patching ~/.emacs.d/tramp), like

--8<---------------cut here---------------start------------->8---
(add-to-list 'tramp-connection-properties
             (list (regexp-quote "/ssh:user@randomhost.your.domain:")
                   "locale" "LC_ALL=C"))
--8<---------------cut here---------------end--------------->8---

Read the Tramp manual (info "(tramp) Predefined connection information")

Best regards, Michael.



      parent reply	other threads:[~2015-08-22 18:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-21 21:53 tramp mode locale for dir listings Hikaru Ichijyo
2015-08-21 23:09 ` Javier
2015-08-21 23:33   ` Hikaru Ichijyo
2015-08-22 18:39 ` Michael Albinus [this message]

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=871tevmale.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=help-gnu-emacs@gnu.org \
    /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.