Mercurial > emacs
comparison man/mule.texi @ 46912:487968d71def
Explain how C-x RET f and C-x RET c affect saving.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 15 Aug 2002 20:30:32 +0000 |
parents | b3a9c5fdc73a |
children | 23a1cea22d13 |
comparison
equal
deleted
inserted
replaced
46911:ed736029584b | 46912:487968d71def |
---|---|
894 In cases where Emacs does not automatically choose the right coding | 894 In cases where Emacs does not automatically choose the right coding |
895 system, you can use these commands to specify one: | 895 system, you can use these commands to specify one: |
896 | 896 |
897 @table @kbd | 897 @table @kbd |
898 @item C-x @key{RET} f @var{coding} @key{RET} | 898 @item C-x @key{RET} f @var{coding} @key{RET} |
899 Use coding system @var{coding} for the visited file | 899 Use coding system @var{coding} for saving or revisiting the visited |
900 in the current buffer. | 900 file in the current buffer. |
901 | 901 |
902 @item C-x @key{RET} c @var{coding} @key{RET} | 902 @item C-x @key{RET} c @var{coding} @key{RET} |
903 Specify coding system @var{coding} for the immediately following | 903 Specify coding system @var{coding} for the immediately following |
904 command. | 904 command. |
905 | 905 |
922 selection---the next one---to or from the window system. | 922 selection---the next one---to or from the window system. |
923 @end table | 923 @end table |
924 | 924 |
925 @kindex C-x RET f | 925 @kindex C-x RET f |
926 @findex set-buffer-file-coding-system | 926 @findex set-buffer-file-coding-system |
927 The command @kbd{C-x @key{RET} f} (@code{set-buffer-file-coding-system}) | 927 The command @kbd{C-x @key{RET} f} |
928 specifies the file coding system for the current buffer---in other | 928 (@code{set-buffer-file-coding-system}) sets the file coding system for |
929 words, which coding system to use when saving or rereading the visited | 929 the current buffer---in other words, it says which coding system to |
930 file. You specify which coding system using the minibuffer. Since this | 930 use when saving or reverting the visited file. You specify which |
931 command applies to a file you have already visited, it affects only the | 931 coding system using the minibuffer. If you specify a coding system |
932 way the file is saved. | 932 that cannot handle all of the characters in the buffer, Emacs warns |
933 you about the troublesome characters when you actually save the | |
934 buffer. | |
933 | 935 |
934 @kindex C-x RET c | 936 @kindex C-x RET c |
935 @findex universal-coding-system-argument | 937 @findex universal-coding-system-argument |
936 Another way to specify the coding system for a file is when you visit | 938 Another way to specify the coding system for a file is when you visit |
937 the file. First use the command @kbd{C-x @key{RET} c} | 939 the file. First use the command @kbd{C-x @key{RET} c} |
940 the specified coding system is used for @emph{the immediately following | 942 the specified coding system is used for @emph{the immediately following |
941 command}. | 943 command}. |
942 | 944 |
943 So if the immediately following command is @kbd{C-x C-f}, for example, | 945 So if the immediately following command is @kbd{C-x C-f}, for example, |
944 it reads the file using that coding system (and records the coding | 946 it reads the file using that coding system (and records the coding |
945 system for when the file is saved). Or if the immediately following | 947 system for when you later save the file). Or if the immediately following |
946 command is @kbd{C-x C-w}, it writes the file using that coding system. | 948 command is @kbd{C-x C-w}, it writes the file using that coding system. |
947 Other file commands affected by a specified coding system include | 949 When you specify the coding system for saving in this way, instead |
948 @kbd{C-x C-i} and @kbd{C-x C-v}, as well as the other-window variants of | 950 of with @kbd{C-x @key{RET} f}, there is no warning if the buffer |
949 @kbd{C-x C-f}. | 951 contains characters that the coding system cannot handle. |
950 | 952 |
951 @kbd{C-x @key{RET} c} also affects commands that start subprocesses, | 953 Other file commands affected by a specified coding system include |
952 including @kbd{M-x shell} (@pxref{Shell}). | 954 @kbd{C-x C-i} and @kbd{C-x C-v}, as well as the other-window variants |
953 | 955 of @kbd{C-x C-f}. @kbd{C-x @key{RET} c} also affects commands that |
954 However, if the immediately following command does not use the coding | 956 start subprocesses, including @kbd{M-x shell} (@pxref{Shell}). |
955 system, then @kbd{C-x @key{RET} c} ultimately has no effect. | 957 |
958 If the immediately following command does not use the coding system, | |
959 then @kbd{C-x @key{RET} c} ultimately has no effect. | |
956 | 960 |
957 An easy way to visit a file with no conversion is with the @kbd{M-x | 961 An easy way to visit a file with no conversion is with the @kbd{M-x |
958 find-file-literally} command. @xref{Visiting}. | 962 find-file-literally} command. @xref{Visiting}. |
959 | 963 |
960 @vindex default-buffer-file-coding-system | 964 @vindex default-buffer-file-coding-system |