[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs 21.3.50.1 (CVS sources) MacOS X tex-mode bug
From: |
Stefan Monnier |
Subject: |
Re: Emacs 21.3.50.1 (CVS sources) MacOS X tex-mode bug |
Date: |
Mon, 17 Jan 2005 11:08:16 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) |
> The function creates a shell using "make-comint", then waits for the
> shell to start in the loop at the bottom. Presumably, when the shell
> has started, it will issue a prompt and the (buffer-size) procedure
> will return non-zero and break out of the loop. The problem is that
> it never does.
> I am informed by Andreas Schwab that ptys are broken on Mac OS X, and
> therefore process-connection-type is set to nil so instead of allocating
> a pseudo-terminal to communicate with the sub-process emacs uses a pipe.
> The shell discovers that its not connected to a terminal and runs as
> non-interactive, suppressing the prompts and causing the infinite loop
> I describe above.
AFAIK the "broken tty" issue was solved a while back (somewhere around 10.3)
and I thought we had reverted process-connection-type's default to t.
But indeed I see in lisp/term/mac-win.el that we still set
process-connection-type to nil. Shouldn't we remove it, or at least make it
depend on the OS's version?
> --- emacs/lisp/textmodes/tex-mode.el.~1.153.~ Sat Dec 11 17:00:38 2004
> +++ emacs/lisp/textmodes/tex-mode.el Sun Jan 16 13:59:50 2005
> @@ -1495,7 +1495,8 @@
> (make-comint
> "tex-shell"
> (or tex-shell-file-name (getenv "ESHELL") shell-file-name)
> - nil)
> + nil
> + "-i")
> (let ((proc (get-process "tex-shell")))
> (set-process-sentinel proc 'tex-shell-sentinel)
> (set-process-query-on-exit-flag proc nil)
> This adds the "-i" switch to the command line that exec's the shell, causing
> it to run interactively.
> I have tested this on Mac OS X and it did solve the problem. A very similar
> "-i" switch appears in lisp/shell.el ("M-x shell").
Indeed, shell uses the same trick. So I guess it's OK to do it in tex-shell
as well. If anybody wants to install that patch, please do it for me.
Stefan
Re: Emacs 21.3.50.1 (CVS sources) MacOS X tex-mode bug, Richard Stallman, 2005/01/18