From: Kenichi Handa <handa@etl.go.jp>
Cc: emacs-devel@gnu.org
Subject: Re: saving compositions or not
Date: Wed, 28 Aug 2002 21:17:33 +0900 (JST) [thread overview]
Message-ID: <200208281217.VAA01425@etlken.m17n.org> (raw)
In-Reply-To: <200208280043.g7S0hIA32094@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu)
In article <200208280043.g7S0hIA32094@rum.cs.yale.edu>, "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes:
> I've been using my silly "lambda hack" (posted on gnu.emacs.sources
> a little while back) and have noticed that it has an unintended
> consequence: because it uses compositions (to turn the `lambda'
> keyword into a lambda letter from the greek alphabet) it ends up
> modifying the file if the file is saved in emacs-mule format (which
> is the format naturally chosen by Emacs for those files it seems).
If your file doesn't contain any non-ascii chars except in
compositions, I don't know why emacs-mule is naturally
chosen. Or, do you actually inserts non-ASCII chars of
several charsets?
> That is, the composition itself is saved, so the file still works,
> but it unexpectedly still appears with a lambda-char rather than
> a lambda-keyword if you load it in `emacs -q --no-site-file'.
> Up until here, I could consider it a feature, except that it means
> that the file will look odd in a non-Emacs editor (because it
> uses the emacs-mule coding-system rather than plain ASCII)
> and (more importantly) that `cvs diff' will show that the file has
> changed, replacing the lambda keyword with a lambda char composition.
> How could I change my hack such that the composition is *not* saved
> (i.e. is kept as a display-only trick which has no impact whatsoever on
> the saved buffer) ?
Currently, the coding system emacs-mule is hardcoded to
handle composition. But, many coding systems
(e.g. iso-latin-*, utf-8) doesn't handle composition. So,
using one of them will solve your problem.
But, if you really inserts non-ASCII chars of many charsets
in your file, and thus non of above is useless, you can use
iso-latin-X-with-esc.
You can also make a coding system something like this and
use it.
(make-coding-system
'iso-2022-7bit-no-composition 2 ?J
"Like iso-2022-7bit bug doesn't preserve information of compositions."
'((ascii t) nil nil nil
short ascii-eol ascii-cntl seven)
'((safe-charsets . t)))
---
Ken'ichi HANDA
handa@etl.go.jp
prev parent reply other threads:[~2002-08-28 12:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-28 0:43 saving compositions or not Stefan Monnier
2002-08-28 12:17 ` Kenichi Handa [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=200208281217.VAA01425@etlken.m17n.org \
--to=handa@etl.go.jp \
--cc=emacs-devel@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.