[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs AngeFTP fails on macOS 10.14 with GNU inetutils FTP
From: |
Alex Bochannek |
Subject: |
Re: Emacs AngeFTP fails on macOS 10.14 with GNU inetutils FTP |
Date: |
Tue, 25 May 2021 18:34:15 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) |
Alex Bochannek <alex@bochannek.com> writes:
> I keep debugging what's going on there. I have found an interesting,
> platform-dependent behavior in Emacs that may or may not be related to
> this problem.
I was looking at what Bash and tnftp do when they run in an Emacs
comint-mode (shell and ange-ftp, respectively) and the below seems to be
the easiest fix. It's more or less directly copied from tnftp.
diff --git a/ftp/main.c b/ftp/main.c
index 1edffd47..f284c28c 100644
--- a/ftp/main.c
+++ b/ftp/main.c
@@ -217,6 +217,7 @@ main (int argc, char *argv[])
int index;
struct passwd *pw = NULL;
char *cp;
+ int dumbterm;
set_program_name (argv[0]);
@@ -253,12 +254,19 @@ main (int argc, char *argv[])
argc -= index;
argv += index;
+ cp = getenv("TERM");
+ if (cp == NULL || strcmp(cp, "dumb") == 0)
+ dumbterm = 1;
+ else
+ dumbterm = 0;
fromatty = isatty (fileno (stdin));
if (fromatty)
{
verbose++;
if (!prompt)
prompt = DEFAULT_PROMPT;
+ if (dumbterm)
+ usereadline = 0;
}
else
usereadline = 0;
Let me know if you think this is an acceptable fix.
--
Alex.
- Emacs AngeFTP fails on macOS 10.14 with GNU inetutils FTP, Alex Bochannek, 2021/05/19
- Re: Emacs AngeFTP fails on macOS 10.14 with GNU inetutils FTP, Simon Josefsson, 2021/05/21
- Re: Emacs AngeFTP fails on macOS 10.14 with GNU inetutils FTP, Alex Bochannek, 2021/05/24
- Re: Emacs AngeFTP fails on macOS 10.14 with GNU inetutils FTP, Simon Josefsson, 2021/05/24
- Re: Emacs AngeFTP fails on macOS 10.14 with GNU inetutils FTP, Alex Bochannek, 2021/05/24
- Re: Emacs AngeFTP fails on macOS 10.14 with GNU inetutils FTP, Simon Josefsson, 2021/05/25
- Re: Emacs AngeFTP fails on macOS 10.14 with GNU inetutils FTP, Alex Bochannek, 2021/05/25
- Re: Emacs AngeFTP fails on macOS 10.14 with GNU inetutils FTP,
Alex Bochannek <=
- Re: Emacs AngeFTP fails on macOS 10.14 with GNU inetutils FTP, Simon Josefsson, 2021/05/26
- Re: Emacs AngeFTP fails on macOS 10.14 with GNU inetutils FTP, Alex Bochannek, 2021/05/26
- Re: Emacs AngeFTP fails on macOS 10.14 with GNU inetutils FTP, Simon Josefsson, 2021/05/26
- Re: Emacs AngeFTP fails on macOS 10.14 with GNU inetutils FTP, Alex Bochannek, 2021/05/26