unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Davis Herring <herring@lanl.gov>
Cc: Andreas Schwab <schwab@suse.de>,
	Peter Heslin <usenet@heslin.eclipse.co.uk>,
	emacs-devel@gnu.org
Subject: Re: (getenv "TERM") always returns "dumb"
Date: Tue, 31 Aug 2004 14:11:48 -0600 (MDT)	[thread overview]
Message-ID: <Pine.LNX.4.44.0408311312170.31548-100000@x-mail.lanl.gov> (raw)
In-Reply-To: <m13c23e8ks.fsf-monnier+emacs@gnu.org>

> I still think the change is basically right, but I agree that we should
> probably revert it since noone seems to have the time or inclination to do
> the additional necessary changes (i.e. keep TERM set until after running
> the terminal-specific config file and stash the original TERM value
> somewhere so that a new `terminal-type' function can return it to code that
> needs it).

How about a variable `process-terminal-type' (default: "dumb") that is
automatically subbed into `process-environment' when starting a
subprocess?  This would be best done in `child_setup' (callproc.c) like
PWD is now, but it could even be done in Lisp.  Several packages already
do tricks like this (`man.el' let-binds `process-environment' to do
exactly this; `comint.el' let-binds it to a constructed sequence with new
TERM settings), so it shouldn't cause any problems.  However, that would
necessitate a(nother) wrapper layer for `start-process', `call-process',
and `call-process-region'.

On the subject of PWD in callproc.c, why are some environment references 
done with egetenv() and others with plain getenv()?  There are no comments 
describing the inconsistency, and while I can understand wanting the 
"original" value of a variable (particularly in uses where Lisp is not 
aware that the environment is being consulted, so there are no issues of 
surprise), there is not even consistency among the uses of single 
variables (like TMPDIR).

Davis Herring

-- 
This product is sold by volume, not by mass.  If it seems too dense or too 
sparse, it means mass-energy conversion has occurred during shipping.

  parent reply	other threads:[~2004-08-31 20:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-31  0:21 (getenv "TERM) always returns "dumb" Peter Heslin
2004-08-31  9:30 ` Andreas Schwab
2004-08-31 13:35   ` Stefan
2004-08-31 19:57     ` Peter Heslin
2004-08-31 20:11     ` Davis Herring [this message]
2004-09-01 19:24       ` (getenv "TERM") " Richard Stallman
2004-09-02  9:06         ` Kai Grossjohann
2004-09-03 17:24           ` Richard Stallman
2004-09-03 18:16             ` Stefan Monnier
2004-09-03 22:34               ` Juri Linkov
2004-09-04 22:12               ` Richard Stallman
2004-09-06 16:09                 ` Stefan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0408311312170.31548-100000@x-mail.lanl.gov \
    --to=herring@lanl.gov \
    --cc=emacs-devel@gnu.org \
    --cc=schwab@suse.de \
    --cc=usenet@heslin.eclipse.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).