Article View: fj.editor.xemacs
Article #319Re: XEmacs からのプリント
From: Seiichi Namba
Date: Fri, 08 Jun 2001 02:25
Date: Fri, 08 Jun 2001 02:25
85 lines
3975 bytes
3975 bytes
The following message is a courtesy copy of an article
that has been posted to fj.editor.xemacs as well.
難波です。プロバイダのサーバの様子がおかしいので Cc: も付けときます。
xemacs topic には口を狭まない、と書いたばかりなんですが、参考になれば。
GGB03631@nifty.ne.jp (Atushi Shinmura) さん writes:
> ---------patern1
> ;;printer setting
> (setq-default lpr-command "lpr")
> (setq-default lpr-switches '("-Plp0"))
> (setq ps-lpr-command "lpr")
> (setq ps-lpr-switches '("-Plp0"))
> (setq ps-paper-type 'ps-a4)
> (setq ps-print-header nil)
> (setq ps-print-header-frame nil)
> (setq ps-font-size 8)
> (setq ps-print-color-p nil)
> (setq ps-wrap-line nil)
こっちは、xemacs 特有だと思うのでよく判らないところがありますが、
> --------patern2
> ;;printer setting
> (setq-default lpr-switches '("-Plp0"))
>
> ;;lisp for prn
> (setq print-command-format "a2ps -p -ns -nh -nt |lpr -Plp0")
> (defun print-region (begin end)
> (interactive "r")
> (shell-command-on-region begin end print-command-format))
> (defun print-buffer ()
> (interactive)
> (print-region (point-min) (point-max)))
> (setq print-function (function print-buffer))
> -------
いずれのケースも process-coding-system まわりの問題に帰結するように
思われます。
もう少し問題を単純化して1つづつ調べたらどうでしょうか。
xemacs を使っていない私でも判りそうな pattern2 の方で話をしますが、まず、
$ < infile.txt a2ps -p -ns -nh -nt |lpr -Plp0
は既にうまく動いていますよね。
また、日本語の書いてあるバッファで、
(shell-command-on-region (point-min) (point-max) "kcc -c") ;; kcc があれば
(shell-command-on-region (point-min) (point-max) "coco -q") ;; coco があれば
(shell-command-on-region (point-min) (point-max) "cat >/tmp/junk")
などとした結果はどうでしょう(3つめのものは、/tmp/junk を find-file
したり cat したりして中身を調べる)。
その前に M-x describe-coding-system RET (そういうのがあれば) で
process-coding-system (そういう名前だったとして) の値を調べる、という
のもあるか。
$ < infile.txt a2ps -p -ns -nh -nt |lpr -Plp0
がうまくいっていて、上の2つめのテストで何らかの日本語らしきコードが
出ていっているのであれば、最もテキトーな workaround としては
(setq print-command-format "nkf | a2ps -p -ns -nh -nt |lpr -Plp0")
などとしてしまう、とか…。
そういえば、もっと細かい話をすれば、
(gs 経由の場合は大丈夫のような気はしますが)
a2ps が utashiro@iij.ad.jp さんの perl バージョンだったとすれば、
;; $jisconvert = 1;
に関する設定も関係あるんでしょうかねえ。
--
難波清一@東京西東京市 (http://www.asahi-net.or.jp/~pi9s-nnb/)
NAMBA Seiichi <sn@asahi-net.email.ne.jp>
Technical Details
Message-ID:
<86y9r37lnj.fsf@thelonious.smoke.or.jp>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed.media.kyoto-u.ac.jp!newsfeed.rim.or.jp!Q.T.Honey!nf.asahi-net.or.jp!not-for-mailReferences:
<m0snhbwyjo.fsf@maria.issui.co>Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS X-Google-Thread: 1107f7,746a6b555fb5d4be X-Google-Attributes: gid1107f7,public X-Google-ArrivalTime: 2001-06-07 19:25:35 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed.media.kyoto-u.ac.jp!newsfeed.rim.or.jp!Q.T.Honey!nf.asahi-net.or.jp!not-for-mail Originator: sn@thelonious.smoke.or.jp Newsgroups: fj.editor.xemacs Subject: Re: XEmacs からのプリント References: <m0snhbwyjo.fsf@maria.issui.co> From: Seiichi Namba <sn@asahi-net.email.ne.jp> Date: 08 Jun 2001 11:25:36 +0900 Organization: Smoke In-Reply-To: <m0snhbwyjo.fsf@maria.issui.co> Message-ID: <86y9r37lnj.fsf@thelonious.smoke.or.jp> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.103 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp Posted-To: fj.editor.xemacs Lines: 85 NNTP-Posting-Host: f079160.ppp.asahi-net.or.jp X-Trace: 991967133 news3.asahi-net.or.jp 14358 211.120.79.160 X-Complaints-To: ap-net@asahi-net.or.jp