Hi Masayuki and David, On 2006-02-07 02:56 +0000, Masayuki Ataka wrote: > Hi, > > Ikumi-San reported me that preview-latex put preview-image in > wrong place, if the buffer coding system is different from process > coding system (Hmm, Japanese have 3 coding system Xp). > > He sent me a patch below. > This patch works fine with Japanese document. > I want to know this works fine with document in European languages. > If ok, I will commit. > > thanks, > --- > email: [email protected] > Name:: Masayuki Ataka // (Japan) > > --- preview/preview.el-11.82 Sun Sep 25 04:15:55 2005 > +++ preview/preview.el Sun Jan 22 23:49:03 2006 > @@ -2583,7 +2583,10 @@ > string (substring string (match-end 0)))) > (setq output (concat output (regexp-quote string))) > (if (featurep 'mule) > - (decode-coding-string output buffer-file-coding-system) > + (decode-coding-string output > + (or (and (boundp > 'TeX-japanese-process-output-coding-system) > + > TeX-japanese-process-output-coding-system) > + buffer-file-coding-system)) > output))) > > (defun preview-parse-messages (open-closure) > @@ -3424,8 +3427,10 @@ > (setq TeX-sentinel-function 'preview-TeX-inline-sentinel) > (when (featurep 'mule) > (setq preview-coding-system > - (with-current-buffer commandbuff > - buffer-file-coding-system)) > + (or (and (boundp 'TeX-japanese-process-output-coding-system) > + TeX-japanese-process-output-coding-system) > + (with-current-buffer commandbuff > + buffer-file-coding-system))) > (when preview-coding-system > (setq preview-coding-system > (preview-buffer-recode-system
I read the post above and noted that the patch has been applied. I think it is not a good idea. The patch is not a general approach to handle different encodings. It is a hack to force AUCTeX to work in Japanese encoding. Secondly, isn't it better for the user to add %% Local Variables: %% coding: iso-2022-jp %% End: or any other encodings in their .tex files? And if that encoding is preferred maybe even: (prefer-coding-system 'iso-2022-jp) What do you guys think? Best wishes, Leo -- .: Leo :. [ sdl.web AT gmail.com ] .: I use Emacs :. _______________________________________________ auctex-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/auctex-devel
