From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: ange-ftp sets TERM=dumb in both its subprocess and emacs' main process
Date: Wed, 24 Dec 2003 11:58:20 -0700 [thread overview]
Message-ID: <3FE9E1CC.8010608@yahoo.com> (raw)
In-Reply-To: 20031223222804.GB19059@pikatoste.homeip.net
Arturo García Ares wrote:
> I'm having the following problem: if I start emacs with the command
> line:
>
> $ emacs -l /ftp@host:.emacs
>
> (that's the method I use to run emacs with my own config from a
> 'foreign' environment, substituting host for the real name)
>
> then the TERM environment variable that the ftp-loaded .emacs sees is
> "dumb" instead of the original setting, and that screws my config. I
> understand that ange-ftp has to set TERM=dumb in it's own process to
> keep the ftp client from cluttering the output with escape sequences,
> but I see that it's also setting TERM=dumb in the main emacs process
> (well, the truth is that only process-environment is changed, *not* the
> real process environment).
The trick is to make that setting local to the ange-ftp process buffer.
ange-ftp-start-process tries to do that, by establishing a temporary
binding of process-environment before calling setenv, but that doesn't
work because setenv destructively modifies the process-environment list
structure.
Here's a patch:
*** emacs-21.3/lisp/net/ange-ftp.el.orig Tue Oct 22 02:14:33 2002
--- emacs-21.3/lisp/net/ange-ftp.el Wed Dec 24 11:56:40 2003
***************
*** 1916,1922 ****
;; but that doesn't work: ftp never responds.
;; Can anyone find a fix for that?
(let ((process-connection-type t)
! (process-environment process-environment)
(buffer (get-buffer-create name)))
(save-excursion
(set-buffer buffer)
--- 1916,1922 ----
;; but that doesn't work: ftp never responds.
;; Can anyone find a fix for that?
(let ((process-connection-type t)
! (process-environment (copy-sequence process-environment))
(buffer (get-buffer-create name)))
(save-excursion
(set-buffer buffer)
--
Kevin Rodgers
next prev parent reply other threads:[~2003-12-24 18:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-23 22:28 ange-ftp sets TERM=dumb in both its subprocess and emacs' main process Arturo García Ares
2003-12-24 18:58 ` Kevin Rodgers [this message]
2003-12-25 6:22 ` Arturo García Ares
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3FE9E1CC.8010608@yahoo.com \
--to=ihs_4664@yahoo.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.