From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: format text in TreeWidget. Date: Mon, 10 Jan 2011 15:47:33 +0100 Message-ID: <87tyhg24u2.fsf@member.fsf.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1294670918 16946 80.91.229.12 (10 Jan 2011 14:48:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 10 Jan 2011 14:48:38 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 10 15:48:34 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PcJ2t-0001Bc-PC for geh-help-gnu-emacs@m.gmane.org; Mon, 10 Jan 2011 15:48:31 +0100 Original-Received: from localhost ([127.0.0.1]:41281 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcJ2t-0006IH-8w for geh-help-gnu-emacs@m.gmane.org; Mon, 10 Jan 2011 09:48:31 -0500 Original-Received: from [140.186.70.92] (port=53368 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcJ2E-0006F2-J3 for help-gnu-emacs@gnu.org; Mon, 10 Jan 2011 09:47:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PcJ2B-0003DJ-S3 for help-gnu-emacs@gnu.org; Mon, 10 Jan 2011 09:47:48 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:53276) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PcJ2B-0003DC-L0 for help-gnu-emacs@gnu.org; Mon, 10 Jan 2011 09:47:47 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PcJ2A-0000nk-4A for help-gnu-emacs@gnu.org; Mon, 10 Jan 2011 15:47:46 +0100 Original-Received: from tsdh.uni-koblenz.de ([141.26.67.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Jan 2011 15:47:46 +0100 Original-Received: from tassilo by tsdh.uni-koblenz.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Jan 2011 15:47:46 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 40 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: tsdh.uni-koblenz.de User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:iRCWo9ieqGlhTbtlkRb5Im3B9C8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:78361 Archived-At: Alin Soare writes: > I did write the following code. > > As the :tag text is very long on some lines, and pass over the end the > line, it is displayed on myltiple lines, and the tree looks spoiled. I > wish to make the tree widget show the text formatted correctly, and on > maximum N columns. Hm, this somehow works, but is not perfect: --8<---------------cut here---------------start------------->8--- (widget-create 'tree-widget :node '(push-button :tag "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" :format "%[%t%]\n") `(tree-widget :tag ,(with-temp-buffer (set-fill-column 50) (insert "bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla") (fill-paragraph) (buffer-string))) `(tree-widget :tag ,(with-temp-buffer (set-fill-column 60) (insert "foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo") (fill-paragraph) (buffer-string))) `(tree-widget :tag ,(with-temp-buffer (set-fill-column 70) (insert "baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz baz") (fill-paragraph) (buffer-string)))) --8<---------------cut here---------------end--------------->8--- The problem is that only the first line has correct tree lines... But maybe that's still a pointer into the right direction. Bye, Tassilo