From: Lars Hansen <larsh@math.ku.dk>
Cc: emacs-devel@gnu.org
Subject: Re: [BUG] widget-field-overlay becomes wrong
Date: Wed, 14 Jul 2004 09:00:31 +0200 [thread overview]
Message-ID: <40F4DA0F.5000608@math.ku.dk> (raw)
In-Reply-To: <rjekngar4y.fsf@sheridan.dina.kvl.dk>
[-- Attachment #1: Type: text/plain, Size: 608 bytes --]
Per Abrahamsen wrote:
>I think the problem in the example is that the "menu-choice" widget is
>not "static text". Whenever you make a new choice, the widget rewrite
>itself from scratch.
>
Exactly. And that goes for editable text fields too. But never the less,
text generated by :format is called "static text" in the manual.
I may be a good idea to avoid the term "static text"; it is misleading.
>The second part of your patch should be applied.
>
>
We need changes in the first part as well because it is incorrect as it
is now.
What about the attached rewrite without the term "static text"?
[-- Attachment #2: widget.texi.diff --]
[-- Type: text/plain, Size: 2061 bytes --]
*** widget-1.26.texi Thu Apr 29 21:25:30 2004
--- /home/lh/cvsroot/emacs/man/widget.texi Wed Jul 14 08:52:33 2004
***************
*** 213,226 ****
Editable text fields are created by the @code{editable-field} widget.
! An editable field must be surrounded by static text on both sides, that
! is, text that does not change in the lifetime of the widget. If the
! field extends to the end of the line, the terminating line-feed character
! will count as the necessary static text on that end, but you will have
! to provide the static text before the field yourself. The
! @code{:format} keyword is useful for generating the static text; for
! instance, if you give it a value of @code{"Name: %v"}, the "Name: " part
! will count as the static text.
The editing text fields are highlighted with the
@code{widget-field-face} face, making them easy to find.
--- 213,228 ----
Editable text fields are created by the @code{editable-field} widget.
! In an @code{editable-field} widget, the editable field is not allowed
! to be adjacent to a neighbouring widget, there must be some text in
! between. This text must be part of the @code{editable-field} widget
! itself or inserted with @code{widget-insert}. The @code{:format}
! keyword is useful for generating the necessary text; for instance, if
! you give it a value of @code{"Name: %v "}, the "Name: " part will
! provide the text before the field and the trailing space will provide
! the text after the field. If no @code{:size} argument is given the
! field will extends to the end of the line, and then the terminating
! line-feed character will count as the necessary text after the field.
The editing text fields are highlighted with the
@code{widget-field-face} face, making them easy to find.
***************
*** 345,350 ****
--- 347,353 ----
(widget-insert "Here is some documentation.\n\nName: ")
(widget-create 'editable-field
:size 13
+ :format "%v " ; Static text after the field!
"My Name")
(widget-create 'menu-choice
:tag "Choose"
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
next prev parent reply other threads:[~2004-07-14 7:00 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-30 9:46 [BUG] widget-field-overlay becomes wrong Lars Hansen
2004-07-01 17:14 ` Richard Stallman
2004-07-01 20:08 ` Lars Hansen
2004-07-02 6:02 ` Lars Hansen
2004-07-03 18:20 ` Richard Stallman
2004-07-04 9:47 ` Lars Hansen
2004-07-07 16:02 ` Per Abrahamsen
2004-07-08 12:30 ` Lars Hansen
2004-07-08 23:18 ` Richard Stallman
2004-07-09 21:10 ` Lars Hansen
2004-07-13 15:00 ` Per Abrahamsen
2004-07-14 7:00 ` Lars Hansen [this message]
2004-07-19 7:31 ` Per Abrahamsen
2004-07-19 18:44 ` Richard Stallman
2004-07-23 16:24 ` Per Abrahamsen
2004-07-24 16:28 ` Lars Hansen
2004-08-01 15:18 ` Per Abrahamsen
2004-08-02 9:08 ` Lars Hansen
2004-08-02 12:21 ` Per Abrahamsen
2004-07-24 19:43 ` Richard Stallman
2004-08-01 15:33 ` Per Abrahamsen
2004-08-02 9:07 ` Lars Hansen
2004-08-03 19:37 ` Richard Stallman
2004-08-03 21:18 ` Lars Hansen
2004-08-03 21:25 ` Lars Hansen
2004-08-05 4:22 ` Richard Stallman
2004-08-05 6:22 ` Lars Hansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40F4DA0F.5000608@math.ku.dk \
--to=larsh@math.ku.dk \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.