[Mew-dist 12946] RE: mew-start-process

KOIE Hidetaka ( 鯉江英隆 ) hide at example.com
2000年 4月 27日 (木) 13:53:59 JST


From: KOIE Hidetaka (鯉江英隆) <hide at example.com>
Subject: [Mew-dist 12914] mew-start-process (was RE: make-frame-on-display)
Date: Fri, 21 Apr 2000 15:13:45 +0900

  | #emacs-20.5/src/callproc.cをみるかぎりは期待した動作するようです。

elisp.infoを読んだら「そういうことをやってもよい」とありました。

    File: elisp,  Node: System Environment

    Operating System Environment
    ============================

     - Command: setenv VARIABLE VALUE
         This command sets the value of the environment variable named
         VARIABLE to VALUE.  Both arguments should be strings.  This
         function works by modifying `process-environment'; binding that
         variable with `let' is also reasonable practice.

また、wrapperは次のように書けそうです。
(defun get-x-display ()
  (if (and (boundp 'mew-xemacs-p) mew-xemacs-p
                       (eq (device-type) 'x))
                  (device-connection)
                (cdr (assq 'display (frame-parameters)))))
(defadvice start-process (around x activate)
  (let ((disp (get-x-display)))
    (setenv "DISPLAY" disp)
    ad-do-it
    ))
(defadvice call-process (around x activate)
  (let ((disp (get-x-display)))
    (setenv "DISPLAY" disp)
    ad-do-it
    ))
(defadvice call-process-region (around x activate)
  (let ((disp (get-x-display)))
    (setenv "DISPLAY" disp)
    ad-do-it
    ))

-
KOIE Hidetaka 鯉江英隆 <hide at example.com>



Mew-dist メーリングリストの案内