emacs-devel
[Top][All Lists]
Advanced

[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: Steven Tamm
Subject: Re: Emacs 21.3.50.1 (CVS sources) MacOS X tex-mode bug
Date: Mon, 17 Jan 2005 09:41:01 -0800

I checked in this fix.  It seemed like the right thing to do regardless.

As for pty's, there were still some issues with the last few characters of a process being eaten. I can't seem reproduce it now as easily as before, so maybe it was actually solved. If there's a consensus, I can switch it back.

Index: lisp/term/mac-win.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/term/mac-win.el,v
retrieving revision 1.30
diff -u -d -b -w -r1.30 mac-win.el
--- lisp/term/mac-win.el        30 Dec 2004 02:04:31 -0000      1.30
+++ lisp/term/mac-win.el        17 Jan 2005 17:40:12 -0000
@@ -1696,8 +1696,9 @@

 ;; Tell Emacs to use pipes instead of pty's for processes because the
 ;; latter sometimes lose characters.  Pty support is compiled in since
-;; ange-ftp will not work without it.
-(setq process-connection-type nil)
+;; ange-ftp will not work without it.  Fixed with darwin 7 (OS X 10.3).
+(setq process-connection-type
+      (not (string-match "-darwin[0-6]\\." system-configuration)))

 ;; Assume that fonts are always scalable on the Mac.  This sometimes
 ;; results in characters with jagged edges.  However, without it,


-Steven


On Jan 17, 2005, at 8:08 AM, Stefan Monnier wrote:

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


_______________________________________________
Emacs-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-devel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]