all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Stoeber <paul.stoeber@stud.tu-ilmenau.de>
Subject: Re: emacs misbehaves without --unibyte
Date: Wed, 29 May 2002 10:56:05 +0200	[thread overview]
Message-ID: <20020529085604.GA499186@bruegel.RZ.TU-Ilmenau.DE> (raw)
In-Reply-To: <Pine.SUN.3.91.1020529091822.27552D-100000@is>

On Wed, May 29, 2002 at 09:23:11AM +0300, Eli Zaretskii wrote:
> > I started this thread because default emacs wouldn't let me navigate
> > filesystems that contain funny filenames, so the "8-bit cleanness"
> > discussion only applies to file name handling (although I had also
> > mentioned "text/binary files" in a general statement).
> 
> For that, Miles gave the solution: you should set up your language 
> environment correctly, or set file-name-coding-system explicitly.

Yes.  If you simply want to use dired as a robust filesystem browser
(like bash, only more comfortable), regardless of your language
or the language of who created the files, then

	(setq file-name-coding-system 'no-conversion)

seems to be a solution.  It works in the real life cases I've tried,
but will stop working if someone chooses to put a newline in a name.

> Please remember that Emacs decides where a file 
> name starts and ends in the Dired buffer by using a set of convoluted 
> regexps designed to parse the "ls -la" output for file's name, date, 
> time, attributes, etc.  A stray 8-bit byte can cause spurious wrong 
> matches of those regexps, and the net effect is what you reported.

"ls -la"'s output is made for users' eyes and trying to use it
as a back-end sacrifices total robustness.

I once had the same problem with smbclient.  I wanted to use it in a script,
but didn't want to sacrifice any robustness.  So I added a --batch-ouput
option, which was really effortless because all the data was at hand in the
C code, it was just a matter of changing the `printf's.  I made the output
so that it was (a) unambiguous and (b) easy to parse.  And the script
has been performing nicely without any glitches ever since.

Maybe that's not an option for Emacs because it wants to use whatever
/bin/ls is available on the system.

  reply	other threads:[~2002-05-29  8:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-28 20:08 emacs misbehaves without --unibyte Paul Stoeber
2002-05-28 21:40 ` Eli Zaretskii
2002-05-29  0:18   ` Paul Stoeber
2002-05-29  6:23     ` Eli Zaretskii
2002-05-29  8:56       ` Paul Stoeber [this message]
2002-05-29  8:58         ` Eli Zaretskii
2002-05-29  9:00         ` Eli Zaretskii
2002-05-29  9:10           ` Miles Bader
2002-05-29 10:06             ` Eli Zaretskii
2002-05-29 13:11               ` Robert J. Chassell
2002-05-29 17:02                 ` Eli Zaretskii
2002-05-31  7:04                   ` Richard Stallman
2002-05-29 13:13           ` Paul Stoeber
2002-05-30 17:04           ` Richard Stallman
2002-05-30 17:00   ` Richard Stallman
2002-05-30 18:46     ` Paul Stoeber
2002-05-31 21:28       ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2002-05-28 16:12 Paul Stoeber
2002-05-28 16:49 ` Miles Bader

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=20020529085604.GA499186@bruegel.RZ.TU-Ilmenau.DE \
    --to=paul.stoeber@stud.tu-ilmenau.de \
    /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.