From: Eli Zaretskii <eliz@is.elta.co.il>
Subject: Re: prompt: "Select one of these safe coding systems"
Date: Mon, 25 Nov 2002 08:02:54 +0200 (IST) [thread overview]
Message-ID: <Pine.SUN.3.91.1021125075557.9888B-100000@is> (raw)
In-Reply-To: <87smxqzsfw.fsf@computer.localdomain>
On 24 Nov 2002, D. Goel wrote:
> [1] It seems I cannot get emacs to follow a system I want (utf-8) by
> default. It still tries other systems and then shows me utf-8 among
> the list of choices. What am i doing wrong?
How did you try to achieve that? The right way is to use
prefer-coding-system, I think.
> [2] If emacs cannot "safely" encode, how do i ask it to please not
> prompt me, but simply select the first from the "safe" "alternatives"
> shows me?
IIRC, you can't. Wrong encoding is deemed a disaster (because it could
lose information and corrupt your precious files), so Emacs always prompts.
The only exception is when the buffer's coding-system is undecided and
the buffer can be encoded using the language environment's default
encoding. For example, if you start with a pure-ASCII text and then add
Latin-1 characters to it, and your language environment is Latin-1, then
Emacs will silently use Latin-1 encoding when you save the text.
> [3] Any other hints or workarounds, considering this situation?
> I really want to get rid of this prompt :(
Just don't type characters that cannot be encoded with the buffer's
file-coding-system ;-)
> esp. since the prompt
> shows up for not me but for an infobot, which is supposed to be run
> noninteractively.
Non-interactive Lisp programs can bind coding-system-for-write to
something appropriate before they invoke functions that write to files.
> I don't care too much how it stores any
> international characters that may have shown up, as long as it stores
> the 99.9% english part just fine---i just want emacs to select
> somethigng and just do it.
If the encoding of non-ASCII characters _really_ doesn't matter (but
please think carefully about this and make a few experiments before you
decide, since the results might surprise you), then bind
coding-system-for-write to raw-text.
next prev parent reply other threads:[~2002-11-25 6:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-24 19:19 prompt: "Select one of these safe coding systems" D. Goel
2002-11-24 20:11 ` Hubert Chan
2002-11-24 21:33 ` D. Goel
2002-11-25 6:02 ` Eli Zaretskii [this message]
[not found] <mailman.1038204262.25648.help-gnu-emacs@gnu.org>
2002-11-25 12:01 ` D. Goel
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=Pine.SUN.3.91.1021125075557.9888B-100000@is \
--to=eliz@is.elta.co.il \
/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.