From: Steven Tamm <steventamm@mac.com>
Cc: Chip Coldwell <coldwell@frank.harvard.edu>, emacs-devel@gnu.org
Subject: Re: Emacs 21.3.50.1 (CVS sources) MacOS X tex-mode bug
Date: Mon, 17 Jan 2005 09:41:01 -0800 [thread overview]
Message-ID: <F4600293-68AE-11D9-84F9-000D93B67DC4@mac.com> (raw)
In-Reply-To: <jwv8y6s59nt.fsf-monnier+emacs@gnu.org>
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
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel
next prev parent reply other threads:[~2005-01-17 17:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-17 0:34 Emacs 21.3.50.1 (CVS sources) MacOS X tex-mode bug Chip Coldwell
2005-01-17 16:08 ` Stefan Monnier
2005-01-17 17:41 ` Steven Tamm [this message]
2005-01-17 18:59 ` Stefan Monnier
2005-01-18 4:08 ` Steven Tamm
2005-01-18 11:14 ` YAMAMOTO Mitsuharu
2005-01-18 17:31 ` Steven Tamm
2005-02-25 6:19 ` YAMAMOTO Mitsuharu
2005-01-19 0:49 ` Richard Stallman
2005-01-19 19:16 ` Steven Tamm
2005-01-20 21:32 ` Richard Stallman
2005-01-21 6:20 ` Nozomu Ando
2005-01-21 19:40 ` Steven Tamm
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=F4600293-68AE-11D9-84F9-000D93B67DC4@mac.com \
--to=steventamm@mac.com \
--cc=coldwell@frank.harvard.edu \
--cc=emacs-devel@gnu.org \
/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).