From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Mauger Newsgroups: gmane.emacs.devel Subject: Deffering redisplay in COMINT Date: Thu, 6 Dec 2012 17:08:33 -0800 (PST) Message-ID: <1354842513.76326.YahooMailNeo@web160901.mail.bf1.yahoo.com> Reply-To: Michael Mauger NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1354842519 18449 80.91.229.3 (7 Dec 2012 01:08:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Dec 2012 01:08:39 +0000 (UTC) To: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 07 02:08:53 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TgmQt-0003xd-7e for ged-emacs-devel@m.gmane.org; Fri, 07 Dec 2012 02:08:51 +0100 Original-Received: from localhost ([::1]:59326 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgmQg-0001wq-RO for ged-emacs-devel@m.gmane.org; Thu, 06 Dec 2012 20:08:38 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:60051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgmQd-0001wj-L7 for emacs-devel@gnu.org; Thu, 06 Dec 2012 20:08:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TgmQc-0004t8-6k for emacs-devel@gnu.org; Thu, 06 Dec 2012 20:08:35 -0500 Original-Received: from nm20.bullet.mail.bf1.yahoo.com ([98.139.212.179]:20589) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgmQc-0004st-2L for emacs-devel@gnu.org; Thu, 06 Dec 2012 20:08:34 -0500 Original-Received: from [98.139.212.145] by nm20.bullet.mail.bf1.yahoo.com with NNFMP; 07 Dec 2012 01:08:33 -0000 Original-Received: from [98.139.212.206] by tm2.bullet.mail.bf1.yahoo.com with NNFMP; 07 Dec 2012 01:08:33 -0000 Original-Received: from [127.0.0.1] by omp1015.mail.bf1.yahoo.com with NNFMP; 07 Dec 2012 01:08:33 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 236085.17980.bm@omp1015.mail.bf1.yahoo.com Original-Received: (qmail 1335 invoked by uid 60001); 7 Dec 2012 01:08:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1354842513; bh=JxhCJQ+1Ey/Uzo0CPLWQGZE/i71+JWbbGA56lFWGlq8=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=jxB1kCj3muVqVuTtwZwDz7xbgmjWNazr6Cg0Mw7CYeCikiYd7FZfgfur0f9f5aNpPAmp6h0cwgjg61xAwobKG/9tuN/G9pyotc4dY7Bi0oHny3bPe9cLllIsT0SX+Ya8zaPrS+O6x8mdRkpOQus+M9HgLdGOkkinovv4FBnFWWA= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=XATyFRYN6n+t5kfZx1NMq/9BszXg7eeq7hHNgY2UWA5H6Fwuu0bqCaGvNHR/ZjI8EmUKHosFAtj1eYT1X0p5usg7Zmeji+sQTuJzv4gGwF7d/t32SG7zyAyCrnQq/hijOE0YpTOxEQOCsBuqnUNPD4Uv21LlLnYD9SShZobQP2E=; X-YMail-OSG: S8pSEMQVM1lDe9lud6_IjBJ5Atr6CvgcvW2Nvv1wEHmjFgI QIooyk7P5400u8WFBxLvOWXcTxyY8Gs9_8pmugzx9VOE2QuUSnfp2GlSRqMa ZTrp8RevvG8V5MI_yUjxJajDsjRhL3.4_jbiaaMbkj5rT02XnXsqjuuCY6QA 2rX6.jehXOBA_FPVSlkHCjWSUYU_Fqzw6LxYmw2Q3nVQ8DrvYM5Osu0LVGNb wPJ6JWsg5cuLmW36t72FdYAlT7dFZG55Fhceoes39Ae9YvLQ4012SfaSVztA mM2YfklG5tHu05F8ORh7JuLNS50XVaO2k__EgAeMesf7ZnRM8jR2jeQiUJre ZF7WnWYt6ubT9IINSz9Wf4DSvxXUxkT18pUzW0MlAgAIp2VrNkYJ85py4yba 1BDrYMMwYeesw8SfXyMCayV5XFm2G4HckmIiuwJHR6TPqrFhkgOGr0qEhxC1 DnT3mEHEcBEIUDeNefK9DFHI7fHIJc3NQjI6F4MK8CipuTZE- Original-Received: from [12.191.12.7] by web160901.mail.bf1.yahoo.com via HTTP; Thu, 06 Dec 2012 17:08:33 PST X-Rocket-MIMEInfo: 001.001, SSBkb24ndCBiZWxpZXZlIHRoaXMgaXMgcG9zc2libGUsIGJ1dCBJIGZpZ3VyZWQgSSdkIHJ1biBpdCBwYXN0IHRoZSBicmFpbiB0cnVzdC4uLi4KCkluIHNxbC1pbnRlcmFjdGl2ZS1tb2RlLCBhwqBkZXJpdmF0aXZlwqBvZiBjb21pbnQsIEkgd2lsbCBzdWJtaXQgYSBTRUxFQ1Qgc3RhdGVtZW50IHRoYXQgcmV0dXJucyBtYW55IHZlcnkgbG9uZyByb3dzICgyMDAwKyBjaGFyYWN0ZXJzIHBlciBsaW5lKS4gwqBUaGUgcmVkaXNwbGF5IGZpcmV3b3JrcyB0aGF0IGZvbGxvdyBhcmUgaW1wcmVzc2l2ZSBidXQgc2wBMAEBAQE- X-Mailer: YahooMailWebService/0.8.128.478 X-detected-operating-system: by eggs.gnu.org: FreeBSD 8.x X-Received-From: 98.139.212.179 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:155327 Archived-At: I don't believe this is possible, but I figured I'd run it past the brain t= rust....=0A=0AIn sql-interactive-mode, a=A0derivative=A0of comint, I will s= ubmit a SELECT statement that returns many very long rows (2000+ characters= per line). =A0The redisplay fireworks that follow are impressive but slow.= =A0 As text streams to the buffer with `auto-hscroll-mode' enabled the scr= een flashes as it redraws the buffer with more lines of data and scrolled h= orizontally in different places until all the data stream is complete. =A0= =0A=0AI have figured out how to turn off horizontal scrolling with a `comin= t-preoutput-filter-function' and a `pre-command-hook' for the duration of S= QL command so the redisplay is limited to a slow march straight down the pa= ge without the=A0intervening=A0horizontal scrolling but the column number i= n the mode line going crazy. =A0I've also discovered that if I switch to an= other buffer so that the SQL buffer is not displayed and then switch back, = the SQL buffer is populated very quickly. =A0(That is, Emacs can fetch the = results quickly, it just can't redraw it quickly a couple of hundred times)= =0A=0ASo what I'm asking: Is there a way (say by setting `inhibit-redisplay= ' to t) for the duration of the comint command and then restoring redisplay= when I am at the prompt at the end. =A0The trick that I use for `auto-hscr= oll-mode' won't work because I don't find out about the completion until th= e user causes an event. =A0I understand also that I don't want to universal= ly block redisplay in case I switch to another buffer while the comint comm= and is running and I want to interact with another buffer (i.e., I want to = inhibit redisplay in that buffer only--buffer-local inhibit-redisplay). =A0= Looking at comint.el and based on my understanding of how processes are han= dled, I don't believe that it is easy to do because I don't know when the o= utput is complete. =A0(I've noticed in my disable auto-hscroll-mode code th= at the comint-preoutput-filter-function will get called a couple of hundred= times with chunks of the output. =A0I'm probably getting a redisplay after each chunk.) =A0=0A=0AMy only thought is that I could route the output to = a temp buffer until I see the prompt at the end of a chunk=A0(ala the comin= t redirection code, a very non-Emacs 20+ way of doing things), and then mov= e the output to the original buffer. =A0Essentially=A0buffering the output = until it's complete. =A0Thoughts? =A0Am I missing an obvious hook? =A0(pre-= command isn't it, it fires only on input, unless I can feed input to it to = force it when done)=0A=0AAm I SOL?