From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alin Soare Subject: Re: format text in TreeWidget. Date: Mon, 10 Jan 2011 22:53:53 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2144722858==" Return-path: Received: from [140.186.70.92] (port=42231 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcOlN-0001JU-ED for emacs-orgmode@gnu.org; Mon, 10 Jan 2011 15:54:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PcOlK-0003rq-7q for emacs-orgmode@gnu.org; Mon, 10 Jan 2011 15:54:49 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Emacs Dev , emacs-orgmode@gnu.org --===============2144722858== Content-Type: multipart/alternative; boundary=0016e659f53469cacd0499842a2a --0016e659f53469cacd0499842a2a Content-Type: text/plain; charset=UTF-8 No. Thanks for your answer. No, your answer is wrong. You did not understand what I meant. I answer you so: I do not like to create a tree like this : |- aaaaaaaaaaaaa aaaaaaaaaaaaaaa |- bbbbbbbbbbbbb bbbbbbbbbbbbbbb `cccccccccccccccc ccccccccccccccccc but like this: |- aaaaaaaaaaaaaaaaaaa | aaaaaaaaaaaaaaaaaaa |- bbbbbbbbbbbbbbbbbbb | bbbbbbbbbbbbbbbbbbbb |-ccccccccccccccccccccccc `ccccccccccccccccccccccc In other words: Is there a function fill-paragraph for tree-mode ? Thanks. Alin 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 --0016e659f53469cacd0499842a2a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
No.

Thanks for your answer.

No, your answer is wrong.
=
You did not understand what I meant.

I answer you so:

I d= o not like to create a tree like this :


|- aaaaaaaaaaaaa
aaaa= aaaaaaaaaaa
|- bbbbbbbbbbbbb
bbbbbbbbbbbbbbb
`cccccccccccccccc
ccccccccccccccc= cc

but like this:


|- aaaaaaaaaaaaaaaaaaa
|=C2=A0 aaaaa= aaaaaaaaaaaaaa
|- bbbbbbbbbbbbbbbbbbb
| bbbbbbbbbbbbbbbbbbbb
|-ccc= cccccccccccccccccccc
`ccccccccccccccccccccccc


In other words:

Is there a funct= ion fill-paragraph for tree-mode ?


Thanks.

Alin















<quote author= =3D"Tassilo Horn-5">
Alin Soare <as1789@gmail.com>= writes:

> I did write the following code.
>
> As the= :tag text is very long on some lines, and pass over the end the
> li= ne, 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 perfe= ct:

--8<---------------cut here---------------start-------------&= gt;8---
(widget-create 'tree-widget
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 :node '(push-button :tag "xxxxxxxxxxxxxxxxxxxxxxxx= xxxxxxxxxxxxxxx" :format "%[%t%]\n")
=C2=A0=C2=A0=C2=A0 = =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 `(tree-widget
=C2=A0=C2=A0=C2=A0 = =C2=A0=C2=A0=C2=A0 =C2=A0:tag ,(with-temp-buffer
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0(set-fill-co= lumn 50)
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0= (insert "bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla b= la 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")
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0(fill-paragr= aph)
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0(buf= fer-string)))
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 `(= tree-widget
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0:tag ,(with-temp= -buffer
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0(= set-fill-column 60)
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0= =C2=A0 =C2=A0(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")
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0(fill-paragr= aph)
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0(buf= fer-string)))
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 `(= tree-widget
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0:tag ,(with-temp= -buffer
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0(= set-fill-column 70)
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0= =C2=A0 =C2=A0(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")
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0(fill-paragr= aph)
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0(buf= fer-string))))
--8<---------------cut here---------------end---------= ------>8---

The problem is that only the first line has correct t= ree lines...

But maybe that's still a pointer into the right dir= ection.

Bye,
Tassilo



</quote>

--0016e659f53469cacd0499842a2a-- --===============2144722858== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============2144722858==--