From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 22 09:31:31 2014 Received: (at submit) by debbugs.gnu.org; 22 Jun 2014 13:31:31 +0000 Received: from localhost ([127.0.0.1]:56733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wyhrm-00005l-FZ for submit@debbugs.gnu.org; Sun, 22 Jun 2014 09:31:30 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36784) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wyhrg-00005R-UT for submit@debbugs.gnu.org; Sun, 22 Jun 2014 09:31:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WyhrS-00020U-BZ for submit@debbugs.gnu.org; Sun, 22 Jun 2014 09:31:19 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:60570) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WyhrS-00020P-9W for submit@debbugs.gnu.org; Sun, 22 Jun 2014 09:31:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WyhrJ-00080r-8N for bug-gnu-emacs@gnu.org; Sun, 22 Jun 2014 09:31:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WyhrA-0001vF-8H for bug-gnu-emacs@gnu.org; Sun, 22 Jun 2014 09:31:01 -0400 Received: from mail-pd0-x232.google.com ([2607:f8b0:400e:c02::232]:51238) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WyhrA-0001uy-0Q for bug-gnu-emacs@gnu.org; Sun, 22 Jun 2014 09:30:52 -0400 Received: by mail-pd0-f178.google.com with SMTP id r10so4666563pdi.9 for ; Sun, 22 Jun 2014 06:30:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=mKOJn8R68NggIxv1PUeHXH/3AqXU49NFvydKmzTFAfs=; b=plpLGM/gI4R4gtO47/iSVoqL+whSARvfWLkwtBLUzK30XlntjPDUUnPFFw5hdOCRhs 8iztaXmof4f0Cfguas35GMNlT3pwmrayy7blXvxiLn1W61smQ1NRs3KAU74K96jcb7EF 3Br7KQCpk6US2GJbZc0fSU5FayHZCBh3HKp2iJpAhxD64+UIxRp8eKS0sFNvrmR14mL3 md1ILU2PEzQzQhV+s3rnDGPRusL9FnKlKlo+y5n4oBi8rpNr4U/QYib2nKmLt3FNFxId 6RyQS1S/FD8U9OAtANN/IPoDwBkAiaNUSc9xxODXgyjahshzaDA/lZIta8neQfENCzG7 Wgeg== X-Received: by 10.66.183.11 with SMTP id ei11mr21089946pac.116.1403443850781; Sun, 22 Jun 2014 06:30:50 -0700 (PDT) Received: from fortuna ([221.222.158.228]) by mx.google.com with ESMTPSA id qq5sm22232524pbb.24.2014.06.22.06.30.48 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Sun, 22 Jun 2014 06:30:49 -0700 (PDT) From: Leo Liu To: bug-gnu-emacs@gnu.org Subject: 24.4.50; bad default value for `Man-width' X-Debbugs-CC: Date: Sun, 22 Jun 2014 21:30:45 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Man-width defaults to the window width at the time of running `man'. But if the frame is split horizontally it usually leads to a view with the right-hand-side half unviewable. Leo From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 22 12:31:45 2014 Received: (at control) by debbugs.gnu.org; 22 Jun 2014 16:31:45 +0000 Received: from localhost ([127.0.0.1]:57246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WykgD-0004f5-9Q for submit@debbugs.gnu.org; Sun, 22 Jun 2014 12:31:45 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:42517 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wykg9-0004et-3f for control@debbugs.gnu.org; Sun, 22 Jun 2014 12:31:43 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Wykg8-0006ru-N0 for control@debbugs.gnu.org; Sun, 22 Jun 2014 12:31:40 -0400 Date: Sun, 22 Jun 2014 12:31:40 -0400 Message-Id: Subject: control message for bug 17831 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) merge 9084 17831 From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 23 08:54:04 2014 Received: (at 17831) by debbugs.gnu.org; 23 Jun 2014 12:54:04 +0000 Received: from localhost ([127.0.0.1]:57754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wz3l1-000444-0v for submit@debbugs.gnu.org; Mon, 23 Jun 2014 08:54:03 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:28109) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wz3kt-00043f-Q9; Mon, 23 Jun 2014 08:53:56 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCw4mEhQYDSSIBAjSGReOegeEOASpGYFqg0whgSwk X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCw4mEhQYDSSIBAjSGReOegeEOASpGYFqg0whgSwk X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="69215930" Received: from 75-119-224-253.dsl.teksavvy.com (HELO pastel.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 23 Jun 2014 08:53:45 -0400 Received: by pastel.home (Postfix, from userid 20848) id 5F04D603CD; Mon, 23 Jun 2014 08:53:45 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' Message-ID: References: Date: Mon, 23 Jun 2014 08:53:45 -0400 In-Reply-To: (Leo Liu's message of "Sun, 22 Jun 2014 21:30:45 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 17831 Cc: 17831@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) forcemerge 17831 2588 thanks > Man-width defaults to the window width at the time of running `man'. But > if the frame is split horizontally it usually leads to a view with the > right-hand-side half unviewable. Indeed. As discussed earlier, I think the right fix is to display the buffer right away and then fill it in the background. Problem with it, is that currently we do "fill the buffer with half-processed text; finish formatting; display", so if we only move the "display" part, the user will see (temporarily) the half-processed text. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 23 19:22:36 2014 Received: (at submit) by debbugs.gnu.org; 23 Jun 2014 23:22:36 +0000 Received: from localhost ([127.0.0.1]:58671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzDZL-0006et-Ld for submit@debbugs.gnu.org; Mon, 23 Jun 2014 19:22:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52922) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzDZJ-0006eZ-78 for submit@debbugs.gnu.org; Mon, 23 Jun 2014 19:22:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzDZ4-00085l-3D for submit@debbugs.gnu.org; Mon, 23 Jun 2014 19:22:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_NUMERIC_HELO,T_FSL_HELO_BARE_IP_2 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:47384) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzDZ4-00085W-0v for submit@debbugs.gnu.org; Mon, 23 Jun 2014 19:22:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzDYw-0001Xx-DC for bug-gnu-emacs@gnu.org; Mon, 23 Jun 2014 19:22:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzDYo-0007cR-UP for bug-gnu-emacs@gnu.org; Mon, 23 Jun 2014 19:22:10 -0400 Received: from plane.gmane.org ([80.91.229.3]:42549) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzDYo-0007aL-Nn for bug-gnu-emacs@gnu.org; Mon, 23 Jun 2014 19:22:02 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WzDYl-0008NC-Rk for bug-gnu-emacs@gnu.org; Tue, 24 Jun 2014 01:21:59 +0200 Received: from 221.222.158.228 ([221.222.158.228]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 Jun 2014 01:21:59 +0200 Received: from sdl.web by 221.222.158.228 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 Jun 2014 01:21:59 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Leo Liu Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' Date: Tue, 24 Jun 2014 07:21:47 +0800 Lines: 10 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 221.222.158.228 Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoAgMAAADxkFD+AAAADFBMVEUvT09qWs3/pQD///+J kUVcAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9cBBwMLOd3veKQA AACuSURBVBjTldE9CgIxEAXgB+lEyFUC2wo5ikdZ8DSypxhMY7H9VuIVwlqkGRgnm59VsHGafIQ3 CZlAtmKIRaHETgYa12lqvEsPYKf8wXHsPGfqPaUM0g9aJPKFXkmNQmSDqwzz4Fpgpz+6WAPY2z5o uPJJpu0uypcl4nyCibMLQ8lCiVjayLoQvw5LsVKQuHPRR958HZbOcVsKeepcLxpByjycGvnKmY+c MBvrtyjfe0vmuLvdq/kAAAAASUVORK5CYII= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (CentOS 6.5) Cancel-Lock: sha1:I9tz/7QlGuTSbT8wzcoS/m7jjZA= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.2 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---) On 2014-06-23 08:53 -0400, Stefan Monnier wrote: > Problem with it, is that currently we do "fill the buffer with > half-processed text; finish formatting; display", so if we only move the > "display" part, the user will see (temporarily) the half-processed text. Indeed. On the other hand simply change the default value to 80 always gives me a more readable output. But this doesn't fix the wrong behaviour when using window width. Leo From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 23 19:31:56 2014 Received: (at 17831) by debbugs.gnu.org; 23 Jun 2014 23:31:56 +0000 Received: from localhost ([127.0.0.1]:58679 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzDiN-0006wA-Sy for submit@debbugs.gnu.org; Mon, 23 Jun 2014 19:31:56 -0400 Received: from alc-vshost7.dreamhost.com ([69.163.216.107]:40003 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzDiL-0006vv-EU for 17831@debbugs.gnu.org; Mon, 23 Jun 2014 19:31:54 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id E842D30974AF3D; Mon, 23 Jun 2014 16:31:51 -0700 (PDT) From: Juri Linkov To: Stefan Monnier Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' Organization: JURTA References: Date: Tue, 24 Jun 2014 02:17:51 +0300 In-Reply-To: (Stefan Monnier's message of "Mon, 23 Jun 2014 08:53:45 -0400") Message-ID: <87tx7buryg.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >> Man-width defaults to the window width at the time of running `man'. But >> if the frame is split horizontally it usually leads to a view with the >> right-hand-side half unviewable. > > Indeed. > As discussed earlier, I think the right fix is to display the buffer > right away and then fill it in the background. > > Problem with it, is that currently we do "fill the buffer with > half-processed text; finish formatting; display", so if we only move the > "display" part, the user will see (temporarily) the half-processed text. [...] Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.6 RCVD_IN_BRBL_LASTEXT RBL: RCVD_IN_BRBL_LASTEXT [69.163.216.107 listed in bb.barracudacentral.org] X-Debbugs-Envelope-To: 17831 Cc: 17831@debbugs.gnu.org, Leo Liu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >> Man-width defaults to the window width at the time of running `man'. But >> if the frame is split horizontally it usually leads to a view with the >> right-hand-side half unviewable. > > Indeed. > As discussed earlier, I think the right fix is to display the buffer > right away and then fill it in the background. > > Problem with it, is that currently we do "fill the buffer with > half-processed text; finish formatting; display", so if we only move the > "display" part, the user will see (temporarily) the half-processed text. [...] Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.6 RCVD_IN_BRBL_LASTEXT RBL: RCVD_IN_BRBL_LASTEXT [69.163.216.107 listed in bb.barracudacentral.org] >> Man-width defaults to the window width at the time of running `man'. But >> if the frame is split horizontally it usually leads to a view with the >> right-hand-side half unviewable. > > Indeed. > As discussed earlier, I think the right fix is to display the buffer > right away and then fill it in the background. > > Problem with it, is that currently we do "fill the buffer with > half-processed text; finish formatting; display", so if we only move the > "display" part, the user will see (temporarily) the half-processed text. While testing the changes for bug#17809 I noticed a similar problem for the *Completions* buffer. It's filled with completions using the default width of 80 columns while the buffer is not yet displayed. Later when the buffer is displayed in a window with the frame's full-width of 160 columns, it leaves too much empty space in the buffer. As a general solution for such cases it seems the proper order is to display an empty buffer first, and then fill it with the contents. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 23 21:26:24 2014 Received: (at 17831) by debbugs.gnu.org; 24 Jun 2014 01:26:24 +0000 Received: from localhost ([127.0.0.1]:58720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzFVA-0001mV-3y for submit@debbugs.gnu.org; Mon, 23 Jun 2014 21:26:24 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:37543) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzFV7-0001mG-4e for 17831@debbugs.gnu.org; Mon, 23 Jun 2014 21:26:21 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJC6HVgjSGReOegeEOASUYpQ3gWqDTCE X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJC6HVgjSGReOegeEOASUYpQ3gWqDTCE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="69322815" Received: from 75-119-224-253.dsl.teksavvy.com (HELO pastel.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 23 Jun 2014 21:26:15 -0400 Received: by pastel.home (Postfix, from userid 20848) id 132DA603CD; Mon, 23 Jun 2014 21:26:15 -0400 (EDT) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' Message-ID: References: <87tx7buryg.fsf@mail.jurta.org> Date: Mon, 23 Jun 2014 21:26:15 -0400 In-Reply-To: <87tx7buryg.fsf@mail.jurta.org> (Juri Linkov's message of "Tue, 24 Jun 2014 02:17:51 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 17831 Cc: 17831@debbugs.gnu.org, Leo Liu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > As a general solution for such cases it seems the proper order is > to display an empty buffer first, and then fill it with the contents. Agreed. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 24 03:14:16 2014 Received: (at 17831) by debbugs.gnu.org; 24 Jun 2014 07:14:16 +0000 Received: from localhost ([127.0.0.1]:58819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzKvm-0004gQ-Uc for submit@debbugs.gnu.org; Tue, 24 Jun 2014 03:14:16 -0400 Received: from mout.gmx.net ([212.227.15.15]:57430) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzKvg-0004g0-8c for 17831@debbugs.gnu.org; Tue, 24 Jun 2014 03:14:13 -0400 Received: from [88.117.80.157] ([88.117.80.157]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0Lz3nU-1WdWm00AiW-014GWL; Tue, 24 Jun 2014 09:14:00 +0200 Message-ID: <53A92532.9040901@gmx.at> Date: Tue, 24 Jun 2014 09:13:54 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov , Stefan Monnier Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' References: <87tx7buryg.fsf@mail.jurta.org> In-Reply-To: <87tx7buryg.fsf@mail.jurta.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:DnbItBbXFd7XCecTkq7pH/tPq7TmOIUs+rbdhd0zac27YhpNAen w2d1cE8jv6+wBiftFoAblEKkxHdHDi2UiEiBiObFKQaJ9ePz0iBkHcd/E+AlTpJ3plHtQjZ PZw2qSWpJ0VF8Jk5ttbw5+gIPVtFZ7ZjUzqkvZ9QCCRHSv/mEKdXIPe+IF3hbznoaj03crW yxGrYrNjvVbIf05Vb629Q== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 17831 Cc: 17831@debbugs.gnu.org, Leo Liu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > As a general solution for such cases it seems the proper order is > to display an empty buffer first, and then fill it with the contents. Obviously there are two way to tackle this: Fill the buffer in some way and try to display it in a window with suitable size. That's what we've done so far and it fails typically because it looks at the width of the selected window in order to do the filling but displays the buffer in a window with different width. The first to report this problem was Lennart when filing bug#6000 more than four years ago. To fix this we could either use some sort of maximimum width (for me more than 80 columns are not very readable anyway) and propose an adequate display buffer action or implement simple heuristics to detect how large the window used by `display-buffer' would be and fill the buffer in some adequate manner. Alternatively, we could display the buffer first, look at what size we get, fill the buffer, and possibly resize the window afterwards. For `with-temp-buffer-window' this means that we would have to fill the buffer either via `temp-buffer-window-show-hook' or in QUIT-FUNCTION. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 24 08:53:31 2014 Received: (at 17831) by debbugs.gnu.org; 24 Jun 2014 12:53:31 +0000 Received: from localhost ([127.0.0.1]:58947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzQE2-0007Tr-JL for submit@debbugs.gnu.org; Tue, 24 Jun 2014 08:53:31 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:13843) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzQDw-0007TV-1Q for 17831@debbugs.gnu.org; Tue, 24 Jun 2014 08:53:24 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArgGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgwUJgRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IPAS-Result: ArgGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgwUJgRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="69375499" Received: from 75-119-224-253.dsl.teksavvy.com (HELO pastel.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 24 Jun 2014 08:53:14 -0400 Received: by pastel.home (Postfix, from userid 20848) id 211186036C; Tue, 24 Jun 2014 08:53:14 -0400 (EDT) From: Stefan Monnier To: martin rudalics Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' Message-ID: References: <87tx7buryg.fsf@mail.jurta.org> <53A92532.9040901@gmx.at> Date: Tue, 24 Jun 2014 08:53:14 -0400 In-Reply-To: <53A92532.9040901@gmx.at> (martin rudalics's message of "Tue, 24 Jun 2014 09:13:54 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 17831 Cc: Juri Linkov , 17831@debbugs.gnu.org, Leo Liu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > To fix this we could either use some sort of maximimum width (for me > more than 80 columns are not very readable anyway) and propose an I'm with you here, but some users disagree (e.g. they want to use their 160-column *Cmpletions* window fully). > Alternatively, we could display the buffer first, look at what size we > get, fill the buffer, and possibly resize the window afterwards. That's what we should aim for, I think. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 24 11:46:50 2014 Received: (at 17831) by debbugs.gnu.org; 24 Jun 2014 15:46:50 +0000 Received: from localhost ([127.0.0.1]:59459 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzSvp-00048e-DY for submit@debbugs.gnu.org; Tue, 24 Jun 2014 11:46:49 -0400 Received: from mtaout28.012.net.il ([80.179.55.184]:38115) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzSvl-00048L-Qx for 17831@debbugs.gnu.org; Tue, 24 Jun 2014 11:46:46 -0400 Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0N7O00I00JOLA200@mtaout28.012.net.il> for 17831@debbugs.gnu.org; Tue, 24 Jun 2014 18:45:23 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N7O00DBBJRNLR50@mtaout28.012.net.il>; Tue, 24 Jun 2014 18:45:23 +0300 (IDT) Date: Tue, 24 Jun 2014 18:46:37 +0300 From: Eli Zaretskii Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' In-reply-to: <53A92532.9040901@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <83zjh2qpia.fsf@gnu.org> References: <87tx7buryg.fsf@mail.jurta.org> <53A92532.9040901@gmx.at> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 17831 Cc: juri@jurta.org, 17831@debbugs.gnu.org, monnier@iro.umontreal.ca, sdl.web@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Tue, 24 Jun 2014 09:13:54 +0200 > From: martin rudalics > Cc: 17831@debbugs.gnu.org, Leo Liu > > To fix this we could either use some sort of maximimum width (for me > more than 80 columns are not very readable anyway) and propose an > adequate display buffer action or implement simple heuristics to detect > how large the window used by `display-buffer' would be and fill the > buffer in some adequate manner. None of this will ever work 100% reliably in the "M-x man" case, because while the command runs in the background, the user could change the window and frame configuration at will. > Alternatively, we could display the buffer first, look at what size we > get, fill the buffer, and possibly resize the window afterwards. For > `with-temp-buffer-window' this means that we would have to fill the > buffer either via `temp-buffer-window-show-hook' or in QUIT-FUNCTION. But this will momentarily flash incorrect (e.g., empty) display, right? Not nice, IMO. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 24 11:55:40 2014 Received: (at 17831) by debbugs.gnu.org; 24 Jun 2014 15:55:40 +0000 Received: from localhost ([127.0.0.1]:59463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzT4K-0004OE-6O for submit@debbugs.gnu.org; Tue, 24 Jun 2014 11:55:40 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:50237) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzT4D-0004Nu-Ue for 17831@debbugs.gnu.org; Tue, 24 Jun 2014 11:55:33 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0N7O00D00K02V800@a-mtaout22.012.net.il> for 17831@debbugs.gnu.org; Tue, 24 Jun 2014 18:55:20 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N7O00D39K88FAB0@a-mtaout22.012.net.il>; Tue, 24 Jun 2014 18:55:20 +0300 (IDT) Date: Tue, 24 Jun 2014 18:55:18 +0300 From: Eli Zaretskii Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' In-reply-to: X-012-Sender: halo1@inter.net.il To: Stefan Monnier Message-id: <83y4wmqp3t.fsf@gnu.org> References: <87tx7buryg.fsf@mail.jurta.org> <53A92532.9040901@gmx.at> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 17831 Cc: rudalics@gmx.at, 17831@debbugs.gnu.org, sdl.web@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Stefan Monnier > Date: Tue, 24 Jun 2014 08:53:14 -0400 > Cc: 17831@debbugs.gnu.org, Leo Liu > > > To fix this we could either use some sort of maximimum width (for me > > more than 80 columns are not very readable anyway) and propose an > > I'm with you here, but some users disagree (e.g. they want to use their > 160-column *Cmpletions* window fully). > > > Alternatively, we could display the buffer first, look at what size we > > get, fill the buffer, and possibly resize the window afterwards. > > That's what we should aim for, I think. You are talking about 2 different situations as if they are identical. But IMO they are very different. "M-x man" runs the text formatter in the background, while the user is free to change the window configuration at will. I see no way that we will be able to solve this reliably. By contrast, in the *Completions* use case the code that formats the text runs synchronously, so having in place some protocol that would allow to query about the dimensions of the window display-buffer etc. _will_ get, and then immediately use these dimensions to format the candidate list, is probably all we need. The alternative you favor is IMO worse: it will momentarily flash incorrect display, which I think will look un-professional. Returning to the "M-x man" use case, I think the possibilities supported via the Man-width option is the best we can do. So any users that are unhappy should be pointed to that option. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 24 13:31:19 2014 Received: (at 17831) by debbugs.gnu.org; 24 Jun 2014 17:31:19 +0000 Received: from localhost ([127.0.0.1]:59559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzUYs-0007Gd-EF for submit@debbugs.gnu.org; Tue, 24 Jun 2014 13:31:19 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:9890) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzUYl-0007GD-3b for 17831@debbugs.gnu.org; Tue, 24 Jun 2014 13:31:11 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4BKkZgWqDTCE X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4BKkZgWqDTCE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="69409326" Received: from 75-119-224-253.dsl.teksavvy.com (HELO ceviche.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 24 Jun 2014 13:31:01 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 433816638E; Tue, 24 Jun 2014 13:31:01 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' Message-ID: References: <87tx7buryg.fsf@mail.jurta.org> <53A92532.9040901@gmx.at> <83zjh2qpia.fsf@gnu.org> Date: Tue, 24 Jun 2014 13:31:01 -0400 In-Reply-To: <83zjh2qpia.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 24 Jun 2014 18:46:37 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 17831 Cc: juri@jurta.org, martin rudalics , 17831@debbugs.gnu.org, sdl.web@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > But this will momentarily flash incorrect (e.g., empty) display, > right? Not nice, IMO. That doesn't seem to bother users of C-x v = Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 24 13:34:09 2014 Received: (at 17831) by debbugs.gnu.org; 24 Jun 2014 17:34:09 +0000 Received: from localhost ([127.0.0.1]:59563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzUbc-0007Lc-Nc for submit@debbugs.gnu.org; Tue, 24 Jun 2014 13:34:09 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:31145) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzUbV-0007Ky-Ap for 17831@debbugs.gnu.org; Tue, 24 Jun 2014 13:34:02 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4BKkZgWqDTCGBLCQ X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4BKkZgWqDTCGBLCQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="69410588" Received: from 75-119-224-253.dsl.teksavvy.com (HELO ceviche.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 24 Jun 2014 13:33:51 -0400 Received: by ceviche.home (Postfix, from userid 20848) id DD9716638E; Tue, 24 Jun 2014 13:33:50 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' Message-ID: References: <87tx7buryg.fsf@mail.jurta.org> <53A92532.9040901@gmx.at> <83y4wmqp3t.fsf@gnu.org> Date: Tue, 24 Jun 2014 13:33:50 -0400 In-Reply-To: <83y4wmqp3t.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 24 Jun 2014 18:55:18 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 17831 Cc: rudalics@gmx.at, 17831@debbugs.gnu.org, sdl.web@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > By contrast, in the *Completions* use case the code that formats the > text runs synchronously, so having in place some protocol that would > allow to query about the dimensions of the window display-buffer > etc. _will_ get, and then immediately use these dimensions to format > the candidate list, is probably all we need. The alternative you > favor is IMO worse: it will momentarily flash incorrect display, which > I think will look un-professional. In the *Completions* case the empty buffer won't be temporarily displayed (because there's no redisplay going on before it's filled). The unprofessionalism doesn't bother me too much for M-x man, especially since the current behavior is broken IMNSHO: it pops up a window asynchronously, i.e. at a time you might be doing something else and not expecting this disruption. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 24 13:56:35 2014 Received: (at 17831) by debbugs.gnu.org; 24 Jun 2014 17:56:35 +0000 Received: from localhost ([127.0.0.1]:59570 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzUxL-0007yZ-Fs for submit@debbugs.gnu.org; Tue, 24 Jun 2014 13:56:34 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:38097) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzUxF-0007y6-Lq for 17831@debbugs.gnu.org; Tue, 24 Jun 2014 13:56:29 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0N7O00E00PGRYN00@a-mtaout22.012.net.il> for 17831@debbugs.gnu.org; Tue, 24 Jun 2014 20:56:18 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N7O00EBDPTUIOC0@a-mtaout22.012.net.il>; Tue, 24 Jun 2014 20:56:18 +0300 (IDT) Date: Tue, 24 Jun 2014 20:56:16 +0300 From: Eli Zaretskii Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' In-reply-to: X-012-Sender: halo1@inter.net.il To: Stefan Monnier Message-id: <83mwd2qji7.fsf@gnu.org> References: <87tx7buryg.fsf@mail.jurta.org> <53A92532.9040901@gmx.at> <83zjh2qpia.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 17831 Cc: juri@jurta.org, rudalics@gmx.at, 17831@debbugs.gnu.org, sdl.web@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Stefan Monnier > Cc: martin rudalics , juri@jurta.org, 17831@debbugs.gnu.org, sdl.web@gmail.com > Date: Tue, 24 Jun 2014 13:31:01 -0400 > > > But this will momentarily flash incorrect (e.g., empty) display, > > right? Not nice, IMO. > > That doesn't seem to bother users of C-x v = Which again uses an asynchronous text producer. That's not the same as *Completions*, so I don't think we should discuss these two issues as one. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 24 13:59:25 2014 Received: (at 17831) by debbugs.gnu.org; 24 Jun 2014 17:59:25 +0000 Received: from localhost ([127.0.0.1]:59574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzV05-00083t-Ap for submit@debbugs.gnu.org; Tue, 24 Jun 2014 13:59:24 -0400 Received: from mtaout29.012.net.il ([80.179.55.185]:56253) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzV00-00083R-2s for 17831@debbugs.gnu.org; Tue, 24 Jun 2014 13:59:19 -0400 Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0N7O00200PLXXK00@mtaout29.012.net.il> for 17831@debbugs.gnu.org; Tue, 24 Jun 2014 20:59:16 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N7O0047IPYREW00@mtaout29.012.net.il>; Tue, 24 Jun 2014 20:59:16 +0300 (IDT) Date: Tue, 24 Jun 2014 20:59:08 +0300 From: Eli Zaretskii Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' In-reply-to: X-012-Sender: halo1@inter.net.il To: Stefan Monnier Message-id: <83lhsmqjdf.fsf@gnu.org> References: <87tx7buryg.fsf@mail.jurta.org> <53A92532.9040901@gmx.at> <83y4wmqp3t.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 17831 Cc: rudalics@gmx.at, 17831@debbugs.gnu.org, sdl.web@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Stefan Monnier > Cc: rudalics@gmx.at, 17831@debbugs.gnu.org, sdl.web@gmail.com > Date: Tue, 24 Jun 2014 13:33:50 -0400 > > > By contrast, in the *Completions* use case the code that formats the > > text runs synchronously, so having in place some protocol that would > > allow to query about the dimensions of the window display-buffer > > etc. _will_ get, and then immediately use these dimensions to format > > the candidate list, is probably all we need. The alternative you > > favor is IMO worse: it will momentarily flash incorrect display, which > > I think will look un-professional. > > In the *Completions* case the empty buffer won't be temporarily > displayed (because there's no redisplay going on before it's filled). Are you sure? what about echo-area messages, which might trigger redisplay? But if you are right, then this is just another case of what I suggested, i.e. being able to query Emacs about the dimensions before actually displaying. > The unprofessionalism doesn't bother me too much for M-x man, especially > since the current behavior is broken IMNSHO: it pops up a window > asynchronously, i.e. at a time you might be doing something else and not > expecting this disruption. So perhaps TRT is simply to get rid of the asynchronous operation in the first place. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 24 15:35:22 2014 Received: (at 17831) by debbugs.gnu.org; 24 Jun 2014 19:35:22 +0000 Received: from localhost ([127.0.0.1]:59608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzWUv-0002fB-IT for submit@debbugs.gnu.org; Tue, 24 Jun 2014 15:35:22 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:5367) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzWUo-0002er-Oh for 17831@debbugs.gnu.org; Tue, 24 Jun 2014 15:35:15 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4BKkZgWqDTCE X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4BKkZgWqDTCE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="69427634" Received: from 75-119-224-253.dsl.teksavvy.com (HELO ceviche.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 24 Jun 2014 15:35:04 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 426136638E; Tue, 24 Jun 2014 15:35:04 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' Message-ID: References: <87tx7buryg.fsf@mail.jurta.org> <53A92532.9040901@gmx.at> <83zjh2qpia.fsf@gnu.org> <83mwd2qji7.fsf@gnu.org> Date: Tue, 24 Jun 2014 15:35:04 -0400 In-Reply-To: <83mwd2qji7.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 24 Jun 2014 20:56:16 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 17831 Cc: juri@jurta.org, rudalics@gmx.at, 17831@debbugs.gnu.org, sdl.web@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) >> > But this will momentarily flash incorrect (e.g., empty) display, >> > right? Not nice, IMO. >> That doesn't seem to bother users of C-x v = Doesn't bother web-browser users either, BTW. > Which again uses an asynchronous text producer. That's not the same > as *Completions*, so I don't think we should discuss these two issues > as one. For the non-async case, the empty buffer will not appear for lack of redisplay. > Are you sure? what about echo-area messages, which might trigger redisplay? That can happen, but I wouldn't worry about it. > > The unprofessionalism doesn't bother me too much for M-x man, especially > > since the current behavior is broken IMNSHO: it pops up a window > > asynchronously, i.e. at a time you might be doing something else and not > > expecting this disruption. > So perhaps TRT is simply to get rid of the asynchronous operation in > the first place. The annoying disruption is when "M-x man" takes a long time to get&generate the full output. I.e. it's the case where it's especially important to use asynchronous operation. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 24 16:06:44 2014 Received: (at 17831) by debbugs.gnu.org; 24 Jun 2014 20:06:44 +0000 Received: from localhost ([127.0.0.1]:59627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzWzK-0003d1-MC for submit@debbugs.gnu.org; Tue, 24 Jun 2014 16:06:44 -0400 Received: from mtaout24.012.net.il ([80.179.55.180]:42392) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzWzH-0003cd-5P for 17831@debbugs.gnu.org; Tue, 24 Jun 2014 16:06:40 -0400 Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0N7O00300VJB0J00@mtaout24.012.net.il> for 17831@debbugs.gnu.org; Tue, 24 Jun 2014 23:02:34 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N7O00IVLVO908A0@mtaout24.012.net.il>; Tue, 24 Jun 2014 23:02:34 +0300 (IDT) Date: Tue, 24 Jun 2014 23:06:30 +0300 From: Eli Zaretskii Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' In-reply-to: X-012-Sender: halo1@inter.net.il To: Stefan Monnier Message-id: <83ha3aqdh5.fsf@gnu.org> References: <87tx7buryg.fsf@mail.jurta.org> <53A92532.9040901@gmx.at> <83zjh2qpia.fsf@gnu.org> <83mwd2qji7.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 17831 Cc: juri@jurta.org, rudalics@gmx.at, 17831@debbugs.gnu.org, sdl.web@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Stefan Monnier > Cc: rudalics@gmx.at, juri@jurta.org, 17831@debbugs.gnu.org, sdl.web@gmail.com > Date: Tue, 24 Jun 2014 15:35:04 -0400 > > > So perhaps TRT is simply to get rid of the asynchronous operation in > > the first place. > > The annoying disruption is when "M-x man" takes a long time to get&generate > the full output. Most of that can easily be thrown away. Just look at what it does. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 24 16:29:57 2014 Received: (at 17831) by debbugs.gnu.org; 24 Jun 2014 20:29:57 +0000 Received: from localhost ([127.0.0.1]:59639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzXLo-0004Jr-Bo for submit@debbugs.gnu.org; Tue, 24 Jun 2014 16:29:56 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:8945) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzXLm-0004Jc-PE for 17831@debbugs.gnu.org; Tue, 24 Jun 2014 16:29:55 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIxALNBIUGA0kiAQI0hkXjnoHhDgEqRmBaoNMIQ X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIxALNBIUGA0kiAQI0hkXjnoHhDgEqRmBaoNMIQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="69435335" Received: from 75-119-224-253.dsl.teksavvy.com (HELO ceviche.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 24 Jun 2014 16:29:49 -0400 Received: by ceviche.home (Postfix, from userid 20848) id C02AA66167; Tue, 24 Jun 2014 16:29:48 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' Message-ID: References: <87tx7buryg.fsf@mail.jurta.org> <53A92532.9040901@gmx.at> <83zjh2qpia.fsf@gnu.org> <83mwd2qji7.fsf@gnu.org> <83ha3aqdh5.fsf@gnu.org> Date: Tue, 24 Jun 2014 16:29:48 -0400 In-Reply-To: <83ha3aqdh5.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 24 Jun 2014 23:06:30 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 17831 Cc: juri@jurta.org, rudalics@gmx.at, 17831@debbugs.gnu.org, sdl.web@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) >> > So perhaps TRT is simply to get rid of the asynchronous operation in >> > the first place. >> The annoying disruption is when "M-x man" takes a long time to get&generate >> the full output. > Most of that can easily be thrown away. Just look at what it does. Maybe it could be sped up, indeed. But I still prefer an async process that gives me: - empty buffer after 0s - full first page displayed after 0.1s - buffer fully filled and ready after 5s over a sync process that blocks for 3s. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 24 20:48:34 2014 Received: (at 17831) by debbugs.gnu.org; 25 Jun 2014 00:48:34 +0000 Received: from localhost ([127.0.0.1]:59762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzbO5-0003bW-RH for submit@debbugs.gnu.org; Tue, 24 Jun 2014 20:48:34 -0400 Received: from alc-vshost7.dreamhost.com ([69.163.216.107]:43394 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzbO1-0003bD-Vz for 17831@debbugs.gnu.org; Tue, 24 Jun 2014 20:48:30 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 3E6A1301927C1E; Tue, 24 Jun 2014 17:48:26 -0700 (PDT) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' Organization: JURTA References: <87tx7buryg.fsf@mail.jurta.org> <53A92532.9040901@gmx.at> <83zjh2qpia.fsf@gnu.org> <83mwd2qji7.fsf@gnu.org> Date: Wed, 25 Jun 2014 02:42:08 +0300 In-Reply-To: <83mwd2qji7.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 24 Jun 2014 20:56:16 +0300") Message-ID: <87pphxhnmf.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Which again uses an asynchronous text producer. That's not the same > as *Completions*, so I don't think we should discuss these two issues > as one. It's not the same, indeed. This is why in the previous message I referred to bug#17809 as a similar problem, but not the same. [...] Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.6 RCVD_IN_BRBL_LASTEXT RBL: RCVD_IN_BRBL_LASTEXT [69.163.216.107 listed in bb.barracudacentral.org] X-Debbugs-Envelope-To: 17831 Cc: rudalics@gmx.at, 17831@debbugs.gnu.org, Stefan Monnier , sdl.web@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Which again uses an asynchronous text producer. That's not the same > as *Completions*, so I don't think we should discuss these two issues > as one. It's not the same, indeed. This is why in the previous message I referred to bug#17809 as a similar problem, but not the same. [...] Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.6 RCVD_IN_BRBL_LASTEXT RBL: RCVD_IN_BRBL_LASTEXT [69.163.216.107 listed in bb.barracudacentral.org] > Which again uses an asynchronous text producer. That's not the same > as *Completions*, so I don't think we should discuss these two issues > as one. It's not the same, indeed. This is why in the previous message I referred to bug#17809 as a similar problem, but not the same. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 24 20:48:39 2014 Received: (at 17831) by debbugs.gnu.org; 25 Jun 2014 00:48:39 +0000 Received: from localhost ([127.0.0.1]:59767 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzbOB-0003bv-4B for submit@debbugs.gnu.org; Tue, 24 Jun 2014 20:48:39 -0400 Received: from alc-vshost7.dreamhost.com ([69.163.216.107]:43455 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzbO7-0003bm-Q3 for 17831@debbugs.gnu.org; Tue, 24 Jun 2014 20:48:36 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 3F34D30013BE40; Tue, 24 Jun 2014 17:48:32 -0700 (PDT) From: Juri Linkov To: Stefan Monnier Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' Organization: JURTA References: <87tx7buryg.fsf@mail.jurta.org> <53A92532.9040901@gmx.at> <83zjh2qpia.fsf@gnu.org> <83mwd2qji7.fsf@gnu.org> <83ha3aqdh5.fsf@gnu.org> Date: Wed, 25 Jun 2014 02:48:35 +0300 In-Reply-To: (Stefan Monnier's message of "Tue, 24 Jun 2014 16:29:48 -0400") Message-ID: <87tx79es0g.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > But I still prefer an async process that gives me: > - empty buffer after 0s > - full first page displayed after 0.1s > - buffer fully filled and ready after 5s > over a sync process that blocks for 3s. [...] Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.6 RCVD_IN_BRBL_LASTEXT RBL: RCVD_IN_BRBL_LASTEXT [69.163.216.107 listed in bb.barracudacentral.org] X-Debbugs-Envelope-To: 17831 Cc: rudalics@gmx.at, Eli Zaretskii , 17831@debbugs.gnu.org, sdl.web@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > But I still prefer an async process that gives me: > - empty buffer after 0s > - full first page displayed after 0.1s > - buffer fully filled and ready after 5s > over a sync process that blocks for 3s. [...] Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.6 RCVD_IN_BRBL_LASTEXT RBL: RCVD_IN_BRBL_LASTEXT [69.163.216.107 listed in bb.barracudacentral.org] > But I still prefer an async process that gives me: > - empty buffer after 0s > - full first page displayed after 0.1s > - buffer fully filled and ready after 5s > over a sync process that blocks for 3s. This simple patch displays the buffer immediately, but then slowly fills it with unformatted output that doesn't look nice. So maybe better would be to create a temporary hidden buffer, do formatting in background, and copy the formatted text to the displayed buffer. === modified file 'lisp/man.el' --- lisp/man.el 2014-05-09 07:02:00 +0000 +++ lisp/man.el 2014-06-24 23:47:12 +0000 @@ -1056,6 +1056,7 @@ (defun Man-getpage-in-background (topic) (require 'env) (message "Invoking %s %s in the background" manual-program man-args) (setq buffer (generate-new-buffer bufname)) + (Man-notify-when-ready buffer) (with-current-buffer buffer (setq buffer-undo-list t) (setq Man-original-frame (selected-frame)) From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 24 23:11:14 2014 Received: (at 17831) by debbugs.gnu.org; 25 Jun 2014 03:11:14 +0000 Received: from localhost ([127.0.0.1]:59823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wzdc9-0007jY-1S for submit@debbugs.gnu.org; Tue, 24 Jun 2014 23:11:13 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:64136) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wzdc5-0007jE-EH for 17831@debbugs.gnu.org; Tue, 24 Jun 2014 23:11:10 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJC6HVgjSGReOegeEOASpGYFqg0wh X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJC6HVgjSGReOegeEOASpGYFqg0wh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="69472482" Received: from 75-119-224-253.dsl.teksavvy.com (HELO ceviche.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 24 Jun 2014 23:11:02 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 8B9AC66167; Tue, 24 Jun 2014 23:11:02 -0400 (EDT) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' Message-ID: References: <87tx7buryg.fsf@mail.jurta.org> <53A92532.9040901@gmx.at> <83zjh2qpia.fsf@gnu.org> <83mwd2qji7.fsf@gnu.org> <83ha3aqdh5.fsf@gnu.org> <87tx79es0g.fsf@mail.jurta.org> Date: Tue, 24 Jun 2014 23:11:02 -0400 In-Reply-To: <87tx79es0g.fsf@mail.jurta.org> (Juri Linkov's message of "Wed, 25 Jun 2014 02:48:35 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 17831 Cc: rudalics@gmx.at, Eli Zaretskii , 17831@debbugs.gnu.org, sdl.web@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > This simple patch displays the buffer immediately, > but then slowly fills it with unformatted output > that doesn't look nice. Indeed, that's why I haven't made this change in Emacs years ago (when I made it in my local copy after getting too annoyed at the window-popup disruption). The solution is obvious, tho: "Just" move the reformatting to the process-filter. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 25 02:54:39 2014 Received: (at 17831) by debbugs.gnu.org; 25 Jun 2014 06:54:39 +0000 Received: from localhost ([127.0.0.1]:59875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wzh6M-00061l-Dd for submit@debbugs.gnu.org; Wed, 25 Jun 2014 02:54:38 -0400 Received: from mout.gmx.net ([212.227.15.18]:55272) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wzh6I-00061M-1q for 17831@debbugs.gnu.org; Wed, 25 Jun 2014 02:54:35 -0400 Received: from [93.82.9.108] ([93.82.9.108]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0M3zT0-1Whc383h4s-00rbiJ; Wed, 25 Jun 2014 08:54:25 +0200 Message-ID: <53AA7218.2080608@gmx.at> Date: Wed, 25 Jun 2014 08:54:16 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' References: <87tx7buryg.fsf@mail.jurta.org> <53A92532.9040901@gmx.at> <83zjh2qpia.fsf@gnu.org> In-Reply-To: <83zjh2qpia.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:HcJpoVoQu6VTMaTPJeaRwUYUfblqKbcyRTRartoPCXdUrLZWuT/ YJSQyaLm8buYyqbaW6IakOp+tzm0Vb6Ebe3uUyzKaH4QW41xavB9dKAHYBLK8/t4jziPpVf 4awUhB2kmLCZGm2oHkm0rRgAL6Iwv95nqxzSRxuvvQF7VVEhtBdVcO133t9lmiJwvNwkYac sXTi67Xl09A8g74Yr2epA== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 17831 Cc: juri@jurta.org, 17831@debbugs.gnu.org, monnier@iro.umontreal.ca, sdl.web@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > None of this will ever work 100% reliably in the "M-x man" case, > because while the command runs in the background, the user could > change the window and frame configuration at will. Indeed. >> Alternatively, we could display the buffer first, look at what size we >> get, fill the buffer, and possibly resize the window afterwards. For >> `with-temp-buffer-window' this means that we would have to fill the >> buffer either via `temp-buffer-window-show-hook' or in QUIT-FUNCTION. > > But this will momentarily flash incorrect (e.g., empty) display, > right? While the buffer gets filled asynchronously? Yes. But it should work in the synchronous case where the order would be (1) display the empty buffer (2) fill it (3) resize the window accordingly. > Not nice, IMO. We could show some sort of placeholder here. martin From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 25 02:54:53 2014 Received: (at 17831) by debbugs.gnu.org; 25 Jun 2014 06:54:53 +0000 Received: from localhost ([127.0.0.1]:59881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wzh6b-00062V-2z for submit@debbugs.gnu.org; Wed, 25 Jun 2014 02:54:53 -0400 Received: from mout.gmx.net ([212.227.15.19]:60450) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wzh6Y-00062E-CV for 17831@debbugs.gnu.org; Wed, 25 Jun 2014 02:54:51 -0400 Received: from [93.82.9.108] ([93.82.9.108]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0LyEJp-1Wf5s71tCv-015bVM; Wed, 25 Jun 2014 08:54:42 +0200 Message-ID: <53AA722A.7060800@gmx.at> Date: Wed, 25 Jun 2014 08:54:34 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii , Stefan Monnier Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' References: <87tx7buryg.fsf@mail.jurta.org> <53A92532.9040901@gmx.at> <83y4wmqp3t.fsf@gnu.org> In-Reply-To: <83y4wmqp3t.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:ylqBRA4bQJjVe43PWSy/jRQ3TEViwsTaSqLN1+x3+n21o8ROYay PM3ITFrYZaX9lULm3dd/1N5+wfgF8HFLi97WRnx0Ntse4zkzN2w3QgwgsrEdCT8iDXADjzS G9Fe7rzOSiY+ukTVRQZJ1nU1Eqem06A9TrvZTGw5lRqyw9cNVgS02VuKG2+tTsQoEKKhak1 W021TsgqTd8l/WqkyYuxw== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 17831 Cc: 17831@debbugs.gnu.org, sdl.web@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > Returning to the "M-x man" use case, I think the possibilities > supported via the Man-width option is the best we can do. So any > users that are unhappy should be pointed to that option. Agreed. But then `display-buffer' should be passed the value specified there together with a suitable function to make sure that the new window doesn't get too small. martin From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 26 20:48:22 2014 Received: (at 17831) by debbugs.gnu.org; 27 Jun 2014 00:48:22 +0000 Received: from localhost ([127.0.0.1]:34110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X0KL0-0002TD-5l for submit@debbugs.gnu.org; Thu, 26 Jun 2014 20:48:22 -0400 Received: from alc-vshost7.dreamhost.com ([69.163.216.107]:54913 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X0KKw-0002Su-Hl for 17831@debbugs.gnu.org; Thu, 26 Jun 2014 20:48:19 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 0765C304DCE7EF; Thu, 26 Jun 2014 17:48:15 -0700 (PDT) From: Juri Linkov To: Stefan Monnier Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' Organization: JURTA References: <87tx7buryg.fsf@mail.jurta.org> <53A92532.9040901@gmx.at> <83zjh2qpia.fsf@gnu.org> <83mwd2qji7.fsf@gnu.org> <83ha3aqdh5.fsf@gnu.org> <87tx79es0g.fsf@mail.jurta.org> Date: Fri, 27 Jun 2014 02:49:55 +0300 In-Reply-To: (Stefan Monnier's message of "Tue, 24 Jun 2014 23:11:02 -0400") Message-ID: <87y4wj9pzs.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >> This simple patch displays the buffer immediately, >> but then slowly fills it with unformatted output >> that doesn't look nice. > > Indeed, that's why I haven't made this change in Emacs years ago (when > I made it in my local copy after getting too annoyed at the window-popup > disruption). The solution is obvious, tho: "Just" move the reformatting > to the process-filter. [...] Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.6 RCVD_IN_BRBL_LASTEXT RBL: RCVD_IN_BRBL_LASTEXT [69.163.216.107 listed in bb.barracudacentral.org] X-Debbugs-Envelope-To: 17831 Cc: rudalics@gmx.at, Eli Zaretskii , 17831@debbugs.gnu.org, sdl.web@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >> This simple patch displays the buffer immediately, >> but then slowly fills it with unformatted output >> that doesn't look nice. > > Indeed, that's why I haven't made this change in Emacs years ago (when > I made it in my local copy after getting too annoyed at the window-popup > disruption). The solution is obvious, tho: "Just" move the reformatting > to the process-filter. [...] Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.6 RCVD_IN_BRBL_LASTEXT RBL: RCVD_IN_BRBL_LASTEXT [69.163.216.107 listed in bb.barracudacentral.org] >> This simple patch displays the buffer immediately, >> but then slowly fills it with unformatted output >> that doesn't look nice. > > Indeed, that's why I haven't made this change in Emacs years ago (when > I made it in my local copy after getting too annoyed at the window-popup > disruption). The solution is obvious, tho: "Just" move the reformatting > to the process-filter. Using the same approach like processing escape sequences in grep/compilation produces a nice result for M-x man: it displays the first formatted page immediately and continues formatting the rest of the man page in background. There are still small details to iron out but this is basically achieved with the following patch. There is one problem that I noticed on large man pages: formatting small chunks by process-filter is little slower than formatting the whole output like it currently does. Could it be possible that a slowdown is caused by `narrow-to-region'? Then it's possible to add two new arguments `min' and `max' to `Man-fontify-manpage' to limit the processed region manually instead of using narrowing. === modified file 'lisp/man.el' --- lisp/man.el 2014-05-09 07:02:00 +0000 +++ lisp/man.el 2014-06-27 00:49:22 +0000 @@ -1056,20 +1056,22 @@ (defun Man-getpage-in-background (topic) (require 'env) (message "Invoking %s %s in the background" manual-program man-args) (setq buffer (generate-new-buffer bufname)) + (Man-notify-when-ready buffer) (with-current-buffer buffer (setq buffer-undo-list t) (setq Man-original-frame (selected-frame)) (setq Man-arguments man-args)) (Man-start-calling (if (fboundp 'start-process) - (set-process-sentinel - (start-process manual-program buffer - (if (memq system-type '(cygwin windows-nt)) - shell-file-name - "sh") - shell-command-switch - (format (Man-build-man-command) man-args)) - 'Man-bgproc-sentinel) + (let ((proc (start-process + manual-program buffer + (if (memq system-type '(cygwin windows-nt)) + shell-file-name + "sh") + shell-command-switch + (format (Man-build-man-command) man-args)))) + (set-process-sentinel proc 'Man-bgproc-sentinel) + (set-process-filter proc 'Man-bgproc-filter)) (let ((exit-status (call-process shell-file-name nil (list buffer nil) nil shell-command-switch @@ -1312,6 +1317,33 @@ (defun Man-cleanup-manpage (&optional in (Man-softhyphen-to-minus) (message "%s man page cleaned up" Man-arguments)) +(defun Man-bgproc-filter (process string) + "Manpage background process filter. +When manpage command is run asynchronously, PROCESS is the process +object for the manpage command; when manpage command is run +synchronously, PROCESS is the name of the buffer where the manpage +command is run. Second argument STRING is the entire string of output." + (save-excursion + (let ((Man-buffer (if (stringp process) (get-buffer process) + (process-buffer process)))) + (if (null (buffer-name Man-buffer)) ;; deleted buffer + (or (stringp process) + (set-process-buffer process nil)) + + (with-current-buffer Man-buffer + (let ((inhibit-read-only t) + (beg (marker-position (process-mark process)))) + (goto-char beg) + (insert string) + (save-restriction + (narrow-to-region + (save-excursion (goto-char beg) (line-beginning-position)) + (point)) + (if Man-fontify-manpage-flag + (Man-fontify-manpage) + (Man-cleanup-manpage))) + (set-marker (process-mark process) (point-max)))))))) + (defun Man-bgproc-sentinel (process msg) "Manpage background process sentinel. When manpage command is run asynchronously, PROCESS is the process @@ -1365,9 +1398,6 @@ (defun Man-bgproc-sentinel (process msg) )) (if delete-buff (kill-buffer Man-buffer) - (if Man-fontify-manpage-flag - (Man-fontify-manpage) - (Man-cleanup-manpage)) (run-hooks 'Man-cooked-hook) (Man-mode) @@ -1378,11 +1408,6 @@ (defun Man-bgproc-sentinel (process msg) (user-error "Can't find the %s manpage" (Man-page-from-arguments args))) (set-buffer-modified-p nil)))) - ;; Restore case-fold-search before calling - ;; Man-notify-when-ready because it may switch buffers. - - (if (not delete-buff) - (Man-notify-when-ready Man-buffer)) (if err-mess (error "%s" err-mess)) From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 26 22:16:55 2014 Received: (at 17831) by debbugs.gnu.org; 27 Jun 2014 02:16:55 +0000 Received: from localhost ([127.0.0.1]:34160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X0Lig-0006m6-OS for submit@debbugs.gnu.org; Thu, 26 Jun 2014 22:16:55 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:2789) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X0Lie-0006li-3Z for 17831@debbugs.gnu.org; Thu, 26 Jun 2014 22:16:52 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4BKkZgWqDTCE X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4BKkZgWqDTCE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="69700514" Received: from 75-119-224-253.dsl.teksavvy.com (HELO pastel.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 26 Jun 2014 22:16:46 -0400 Received: by pastel.home (Postfix, from userid 20848) id 2804B615CF; Thu, 26 Jun 2014 22:16:46 -0400 (EDT) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' Message-ID: References: <87tx7buryg.fsf@mail.jurta.org> <53A92532.9040901@gmx.at> <83zjh2qpia.fsf@gnu.org> <83mwd2qji7.fsf@gnu.org> <83ha3aqdh5.fsf@gnu.org> <87tx79es0g.fsf@mail.jurta.org> <87y4wj9pzs.fsf@mail.jurta.org> Date: Thu, 26 Jun 2014 22:16:45 -0400 In-Reply-To: <87y4wj9pzs.fsf@mail.jurta.org> (Juri Linkov's message of "Fri, 27 Jun 2014 02:49:55 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 17831 Cc: rudalics@gmx.at, Eli Zaretskii , 17831@debbugs.gnu.org, sdl.web@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > Using the same approach like processing escape sequences in grep/compilation > produces a nice result for M-x man: it displays the first formatted page > immediately and continues formatting the rest of the man page in background. > There are still small details to iron out but this is basically achieved > with the following patch. Looks good. > There is one problem that I noticed on large man pages: formatting > small chunks by process-filter is little slower than formatting the > whole output like it currently does. That's expected. > Could it be possible that a slowdown is caused by `narrow-to-region'? `narrow-to-region' is cheap. But doing it by chunks is necessarily slower, because there is a non-negligible overhead "per chunk". `narrow-to-region' is part of that overhead, but there are others much more costly, such as going through redisplay (which may even sometimes have to update some part of the display, such as the "nn%" thingy since that depends on the total buffer size). Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 27 21:02:13 2014 Received: (at 17831) by debbugs.gnu.org; 28 Jun 2014 01:02:13 +0000 Received: from localhost ([127.0.0.1]:35472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X0h1x-0003Qg-3w for submit@debbugs.gnu.org; Fri, 27 Jun 2014 21:02:13 -0400 Received: from alc-vshost7.dreamhost.com ([69.163.216.107]:49287 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X0h1v-0003QS-5I for 17831@debbugs.gnu.org; Fri, 27 Jun 2014 21:02:12 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id AA2893093BD287; Fri, 27 Jun 2014 18:02:08 -0700 (PDT) From: Juri Linkov To: Stefan Monnier Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' Organization: JURTA References: <87tx7buryg.fsf@mail.jurta.org> <53A92532.9040901@gmx.at> <83zjh2qpia.fsf@gnu.org> <83mwd2qji7.fsf@gnu.org> <83ha3aqdh5.fsf@gnu.org> <87tx79es0g.fsf@mail.jurta.org> <87y4wj9pzs.fsf@mail.jurta.org> Date: Sat, 28 Jun 2014 02:45:59 +0300 In-Reply-To: (Stefan Monnier's message of "Thu, 26 Jun 2014 22:16:45 -0400") Message-ID: <8761jlua54.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >> Could it be possible that a slowdown is caused by `narrow-to-region'? > > `narrow-to-region' is cheap. But doing it by chunks is necessarily > slower, because there is a non-negligible overhead "per chunk". > `narrow-to-region' is part of that overhead, but there are others much > more costly, such as going through redisplay (which may even sometimes > have to update some part of the display, such as the "nn%" thingy since > that depends on the total buffer size). [...] Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.6 RCVD_IN_BRBL_LASTEXT RBL: RCVD_IN_BRBL_LASTEXT [69.163.216.107 listed in bb.barracudacentral.org] X-Debbugs-Envelope-To: 17831 Cc: rudalics@gmx.at, Eli Zaretskii , 17831@debbugs.gnu.org, sdl.web@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >> Could it be possible that a slowdown is caused by `narrow-to-region'? > > `narrow-to-region' is cheap. But doing it by chunks is necessarily > slower, because there is a non-negligible overhead "per chunk". > `narrow-to-region' is part of that overhead, but there are others much > more costly, such as going through redisplay (which may even sometimes > have to update some part of the display, such as the "nn%" thingy since > that depends on the total buffer size). [...] Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.6 RCVD_IN_BRBL_LASTEXT RBL: RCVD_IN_BRBL_LASTEXT [69.163.216.107 listed in bb.barracudacentral.org] >> Could it be possible that a slowdown is caused by `narrow-to-region'? > > `narrow-to-region' is cheap. But doing it by chunks is necessarily > slower, because there is a non-negligible overhead "per chunk". > `narrow-to-region' is part of that overhead, but there are others much > more costly, such as going through redisplay (which may even sometimes > have to update some part of the display, such as the "nn%" thingy since > that depends on the total buffer size). If it's not possible to increase the default chunk size to call process-filter less often (e.g. now for `M-x man RET bash' it's called 90 times), then some users might want to disable this using a new option like `Man-sync'. OTOH, since most of man pages are much smaller, maybe this is not a problem. But still the users need an indication that the formatting is not finished. grep/compilation and vc display a string like "waiting..." or "compiling..." in the mode-line, so man.el could display in the mode-line "formatting..." From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 27 21:30:59 2014 Received: (at 17831) by debbugs.gnu.org; 28 Jun 2014 01:30:59 +0000 Received: from localhost ([127.0.0.1]:35494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X0hTm-0004PD-GX for submit@debbugs.gnu.org; Fri, 27 Jun 2014 21:30:59 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:10874) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X0hTl-0004Oz-42 for 17831@debbugs.gnu.org; Fri, 27 Jun 2014 21:30:57 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4AQOpGYFqg0wh X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4AQOpGYFqg0wh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="69797749" Received: from 75-119-224-253.dsl.teksavvy.com (HELO ceviche.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 27 Jun 2014 21:30:51 -0400 Received: by ceviche.home (Postfix, from userid 20848) id C275866302; Fri, 27 Jun 2014 21:30:50 -0400 (EDT) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' Message-ID: References: <87tx7buryg.fsf@mail.jurta.org> <53A92532.9040901@gmx.at> <83zjh2qpia.fsf@gnu.org> <83mwd2qji7.fsf@gnu.org> <83ha3aqdh5.fsf@gnu.org> <87tx79es0g.fsf@mail.jurta.org> <87y4wj9pzs.fsf@mail.jurta.org> <8761jlua54.fsf@mail.jurta.org> Date: Fri, 27 Jun 2014 21:30:50 -0400 In-Reply-To: <8761jlua54.fsf@mail.jurta.org> (Juri Linkov's message of "Sat, 28 Jun 2014 02:45:59 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 17831 Cc: rudalics@gmx.at, Eli Zaretskii , 17831@debbugs.gnu.org, sdl.web@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > If it's not possible to increase the default chunk size to call > process-filter less often (e.g. now for `M-x man RET bash' it's called > 90 times), then some users might want to disable this using a new option > like `Man-sync'. OTOH, since most of man pages are much smaller, > maybe this is not a problem. I wouldn't worry 'bout it for now. And this is not a problem specific to M-x man. > But still the users need an indication that the formatting > is not finished. grep/compilation and vc display a string > like "waiting..." or "compiling..." in the mode-line, so > man.el could display in the mode-line "formatting..." Sound fine, Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 29 20:21:37 2014 Received: (at 17831) by debbugs.gnu.org; 30 Jun 2014 00:21:37 +0000 Received: from localhost ([127.0.0.1]:37215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X1PLk-0000UJ-T1 for submit@debbugs.gnu.org; Sun, 29 Jun 2014 20:21:37 -0400 Received: from alc-vshost7.dreamhost.com ([69.163.216.107]:46187 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X1PLh-0000UA-Hk for 17831@debbugs.gnu.org; Sun, 29 Jun 2014 20:21:34 -0400 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id A6604348328E00; Sun, 29 Jun 2014 17:21:30 -0700 (PDT) From: Juri Linkov To: Stefan Monnier Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' Organization: JURTA References: <87tx7buryg.fsf@mail.jurta.org> <53A92532.9040901@gmx.at> <83zjh2qpia.fsf@gnu.org> <83mwd2qji7.fsf@gnu.org> <83ha3aqdh5.fsf@gnu.org> <87tx79es0g.fsf@mail.jurta.org> <87y4wj9pzs.fsf@mail.jurta.org> <8761jlua54.fsf@mail.jurta.org> Date: Mon, 30 Jun 2014 02:42:28 +0300 In-Reply-To: (Stefan Monnier's message of "Fri, 27 Jun 2014 21:30:50 -0400") Message-ID: <87zjgv5lln.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 2.4 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >> But still the users need an indication that the formatting >> is not finished. grep/compilation and vc display a string >> like "waiting..." or "compiling..." in the mode-line, so >> man.el could display in the mode-line "formatting..." > > Sound fine, [...] Content analysis details: (2.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.6 RCVD_IN_BRBL_LASTEXT RBL: RCVD_IN_BRBL_LASTEXT [69.163.216.107 listed in bb.barracudacentral.org] 0.7 RCVD_IN_XBL RBL: Received via a relay in Spamhaus XBL [69.163.216.107 listed in zen.spamhaus.org] X-Debbugs-Envelope-To: 17831 Cc: rudalics@gmx.at, Eli Zaretskii , 17831@debbugs.gnu.org, sdl.web@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.4 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >> But still the users need an indication that the formatting >> is not finished. grep/compilation and vc display a string >> like "waiting..." or "compiling..." in the mode-line, so >> man.el could display in the mode-line "formatting..." > > Sound fine, [...] Content analysis details: (2.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.7 RCVD_IN_XBL RBL: Received via a relay in Spamhaus XBL [69.163.216.107 listed in zen.spamhaus.org] 1.6 RCVD_IN_BRBL_LASTEXT RBL: RCVD_IN_BRBL_LASTEXT [69.163.216.107 listed in bb.barracudacentral.org] >> But still the users need an indication that the formatting >> is not finished. grep/compilation and vc display a string >> like "waiting..." or "compiling..." in the mode-line, so >> man.el could display in the mode-line "formatting..." > > Sound fine, After testing I see no problems with this patch: === modified file 'lisp/man.el' --- lisp/man.el 2014-05-09 07:02:00 +0000 +++ lisp/man.el 2014-06-29 23:37:38 +0000 @@ -1056,21 +1056,28 @@ (defun Man-getpage-in-background (topic) (require 'env) (message "Invoking %s %s in the background" manual-program man-args) (setq buffer (generate-new-buffer bufname)) + (Man-notify-when-ready buffer) (with-current-buffer buffer (setq buffer-undo-list t) (setq Man-original-frame (selected-frame)) - (setq Man-arguments man-args)) + (setq Man-arguments man-args) + (Man-mode) + (setq mode-line-process + (concat " " (propertize "[formatting...]" + 'face 'mode-line-emphasis)))) (Man-start-calling (if (fboundp 'start-process) - (set-process-sentinel - (start-process manual-program buffer + (let ((proc (start-process + manual-program buffer (if (memq system-type '(cygwin windows-nt)) shell-file-name "sh") shell-command-switch - (format (Man-build-man-command) man-args)) - 'Man-bgproc-sentinel) - (let ((exit-status + (format (Man-build-man-command) man-args)))) + (set-process-sentinel proc 'Man-bgproc-sentinel) + (set-process-filter proc 'Man-bgproc-filter)) + (let* ((inhibit-read-only t) + (exit-status (call-process shell-file-name nil (list buffer nil) nil shell-command-switch (format (Man-build-man-command) man-args))) @@ -1082,6 +1089,10 @@ (defun Man-getpage-in-background (topic) (format "exited abnormally with code %d" exit-status))) (setq msg exit-status)) + (with-current-buffer buffer + (if Man-fontify-manpage-flag + (Man-fontify-manpage) + (Man-cleanup-manpage))) (Man-bgproc-sentinel bufname msg))))) buffer)) @@ -1168,7 +1179,6 @@ (defun Man-fontify-manpage () "Convert overstriking and underlining to the correct fonts. Same for the ANSI bold and normal escape sequences." (interactive) - (message "Please wait: formatting the %s man page..." Man-arguments) (goto-char (point-min)) ;; Fontify ANSI escapes. (let ((ansi-color-apply-face-function @@ -1183,7 +1193,7 @@ (defun Man-fontify-manpage () ;; Multibyte characters exist. (progn (goto-char (point-min)) - (while (search-forward "__\b\b" nil t) + (while (and (search-forward "__\b\b" nil t) (not (eobp))) (backward-delete-char 4) (put-text-property (point) (1+ (point)) 'face 'Man-underline)) (goto-char (point-min)) @@ -1191,7 +1201,7 @@ (defun Man-fontify-manpage () (backward-delete-char 4) (put-text-property (1- (point)) (point) 'face 'Man-underline)))) (goto-char (point-min)) - (while (search-forward "_\b" nil t) + (while (and (search-forward "_\b" nil t) (not (eobp))) (backward-delete-char 2) (put-text-property (point) (1+ (point)) 'face 'Man-underline)) (goto-char (point-min)) @@ -1223,8 +1233,7 @@ (defun Man-fontify-manpage () (while (re-search-forward Man-heading-regexp nil t) (put-text-property (match-beginning 0) (match-end 0) - 'face 'Man-overstrike))) - (message "%s man page formatted" (Man-page-from-arguments Man-arguments))) + 'face 'Man-overstrike)))) (defun Man-highlight-references (&optional xref-man-type) "Highlight the references on mouse-over. @@ -1286,8 +1295,6 @@ (defun Man-cleanup-manpage (&optional in but when called interactively, do those jobs even if the sed script would have done them." (interactive "p") - (message "Please wait: cleaning up the %s man page..." - Man-arguments) (if (or interactive (not Man-sed-script)) (progn (goto-char (point-min)) @@ -1309,8 +1316,36 @@ (defun Man-cleanup-manpage (&optional in ;; their preceding chars (but don't put Man-overstrike). (Bug#5566) (goto-char (point-min)) (while (re-search-forward ".\b" nil t) (backward-delete-char 2)) - (Man-softhyphen-to-minus) - (message "%s man page cleaned up" Man-arguments)) + (Man-softhyphen-to-minus)) + +(defun Man-bgproc-filter (process string) + "Manpage background process filter. +When manpage command is run asynchronously, PROCESS is the process +object for the manpage command; when manpage command is run +synchronously, PROCESS is the name of the buffer where the manpage +command is run. Second argument STRING is the entire string of output." + (save-excursion + (let ((Man-buffer (process-buffer process))) + (if (null (buffer-name Man-buffer)) ;; deleted buffer + (set-process-buffer process nil) + + (with-current-buffer Man-buffer + (let ((inhibit-read-only t) + (beg (marker-position (process-mark process)))) + (save-excursion + (goto-char beg) + (insert string) + (save-restriction + (narrow-to-region + (save-excursion + (goto-char beg) + (line-beginning-position)) + (point)) + (if Man-fontify-manpage-flag + (Man-fontify-manpage) + (Man-cleanup-manpage))) + (set-marker (process-mark process) (point-max))))))))) (defun Man-bgproc-sentinel (process msg) "Manpage background process sentinel. @@ -1329,6 +1364,7 @@ (defun Man-bgproc-sentinel (process msg) (set-process-buffer process nil)) (with-current-buffer Man-buffer + (save-excursion (let ((case-fold-search nil)) (goto-char (point-min)) (cond ((or (looking-at "No \\(manual \\)*entry for") @@ -1364,28 +1400,34 @@ (defun Man-bgproc-sentinel (process msg) (insert (format "\nprocess %s" msg)))) )) (if delete-buff - (kill-buffer Man-buffer) - (if Man-fontify-manpage-flag - (Man-fontify-manpage) - (Man-cleanup-manpage)) + (if (get-buffer-window Man-buffer) + (quit-window t (get-buffer-window Man-buffer)) + (kill-buffer Man-buffer)) (run-hooks 'Man-cooked-hook) - (Man-mode) + + (Man-build-page-list) + (Man-strip-page-headers) + (Man-unindent) + (Man-goto-page 1 t) (if (not Man-page-list) (let ((args Man-arguments)) - (kill-buffer (current-buffer)) - (user-error "Can't find the %s manpage" + (if (get-buffer-window (current-buffer)) + (quit-window t (get-buffer-window (current-buffer))) + (kill-buffer (current-buffer))) + (message "Can't find the %s manpage" (Man-page-from-arguments args))) - (set-buffer-modified-p nil)))) - ;; Restore case-fold-search before calling - ;; Man-notify-when-ready because it may switch buffers. - (if (not delete-buff) - (Man-notify-when-ready Man-buffer)) + (if Man-fontify-manpage-flag + (message "%s man page formatted" (Man-page-from-arguments Man-arguments)) + (message "%s man page cleaned up" Man-arguments)) + (unless (and (processp process) (not (eq (process-status process) 'exit))) + (setq mode-line-process nil)) + (set-buffer-modified-p nil))))) (if err-mess - (error "%s" err-mess)) + (message "%s" err-mess)) )))) (defun Man-page-from-arguments (args) @@ -1458,11 +1500,7 @@ (define-derived-mode Man-mode fundamenta (set (make-local-variable 'outline-regexp) Man-heading-regexp) (set (make-local-variable 'outline-level) (lambda () 1)) (set (make-local-variable 'bookmark-make-record-function) - 'Man-bookmark-make-record) - (Man-build-page-list) - (Man-strip-page-headers) - (Man-unindent) - (Man-goto-page 1 t)) + 'Man-bookmark-make-record)) (defsubst Man-build-section-alist () "Build the list of manpage sections." From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 29 23:29:32 2014 Received: (at 17831) by debbugs.gnu.org; 30 Jun 2014 03:29:32 +0000 Received: from localhost ([127.0.0.1]:37305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X1SHb-0005h3-Td for submit@debbugs.gnu.org; Sun, 29 Jun 2014 23:29:32 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:5735) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X1SHZ-0005gq-Ud for 17831@debbugs.gnu.org; Sun, 29 Jun 2014 23:29:30 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIxALNBIUGA0kiAQI0hkXjnoHhDgEqRmBaoNMIQ X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIxALNBIUGA0kiAQI0hkXjnoHhDgEqRmBaoNMIQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="69935756" Received: from 75-119-224-253.dsl.teksavvy.com (HELO ceviche.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 29 Jun 2014 23:29:23 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 76D8166138; Sun, 29 Jun 2014 23:29:23 -0400 (EDT) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#17831: 24.4.50; bad default value for `Man-width' Message-ID: References: <87tx7buryg.fsf@mail.jurta.org> <53A92532.9040901@gmx.at> <83zjh2qpia.fsf@gnu.org> <83mwd2qji7.fsf@gnu.org> <83ha3aqdh5.fsf@gnu.org> <87tx79es0g.fsf@mail.jurta.org> <87y4wj9pzs.fsf@mail.jurta.org> <8761jlua54.fsf@mail.jurta.org> <87zjgv5lln.fsf@mail.jurta.org> Date: Sun, 29 Jun 2014 23:29:23 -0400 In-Reply-To: <87zjgv5lln.fsf@mail.jurta.org> (Juri Linkov's message of "Mon, 30 Jun 2014 02:42:28 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 17831 Cc: rudalics@gmx.at, Eli Zaretskii , 17831@debbugs.gnu.org, sdl.web@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) >> Sound fine, > After testing I see no problems with this patch: Great, thanks, Stefan From unknown Tue Jun 17 01:49:48 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 30 Jul 2014 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator