unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* emacs misbehaves without --unibyte
@ 2002-05-28 20:08 Paul Stoeber
  2002-05-28 21:40 ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Paul Stoeber @ 2002-05-28 20:08 UTC (permalink / raw)


Miles Bader miles@gnu.org on Tue, 28 May 2002 16:49:04 GMT:
> It should work fine if you've set the languange environment correctly
> (so it knows what the non-ASCII characters are), e.g. by using
> `set-language-environment', or having an appropriate setting of LANG.

That means, my LANG=C is inappropriate for emacs.

I don't care about l10n/i18n (that's what LANG=C should convey to programs),
and I want to steer through alien filesystems and text/binary files gracefully
(e.g. using octal escapes).

In its default usage, emacs doesn't meet this requirement---it doesn't have
the robust 8-bit cleanness of bash, nvi, perl and most other unix tools.

But I guess that's okay, it's just different from the tools I'm used to, and
it was very irritating until I found one possible fix (--unibyte).

Neither (setq set-language-environment "Latin-1") nor
(setq file-name-coding-system 'latin-1) creates an 8-bit clean
environment.  Trying to open the file $'gr\200\340ve' in dired opens
$'gr\236\240\201\340ve' instead.

^ permalink raw reply	[flat|nested] 12+ messages in thread
* emacs misbehaves without --unibyte
@ 2002-05-28 16:12 Paul Stoeber
  2002-05-28 16:49 ` Miles Bader
  0 siblings, 1 reply; 12+ messages in thread
From: Paul Stoeber @ 2002-05-28 16:12 UTC (permalink / raw)


In GNU Emacs 21.2.1 (powerpc-unknown-linux-gnu)
 of 2002-05-26 on xyz
configured using `configure  --prefix=/e --without-x'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Built without modification from
MD5:f4b58e5c2d923fc92495e0c2f167c5db URL:ftp://ftp.cs.tu-berlin.de/pub/gnu/emacs/emacs-21.2.tar.gz


In bash in my home directory:

q@xyz:~$ echo gr340ve > $'gr\340ve'
q@xyz:~$ /e/bin/emacs --eval '(dired "~/")'

Now in dired, I go to the file `gr?ve' and type RET.  The message line
says "File no longer exists; type `g' to update Dired buffer".  (I think
it should have opened the file.)   C-x C-c.

q@xyz:~$ rm gr?ve
q@xyz:~$ mkdir -p $'gr\340ve'/x/y/z
q@xyz:~$ /e/bin/emacs --eval '(dired "~/")'

Now in dired, I go to the directory `gr?ve' and type RET.  The message line
says "File no longer exists; type `g' to update Dired buffer".  (I think
it should have changed into the directory.  Now I can't browse the directory
tree below `gr?ve'.  This is a grave limitation.)   C-x C-c.

q@xyz:~$ rm -rf gr?ve
q@xyz:~$ echo gr340ve > $'gr\340ve'
q@xyz:~$ /e/bin/emacs --eval '(dired "~/")'

Now in dired, I go to the file `gr?ve' and type the `a' key.  There's an
_empty_ buffer with the name `gr?ve' in its status line.  (The file
$'gr\340ve' contains the string "gr340ve", but due to the first
experiment I'm not surprised.)  X X X RET C-x C-s C-x C-c.

q@xyz:~$ ls gr* | cat -vet
grM-^AM-`ve$
grM-`ve$
q@xyz:~$ cat $'gr\201\340ve'
XXX
q@xyz:~$ 

Is that supposed to happen?

Everything is fine if I run emacs as `/e/bin/emacs --unibyte'.  If multibyte
support is so intrusive, shouldn't --unibyte be the default?  I think all
sites that have some 8-bit filenames will need it.  If you don't decide to make
it the default, maybe it should be mentioned in `(efaq) Bugs and problems'.

Last but not least:

q@xyz:~$ rm gr?ve gr??ve
q@xyz:~$ echo gr200340ve > $'gr\200\340ve'  # that's two-oh-oh, not 201
q@xyz:~$ echo gr340ve > $'gr\340ve'
q@xyz:~$ /e/bin/emacs --eval '(dired "~/")'

The last two lines of an otherwise cleared screen:

Fatal error (11).Segmentation fault
q@xyz:~$

Using --unibyte fixes this too.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2002-05-31 21:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2002-05-29  8:58         ` Eli Zaretskii
     [not found]         ` <Pine.SUN.3.91.1020529115904.29375B@is>
2002-05-29 13:13           ` Paul Stoeber
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

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).