diff README.multi-tty @ 83421:bb2edc915032

Implement automatic terminal-local environment variables via `local-environment-variables'. * lisp/env.el (setenv, getenv): Add optional terminal parameter. Update docs. (setenv): Handle `local-environment-variables'. (read-envvar-name): Also allow (and complete) local environment variables on the current terminal. * src/callproc.c: Include frame.h and termhooks.h, for terminal parameters. (Qenvironment): New constant. (Vlocal_environment_variables): New variable. (syms_of_callproc): Register and initialize them. (child_setup): Handle Vlocal_environment_variables. (getenv_internal): Add terminal parameter. Handle Vlocal_environment_variables. (Fgetenv_internal): Add terminal parameter. * src/termhooks.h (get_terminal_param): Declare. * src/Makefile.in (callproc.o): Update dependencies. * mac/makefile.MPW (callproc.c.x): Update dependencies. * lisp/termdev.el (terminal-id): Make parameter optional. (terminal-getenv, terminal-setenv, with-terminal-environment): Disable functions. * lisp/mule-cmds.el (set-locale-environment): Convert `terminal-getenv' calls to `getenv'. * lisp/rxvt.el (rxvt-set-background-mode): Ditto. * lisp/x-win.el (x-initialize-window-system): Ditto. * lisp/xterm.el (terminal-init-xterm): Ditto. * lisp/server.el (server-process-filter): Fix reference to the 'display frame parameter. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-461
author Karoly Lorentey <lorentey@elte.hu>
date Mon, 26 Dec 2005 02:14:10 +0000
parents 521d3f18b3d1
children 1f5d64c4df6f
line wrap: on
line diff
--- a/README.multi-tty	Sun Dec 25 20:06:58 2005 +0000
+++ b/README.multi-tty	Mon Dec 26 02:14:10 2005 +0000
@@ -401,28 +401,10 @@
 THINGS TO DO
 ------------
 
-** Implement automatic forwarding of client environment variables to
-   forked processes, as discussed on the multi-tty list.  Terminal
-   parameters are now accessible in C code, so the biggest obstacle is
-   gone.  The `getenv_internal' and `child_setup' functions in
-   callproc.c must be changed to support the following variable:
-
-	terminal-local-environment-variables is a variable defined in ...
-
-	Enable or disable terminal-local environment variables.
-
-	If set to t, `getenv', `setenv' and subprocess creation
-	functions use the environment variables of the emacsclient
-	process that created the selected frame, ignoring
-	`process-environment'.
-
-	If set to nil, Emacs uses `process-environment' and ignores
-	the client environment.
-
-	Otherwise, `terminal-local-environment-variables' should be a
-	list of variable names (represented by Lisp strings) to look
-	up in the client environment.  The rest will come from
-	`process-environment'.
+** Trouble: `setenv' doesn't actually set environment variables in the
+   Emacs process.  This defeats the purpose of the elaborate
+   `server-with-environment' magic around the `tgetent' call in
+   `init_tty'.  D'oh.
 
 ** (Possibly) create hooks in struct device for creating frames on a
    specific terminal, and eliminate the hackish terminal-related frame
@@ -1348,5 +1330,33 @@
 
    (Disabled in patch-450.)
 
+-- Implement automatic forwarding of client environment variables to
+   forked processes, as discussed on the multi-tty list.  Terminal
+   parameters are now accessible in C code, so the biggest obstacle is
+   gone.  The `getenv_internal' and `child_setup' functions in
+   callproc.c must be changed to support the following variable:
+
+	terminal-local-environment-variables is a variable defined in ...
+
+	Enable or disable terminal-local environment variables.
+
+	If set to t, `getenv', `setenv' and subprocess creation
+	functions use the environment variables of the emacsclient
+	process that created the selected frame, ignoring
+	`process-environment'.
+
+	If set to nil, Emacs uses `process-environment' and ignores
+	the client environment.
+
+	Otherwise, `terminal-local-environment-variables' should be a
+	list of variable names (represented by Lisp strings) to look
+	up in the client environment.  The rest will come from
+	`process-environment'.
+
+   (Implemented in patch-461; `terminal-getenv', `terminal-setenv' and
+   `with-terminal-environment' are now replaced by extensions to
+   `getenv' and `setenv', and the new `local-environment-variables'
+   facility.  Yay!)
+
 ;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d