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

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

Re: Real unibyte files


From: Eduardo Nahum Ochs
Subject: Re: Real unibyte files
Date: Wed, 25 Oct 2000 23:40:42 -0200

> From: "Eli Zaretskii" <eliz@is.elta.co.il>
> Date: Wed, 25 Oct 2000 21:22:03 +0200
>
> > The problem is that neither the "raw-text" or the "no-conversion"
> > codings are exactly unibyte modes; if you place the cursor on a char
> > 174 or 175 and do a "C-x =" (or "C-u C-x ="), at least on my Emacs
> > 20.7.2, you see that they are reported as chars 2048+174 or 2048+175
> 
> ???  I cannot reproduce this: when I type this:
> 
>      C-x RET c no-conversion RET C-x C-f file-with-175 RET
>      C-u C-x =
> 
> I see 175, not something else.
> 
> no-conversion *is* a unibyte mode; raw-text isn't.
> 
> You should also be able to put a "unibyte: t" in the file local
> variable section.

Sorry, it was my fault; I'll tell to whole story, as some people on
the list may find it interesting (I hope). I was thinking that I had
to put every non-numeric value for a variable in the "Local
Variables:" list inside double quotes, and so I was trying something
like this (with "<<" and ">>" replaced by chars 174 and 175):

cd /tmp/
cat > file-with-175 <<'---'
  # Local Variables:
  # ee-anchor-format: "<<%s>>"
  # coding:           "raw-text"
  # End:
---
(unset EMACS_UNIBYTE; emacs -nw file-with-175)

When I changed the "coding:" line to

  # coding:           raw-text

everything started to work. What lead me to believe that I needed the
double quotes was that the following "Local Variables:" block wasn't
working as I expected:

cd /tmp/
cat > argh <<'---'
  # Local Variables:
  # ee-temp-bounded-function: eediag-bounded
  # End:
---
emacs -nw argh

and the problem was that I was always opening the "argh"-like file
with a function that displayed something else in the minibuffer, and I
was running as root, so I managed to miss the message that said
"Ignoring `eval:' in the local variables list"...

Some hours after your reply I got to the point of single-stepping
through `hack-one-local-variable' with:

  (defun foo ()
    (hack-one-local-variable 'ee-temp-bounded-function 'eediag-bounded))
  (debug-on-entry 'foo)
  (foo)

and I found the problem. Adding the line

  (put 'ee-temp-bounded-function 'safe-local-variable t)

after the definition of `ee-temp-bounded-function' in the library that
defined it solved the problem.

  Many thanks, and cheers again,

    Eduardo Ochs
    http://angg.twu.net/
    edrx@inx.com.br


P.S.: BTW, adding "unibyte: t" to the local variables list does not
work, but that's not important.



reply via email to

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