From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r100961: Enable ICANON (Bug#6771). Any long line problem must be solved differently. Date: Wed, 04 Aug 2010 17:56:27 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1281022240 15670 80.91.229.12 (5 Aug 2010 15:30:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 5 Aug 2010 15:30:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Jan D." Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 05 17:30:37 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Oh2Oz-00027i-8o for ged-emacs-devel@m.gmane.org; Thu, 05 Aug 2010 17:30:37 +0200 Original-Received: from localhost ([127.0.0.1]:55128 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oh2Oy-0002cQ-Er for ged-emacs-devel@m.gmane.org; Thu, 05 Aug 2010 11:30:36 -0400 Original-Received: from [140.186.70.92] (port=52339 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oh25N-0005ug-TJ for emacs-devel@gnu.org; Thu, 05 Aug 2010 11:10:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oh25H-00055Q-V6 for emacs-devel@gnu.org; Thu, 05 Aug 2010 11:10:21 -0400 Original-Received: from impaqm5.telefonica.net ([213.4.138.5]:22523) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oh25H-000550-8b for emacs-devel@gnu.org; Thu, 05 Aug 2010 11:10:15 -0400 Original-Received: from IMPmailhost3.adm.correo ([10.20.102.124]) by IMPaqm5.telefonica.net with bizsmtp id qX9R1e0082h2L9m3RYw9Hg; Thu, 05 Aug 2010 10:56:09 +0200 Original-Received: from ceviche.home ([83.61.38.247]) by IMPmailhost3.adm.correo with BIZ IMP id qYw81e00J5KwfZf1jYw9q2; Thu, 05 Aug 2010 10:56:09 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Original-Received: by ceviche.home (Postfix, from userid 20848) id B3DC666125; Thu, 5 Aug 2010 10:56:08 +0200 (CEST) In-Reply-To: (Jan D.'s message of "Mon, 02 Aug 2010 09:03:12 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:128285 Archived-At: I agree with the commit that reverts my ICANON change. Yet: > There is AFAIK no bug report or test case for the long line problem. AFAIK, the missing bug-report is the one that shows the ills of sending EOFs, while the bug-report for long-lines is bug#6149, which should be re-opened. > + /* There is no more "send eof to flush" going on (which is wrong and > + unportable in itself), and disabling ICANON breaks a lot of stuff > + and shows literal ^D in many cases. The correct way to handle too > + much output is to buffer what could not be written and then write it > + again when select returns ok for writing. Could you spell out more precisely how it's different from what we do now: we already check emacs_write's output to see if the buffer is full, in which case we wait, don't we? > + s.main.c_lflag |= ICANON; /* Enable line editing and eof processing */ > + s.main.c_cc[VEOF] = 'D'&037; /* Control-D */ > s.main.c_cc[VMIN] = 1; > s.main.c_cc[VTIME] = 0; IIUC VMIN and VTIME not only are specific to the non-ICANON mode, but also they use the same slot as some of the other settings (specifically the slots may be shared with VEOL and VEOF, according to my manpage). Stefan