* prompt: "Select one of these safe coding systems"
@ 2002-11-24 19:19 D. Goel
2002-11-24 20:11 ` Hubert Chan
2002-11-25 6:02 ` Eli Zaretskii
0 siblings, 2 replies; 5+ messages in thread
From: D. Goel @ 2002-11-24 19:19 UTC (permalink / raw)
hi
Here, emacs (21.2) always prompts for a "safe" coding system (when
trying to save the bdbb file)--->
,----
|
| These default coding systems were tried:
| iso-2022-7bit-unix iso-latin-1
| However, none of them safely encodes the target text.
|
| Select one of the following safe coding systems:
| utf-8 raw-text emacs-mule no-conversion.
`----
So, I tried to set-language-environment (used to be english) to
Latin-1, but emacs continued to prompt the first option being utf-8.
So, I tried to setq default-buffer-file-coding-system to 'utf-8, but
emacs still continued to show the same prompt.
I then tried the same coding-system utf-8 with english as well, but
still got the same prompt.
So
[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?
[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?
[3] Any other hints or workarounds, considering this situation?
I really want to get rid of this prompt :(, esp. since the prompt
shows up for not me but for an infobot, which is supposed to be run
noninteractively. 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. The main problem is that the bot gets stuck
in the minibuffer which is really bad for other bot functions. BTW,
FWIW, emacs is running in console for the bot.
Thanks for any hints.
DG http://deego.gnufans.org/~deego/
--
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: prompt: "Select one of these safe coding systems"
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
1 sibling, 1 reply; 5+ messages in thread
From: Hubert Chan @ 2002-11-24 20:11 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 1021 bytes --]
>>>>> "D" == D Goel <deego@gnufans.org> writes:
D> hi Here, emacs (21.2) always prompts for a "safe" coding system (when
D> trying to save the bdbb file)--->
D> ,----
D> |
D> | These default coding systems were tried: | iso-2022-7bit-unix
D> iso-latin-1 | However, none of them safely encodes the target text.
D> |
D> | Select one of the following safe coding systems: | utf-8 raw-text
D> emacs-mule no-conversion. `----
D> So, I tried to set-language-environment (used to be english) to
D> Latin-1, but emacs continued to prompt the first option being utf-8.
D> So, I tried to setq default-buffer-file-coding-system to 'utf-8, but
D> emacs still continued to show the same prompt.
[...]
It seems BBDB uses its own variable:
(setq bbdb-file-coding-system 'utf-8)
--
Hubert Chan <hubert@uhoreg.ca> - http://www.uhoreg.ca/
PGP/GnuPG key: 1024D/124B61FA
Fingerprint: 96C5 012F 5F74 A5F7 1FF7 5291 AF29 C719 124B 61FA
Key available at wwwkeys.pgp.net. Encrypted e-mail preferred.
[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: prompt: "Select one of these safe coding systems"
2002-11-24 20:11 ` Hubert Chan
@ 2002-11-24 21:33 ` D. Goel
0 siblings, 0 replies; 5+ messages in thread
From: D. Goel @ 2002-11-24 21:33 UTC (permalink / raw)
Hubert Chan <hubert@uhoreg.ca> writes:
>
> It seems BBDB uses its own variable:
>
> (setq bbdb-file-coding-system 'utf-8)
That did solve my problem. Thanks a lot Hubart.
(Answers to the general problem of getting emacs to not prompt for
"safe" coding system are still welcome :-)
DG http://deego.gnufans.org/~deego/
--
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: prompt: "Select one of these safe coding systems"
2002-11-24 19:19 prompt: "Select one of these safe coding systems" D. Goel
2002-11-24 20:11 ` Hubert Chan
@ 2002-11-25 6:02 ` Eli Zaretskii
1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2002-11-25 6:02 UTC (permalink / raw)
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: prompt: "Select one of these safe coding systems"
[not found] <mailman.1038204262.25648.help-gnu-emacs@gnu.org>
@ 2002-11-25 12:01 ` D. Goel
0 siblings, 0 replies; 5+ messages in thread
From: D. Goel @ 2002-11-25 12:01 UTC (permalink / raw)
Eli Zaretskii <eliz@is.elta.co.il> writes:
> 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.
ahh, i was not using that. I was trying to setq
default-buffer-coding-system.
Thanks for all your other hints, Eli. Will try those out.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-11-25 12:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
[not found] <mailman.1038204262.25648.help-gnu-emacs@gnu.org>
2002-11-25 12:01 ` D. Goel
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.