From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Using temporary buffers to display messages Date: Thu, 29 Mar 2012 04:36:20 +0200 Message-ID: <87vclogml7.fsf@wanadoo.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1332988599 13828 80.91.229.3 (29 Mar 2012 02:36:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 29 Mar 2012 02:36:39 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 29 04:36:39 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SD5E6-0000g9-QG for ged-emacs-devel@m.gmane.org; Thu, 29 Mar 2012 04:36:38 +0200 Original-Received: from localhost ([::1]:50227 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SD5E6-0005X0-5M for ged-emacs-devel@m.gmane.org; Wed, 28 Mar 2012 22:36:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SD5E3-0005Wt-8T for emacs-devel@gnu.org; Wed, 28 Mar 2012 22:36:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SD5E1-0008Dg-H0 for emacs-devel@gnu.org; Wed, 28 Mar 2012 22:36:34 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:43533) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SD5E1-0008DI-AL for emacs-devel@gnu.org; Wed, 28 Mar 2012 22:36:33 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SD5Dy-0000cs-JV for emacs-devel@gnu.org; Thu, 29 Mar 2012 04:36:30 +0200 Original-Received: from 32.red-88-11-106.dynamicip.rima-tde.net ([88.11.106.32]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 29 Mar 2012 04:36:30 +0200 Original-Received: from ofv by 32.red-88-11-106.dynamicip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 29 Mar 2012 04:36:30 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 24 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 32.red-88-11-106.dynamicip.rima-tde.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) Cancel-Lock: sha1:ZNKGw9JYB7Wmczd6UI5gn/F2QO4= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:149240 Archived-At: `sunrise-sunset' contains this code, that displays the text on the minibuffer if the frame is wide enough and on a temporary buffer otherwise: (if (<= (length msg) (frame-width)) (message "%s" msg) (with-output-to-temp-buffer "*temp*" (princ (concat date-string "\n" time-string))) (message "%s" (substitute-command-keys (if one-window (if pop-up-windows "Type \\[delete-other-windows] to remove temp window." "Type \\[switch-to-buffer] RET to remove temp window.") "Type \\[switch-to-buffer-other-window] RET to restore old \ contents of temp window.")))) Is it correct nowadays to use a temporary buffer for displaying informative text when it doesn't fit on a single line or is it a vestige of the times when the minibuffer lacked autoexpand capabilities? (There is another issue with the code above: if the minibuffer is on a separate frame with different width, the function may end displaying the text on a way that is not what the original developer intended.)